/** * INTERNAL: * Execute a selecting call. * @exception DatabaseException - an error has occurred on the database */ public Vector executeSelectCall() throws DatabaseException { if (hasMultipleCalls()) { Vector results = new Vector(); for (Enumeration callsEnum = getCalls().elements(); callsEnum.hasMoreElements();) { DatasourceCall databseCall = (DatasourceCall)callsEnum.nextElement(); Helper.addAllToVector(results, (Vector)executeCall(databseCall)); } return results; } else { return (Vector)executeCall(); } }
/** * INTERNAL: * Execute a selecting call. * @exception DatabaseException - an error has occurred on the database */ public Vector executeSelectCall() throws DatabaseException { if (hasMultipleCalls()) { Vector results = new Vector(); for (Enumeration callsEnum = getCalls().elements(); callsEnum.hasMoreElements();) { DatasourceCall databseCall = (DatasourceCall)callsEnum.nextElement(); Helper.addAllToVector(results, (Vector)executeCall(databseCall)); } return results; } else { return (Vector)executeCall(); } }
/** * INTERNAL: * Execute a selecting call. * @exception DatabaseException - an error has occurred on the database */ public Vector executeSelectCall() throws DatabaseException { if (hasMultipleCalls()) { Vector results = new Vector(); for (Enumeration callsEnum = getCalls().elements(); callsEnum.hasMoreElements();) { DatasourceCall databseCall = (DatasourceCall)callsEnum.nextElement(); Helper.addAllToVector(results, (Vector)executeCall(databseCall)); } return results; } else { return (Vector)executeCall(); } }
/** * Add all owned classes for each descriptor through checking the mappings. * If I have a foreign mapping with a constraint dependency, then add it * If I'm related to a class, I'm related to all its subclasses and superclasses. * If my superclass is related to a class, I'm related to it. */ public void recordSpecifiedDependencies() { for (Enumeration constraintsEnum = getDescriptor().getConstraintDependencies().elements(); constraintsEnum.hasMoreElements();) { Class ownedClass = (Class)constraintsEnum.nextElement(); CommitOrderDependencyNode node = getOwner().nodeFor(ownedClass); Vector ownedNodes = withAllSubclasses(node); // I could remove duplicates here, but it's not that big a deal. Helper.addAllToVector(relatedNodes, ownedNodes); } }
/** * Add all owned classes for each descriptor through checking the mappings. * If I have a foreign mapping with a constraint dependency, then add it * If I'm related to a class, I'm related to all its subclasses and superclasses. * If my superclass is related to a class, I'm related to it. */ public void recordSpecifiedDependencies() { for (Enumeration constraintsEnum = getDescriptor().getConstraintDependencies().elements(); constraintsEnum.hasMoreElements();) { Class ownedClass = (Class)constraintsEnum.nextElement(); CommitOrderDependencyNode node = getOwner().nodeFor(ownedClass); Vector ownedNodes = withAllSubclasses(node); // I could remove duplicates here, but it's not that big a deal. Helper.addAllToVector(relatedNodes, ownedNodes); } }
/** * Add all owned classes for each descriptor through checking the mappings. * If I have a foreign mapping with a constraint dependency, then add it * If I'm related to a class, I'm related to all its subclasses and superclasses. * If my superclass is related to a class, I'm related to it. */ public void recordSpecifiedDependencies() { for (Enumeration constraintsEnum = getDescriptor().getConstraintDependencies().elements(); constraintsEnum.hasMoreElements();) { Class ownedClass = (Class)constraintsEnum.nextElement(); CommitOrderDependencyNode node = getOwner().nodeFor(ownedClass); Vector ownedNodes = withAllSubclasses(node); // I could remove duplicates here, but it's not that big a deal. Helper.addAllToVector(relatedNodes, ownedNodes); } }
Helper.addAllToVector(fields, owner.getJoinedAttributeManager().getJoinedAttributeExpressions()); Helper.addAllToVector(fields, owner.getJoinedAttributeManager().getJoinedMappingExpressions()); Helper.addAllToVector(fields, owner.getAdditionalFields());
/** * Read the next page of objects from the server. */ protected Object retrieveNextPage() throws DatabaseException { if (isClosed()) { return null; } Vector nextPageObjects = (((RemoteSession)getSession()).getRemoteConnection()).cursoredStreamNextPage(this, getPolicy().getQuery(), (RemoteSession)getSession(), getPageSize()); if ((nextPageObjects == null) || nextPageObjects.isEmpty()) { return null; } Helper.addAllToVector(getObjectCollection(), nextPageObjects); return getObjectCollection().lastElement(); } }
addSelectionFieldsForJoinedExpressions(fields, getJoinedAttributeManager().getJoinedMappingExpressions()); }else{ Helper.addAllToVector(fields, getJoinedAttributeManager().getJoinedAttributeExpressions()); Helper.addAllToVector(fields, getJoinedAttributeManager().getJoinedMappingExpressions()); Helper.addAllToVector(fields, getAdditionalFields());
/** * INTERNAL: * Return the fields selected by the query. * This includes the partial or joined fields. * This is only used for custom SQL executions. */ public Vector getSelectionFields() { if (hasPartialAttributeExpressions()) { return getPartialAttributeSelectionFields(true); } else if (hasFetchGroup()) { return getFetchGroupSelectionFields(true); } else if (hasJoining()) { JoinedAttributeManager joinManager = getJoinedAttributeManager(); Vector fields = NonSynchronizedVector.newInstance(getDescriptor().getAllFields().size() + joinManager.getJoinedAttributeExpressions().size() + joinManager.getJoinedMappingExpressions().size()); Helper.addAllToVector(fields, getDescriptor().getAllFields()); addSelectionFieldsForJoinedExpressions(fields, joinManager.getJoinedAttributeExpressions()); addSelectionFieldsForJoinedExpressions(fields, joinManager.getJoinedMappingExpressions()); return fields; } return getDescriptor().getAllFields(); }
Helper.addAllToVector(relatedNodes, ownedNodes); } else if (((ForeignReferenceMapping)mapping).hasInverseConstraintDependency()) { Class ownerClass; Helper.addAllToVector(ownerNode.getRelatedNodes(), ownedNodes);
Helper.addAllToVector(relatedNodes, ownedNodes); } else if (((ForeignReferenceMapping)mapping).hasInverseConstraintDependency()) { Class ownerClass; Helper.addAllToVector(ownerNode.getRelatedNodes(), ownedNodes);
Helper.addAllToVector(relatedNodes, ownedNodes); } else if (((ForeignReferenceMapping)mapping).hasInverseConstraintDependency()) { Class ownerClass; Helper.addAllToVector(ownerNode.getRelatedNodes(), ownedNodes);
Helper.addAllToVector(batchQuery.getBatchReadAttributeExpressions(), nestedExpressions);