/** * INTERNAL: * Select all objects for a concrete descriptor. */ @Override protected Object selectAllObjects(ReadAllQuery query) { if (this.descriptor.isAbstract()) { return query.getContainerPolicy().containerInstance(); } return super.selectAllObjects(query); }
/** * INTERNAL: * Select all objects for a concrete descriptor. */ @Override protected Object selectAllObjects(ReadAllQuery query) { if (this.descriptor.isAbstract()) { return query.getContainerPolicy().containerInstance(); } return super.selectAllObjects(query); }
/** * INTERNAL: * Select all objects for a concrete descriptor. */ @Override protected Object selectAllObjects(ReadAllQuery query) { // If we came from a source mapping the execute the selection query // we prepared from it. if (selectionQueriesForAllObjects.containsKey(query.getSourceMapping())) { return query.getExecutionSession().executeQuery(selectionQueriesForAllObjects.get(query.getSourceMapping()), query.getTranslationRow()); } else { return super.selectAllObjects(query); } }
/** * INTERNAL: * Select all objects for an interface descriptor. * This is accomplished by selecting for all of the concrete classes and then merging the objects. * * @return Vector containing all objects. * @exception DatabaseException - an error has occurred on the database. */ public Object selectAllObjectsUsingMultipleTableSubclassRead(ReadAllQuery query) throws DatabaseException { org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy = query.getContainerPolicy(); Object objects = containerPolicy.containerInstance(1); for (Enumeration childDescriptors = getChildDescriptors().elements(); childDescriptors.hasMoreElements();) { ClassDescriptor descriptor = (ClassDescriptor)childDescriptors.nextElement(); objects = containerPolicy.concatenateContainers(objects, descriptor.getInterfacePolicy().selectAllObjects(query)); } return objects; }
/** * INTERNAL: * Select all objects for an interface descriptor. * This is accomplished by selecting for all of the concrete classes and then merging the objects. */ public Object selectAllObjectsUsingMultipleTableSubclassRead(ReadAllQuery query) throws DatabaseException { ContainerPolicy containerPolicy = query.getContainerPolicy(); Object objects = containerPolicy.containerInstance(); if (query.shouldIncludeData()) { ComplexQueryResult result = new ComplexQueryResult(); result.setResult(objects); result.setData(new ArrayList()); objects = result; } int size = this.childDescriptors.size(); for (int index = 0; index < size; index++) { ClassDescriptor descriptor = this.childDescriptors.get(index); objects = containerPolicy.concatenateContainers( objects, descriptor.getInterfacePolicy().selectAllObjects(query), query.getSession()); } return objects; }
/** * INTERNAL: * Select all objects for an interface descriptor. * This is accomplished by selecting for all of the concrete classes and then merging the objects. */ public Object selectAllObjectsUsingMultipleTableSubclassRead(ReadAllQuery query) throws DatabaseException { ContainerPolicy containerPolicy = query.getContainerPolicy(); Object objects = containerPolicy.containerInstance(); if (query.shouldIncludeData()) { ComplexQueryResult result = new ComplexQueryResult(); result.setResult(objects); result.setData(new ArrayList()); objects = result; } int size = this.childDescriptors.size(); for (int index = 0; index < size; index++) { ClassDescriptor descriptor = this.childDescriptors.get(index); objects = containerPolicy.concatenateContainers( objects, descriptor.getInterfacePolicy().selectAllObjects(query), query.getSession()); } return objects; }