/** * Create the array of ExportedProperty used to build reference objects. */ private ExportedProperty[] createExported() { BeanProperty idProp = descriptor.getIdProperty(); ArrayList<ExportedProperty> list = new ArrayList<>(); if (idProp != null && idProp.isEmbedded()) { BeanPropertyAssocOne<?> one = (BeanPropertyAssocOne<?>) idProp; BeanDescriptor<?> targetDesc = one.getTargetDescriptor(); BeanProperty[] emIds = targetDesc.propertiesBaseScalar(); try { for (BeanProperty emId : emIds) { list.add(findMatch(true, emId)); } } catch (PersistenceException e) { // not found as individual scalar properties e.printStackTrace(); } } else { if (idProp != null) { list.add(findMatch(false, idProp)); } } return list.toArray(new ExportedProperty[list.size()]); }
public class JavaPersistenceTest { protected static EntityManagerFactory entityManagerFactory; @BeforeClass public static void setUp() throws Exception { if(entityManagerFactory == null) { Map<String, String> properties = new HashMap<String, String>(1); try { properties.put("hibernate.hbm2ddl.auto", "validate"); entityManagerFactory = Persistence.createEntityManagerFactory("default", properties); } catch (PersistenceException e) { e.printStackTrace(); properties.put("hibernate.hbm2ddl.auto", "create"); entityManagerFactory = Persistence.createEntityManagerFactory("default", properties); } } } }
public void printStackTrace(PrintStream out) { super.printStackTrace(out); Exceptions.printNestedThrowables(this, out); }
public void printStackTrace(PrintStream out) { super.printStackTrace(out); Exceptions.printNestedThrowables(this, out); }
public void printStackTrace(PrintWriter out) { super.printStackTrace(out); Exceptions.printNestedThrowables(this, out); }
public void printStackTrace(PrintWriter out) { super.printStackTrace(out); Exceptions.printNestedThrowables(this, out); }
public void printStackTrace(PrintStream out) { super.printStackTrace(out); Exceptions.printNestedThrowables(this, out); }
public void printStackTrace(PrintWriter out) { super.printStackTrace(out); Exceptions.printNestedThrowables(this, out); }
public void printStackTrace(PrintStream out) { super.printStackTrace(out); Exceptions.printNestedThrowables(this, out); }
public void printStackTrace(PrintWriter out) { super.printStackTrace(out); Exceptions.printNestedThrowables(this, out); }
public void printStackTrace(PrintWriter out) { super.printStackTrace(out); Exceptions.printNestedThrowables(this, out); }
public void printStackTrace(PrintStream out) { super.printStackTrace(out); Exceptions.printNestedThrowables(this, out); }
/** * Create the array of ExportedProperty used to build reference objects. */ private ExportedProperty[] createExported() { BeanProperty[] uids = descriptor.propertiesId(); ArrayList<ExportedProperty> list = new ArrayList<ExportedProperty>(); if (uids.length == 1 && uids[0].isEmbedded()) { BeanPropertyAssocOne<?> one = (BeanPropertyAssocOne<?>) uids[0]; BeanDescriptor<?> targetDesc = one.getTargetDescriptor(); BeanProperty[] emIds = targetDesc.propertiesBaseScalar(); try { for (int i = 0; i < emIds.length; i++) { ExportedProperty expProp = findMatch(true, emIds[i]); list.add(expProp); } } catch (PersistenceException e){ // not found as individual scalar properties e.printStackTrace(); } } else { for (int i = 0; i < uids.length; i++) { ExportedProperty expProp = findMatch(false, uids[i]); list.add(expProp); } } return (ExportedProperty[]) list.toArray(new ExportedProperty[list.size()]); }
/** * Create the array of ExportedProperty used to build reference objects. */ private ExportedProperty[] createExported() { BeanProperty[] uids = descriptor.propertiesId(); ArrayList<ExportedProperty> list = new ArrayList<ExportedProperty>(); if (uids.length == 1 && uids[0].isEmbedded()) { BeanPropertyAssocOne<?> one = (BeanPropertyAssocOne<?>) uids[0]; BeanDescriptor<?> targetDesc = one.getTargetDescriptor(); BeanProperty[] emIds = targetDesc.propertiesBaseScalar(); try { for (int i = 0; i < emIds.length; i++) { ExportedProperty expProp = findMatch(true, emIds[i]); list.add(expProp); } } catch (PersistenceException e){ // not found as individual scalar properties e.printStackTrace(); } } else { for (int i = 0; i < uids.length; i++) { ExportedProperty expProp = findMatch(false, uids[i]); list.add(expProp); } } return (ExportedProperty[]) list.toArray(new ExportedProperty[list.size()]); }
/** * Create the array of ExportedProperty used to build reference objects. */ private ExportedProperty[] createExported() { BeanProperty idProp = descriptor.getIdProperty(); ArrayList<ExportedProperty> list = new ArrayList<>(); if (idProp != null && idProp.isEmbedded()) { BeanPropertyAssocOne<?> one = (BeanPropertyAssocOne<?>) idProp; BeanDescriptor<?> targetDesc = one.getTargetDescriptor(); BeanProperty[] emIds = targetDesc.propertiesBaseScalar(); try { for (BeanProperty emId : emIds) { list.add(findMatch(true, emId)); } } catch (PersistenceException e) { // not found as individual scalar properties e.printStackTrace(); } } else { if (idProp != null) { list.add(findMatch(false, idProp)); } } return list.toArray(new ExportedProperty[list.size()]); }
/** * Create the array of ExportedProperty used to build reference objects. */ private ExportedProperty[] createExported() { BeanProperty idProp = descriptor.getIdProperty(); ArrayList<ExportedProperty> list = new ArrayList<>(); if (idProp != null && idProp.isEmbedded()) { BeanPropertyAssocOne<?> one = (BeanPropertyAssocOne<?>) idProp; BeanDescriptor<?> targetDesc = one.getTargetDescriptor(); BeanProperty[] emIds = targetDesc.propertiesBaseScalar(); try { for (BeanProperty emId : emIds) { ExportedProperty expProp = findMatch(true, emId); list.add(expProp); } } catch (PersistenceException e) { // not found as individual scalar properties e.printStackTrace(); } } else { if (idProp != null) { ExportedProperty expProp = findMatch(false, idProp); list.add(expProp); } } return list.toArray(new ExportedProperty[list.size()]); }
/** * Create the array of ExportedProperty used to build reference objects. */ private ExportedProperty[] createExported() { BeanProperty[] uids = descriptor.propertiesId(); ArrayList<ExportedProperty> list = new ArrayList<ExportedProperty>(); if (uids.length == 1 && uids[0].isEmbedded()) { BeanPropertyAssocOne<?> one = (BeanPropertyAssocOne<?>) uids[0]; BeanDescriptor<?> targetDesc = one.getTargetDescriptor(); BeanProperty[] emIds = targetDesc.propertiesBaseScalar(); try { for (int i = 0; i < emIds.length; i++) { ExportedProperty expProp = findMatch(true, emIds[i]); list.add(expProp); } } catch (PersistenceException e){ // not found as individual scalar properties e.printStackTrace(); } } else { for (int i = 0; i < uids.length; i++) { ExportedProperty expProp = findMatch(false, uids[i]); list.add(expProp); } } return (ExportedProperty[]) list.toArray(new ExportedProperty[list.size()]); }
/** * Create the array of ExportedProperty used to build reference objects. */ private ExportedProperty[] createExported() { BeanProperty[] uids = descriptor.propertiesId(); ArrayList<ExportedProperty> list = new ArrayList<ExportedProperty>(); if (uids.length == 1 && uids[0].isEmbedded()) { BeanPropertyAssocOne<?> one = (BeanPropertyAssocOne<?>) uids[0]; BeanDescriptor<?> targetDesc = one.getTargetDescriptor(); BeanProperty[] emIds = targetDesc.propertiesBaseScalar(); try { for (int i = 0; i < emIds.length; i++) { ExportedProperty expProp = findMatch(true, emIds[i]); list.add(expProp); } } catch (PersistenceException e){ // not found as individual scalar properties e.printStackTrace(); } } else { for (int i = 0; i < uids.length; i++) { ExportedProperty expProp = findMatch(false, uids[i]); list.add(expProp); } } return (ExportedProperty[]) list.toArray(new ExportedProperty[list.size()]); }