Methods Summary |
---|
public java.lang.Object | clone()INTERNAL:
Clone the query.
DataReadQuery cloneQuery = (DataReadQuery)super.clone();
cloneQuery.setContainerPolicy(getContainerPolicy().clone(cloneQuery));
return cloneQuery;
|
public java.lang.Object | executeDatabaseQuery()INTERNAL:
Execute the query.
Perform the work to execute the SQL string.
if (getContainerPolicy().overridesRead()) {
return getContainerPolicy().execute();
}
return executeNonCursor();
|
protected java.lang.Object | executeNonCursor()INTERNAL:
The results are *not* in a cursor, build the collection.
Vector rows = getQueryMechanism().executeSelect();
if (useAbstractRecord ){
Object results = getContainerPolicy().buildContainerFromVector(rows, getSession());
return results;
}
ContainerPolicy containerPolicy = getContainerPolicy();
Object reportResults = containerPolicy.containerInstance(rows.size());
for (Iterator rowsEnum = rows.iterator(); rowsEnum.hasNext();) {
containerPolicy.addInto( ((AbstractRecord)rowsEnum.next()).getValues() , reportResults, getSession());
}
return reportResults;
|
public oracle.toplink.essentials.internal.queryframework.ContainerPolicy | getContainerPolicy()PUBLIC:
Return the query's ContainerPolicy.
return containerPolicy;
|
public boolean | isDataReadQuery()PUBLIC:
Return if this is a data read query.
return true;
|
protected void | prepare()INTERNAL:
Prepare the receiver for execution in a session.
super.prepare();
getContainerPolicy().prepare(this, getSession());
if (getContainerPolicy().overridesRead()) {
return;
}
getQueryMechanism().prepareExecuteSelect();
|
public void | prepareForExecution()INTERNAL:
Prepare the receiver for execution in a session.
super.prepareForExecution();
getContainerPolicy().prepareForExecution();
|
public void | setContainerPolicy(oracle.toplink.essentials.internal.queryframework.ContainerPolicy containerPolicy)PUBLIC:
Set the container policy.
// Fix for BUG 3337003 - TopLink OX will try to set this to null if
// it is not set in the deployment XML. So don't allow it to do that.
if (containerPolicy == null) {
return;
}
this.containerPolicy = containerPolicy;
|
public void | setUseAbstractRecord(boolean useAbstractRecord)INTERNAL:
Allow changing the default behaviour so that AbstractRecords are not returned as query results.
this.useAbstractRecord = useAbstractRecord;
|
public void | useCollectionClass(java.lang.Class concreteClass)PUBLIC:
Configure the query to use an instance of the specified container class
to hold the target objects.
The container class must implement (directly or indirectly) the Collection interface.
setContainerPolicy(ContainerPolicy.buildPolicyFor(concreteClass));
|