public class QueryReferenceBroker
extends java.lang.Object
| Constructor and Description |
|---|
QueryReferenceBroker(PersistenceBrokerImpl pb) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class |
getClassToPrefetch() |
ManageableCollection |
getCollectionByQuery(java.lang.Class collectionClass,
Query query,
boolean lazy)
retrieve a collection of type collectionClass matching the Query query
if lazy = true return a CollectionProxy
|
java.util.Collection |
getCollectionByQuery(Query query,
boolean lazy)
retrieve a collection of itemClass Objects matching the Query query
|
Query |
getPKQuery(Identity oid)
Answer the primary key query to retrieve an Object
|
void |
performRetrievalTasks()
Perform the stored retrieval tasks
BRJ: made it public to access it from BasePrefetcher
TODO: this is a quick fix !
|
void |
removePrefetchingListeners()
remove all prefetching listeners
|
void |
retrieveCollection(java.lang.Object obj,
ClassDescriptor cld,
CollectionDescriptor cds,
boolean forced)
Retrieve a single Collection on behalf of obj.
|
void |
retrieveCollections(java.lang.Object newObj,
ClassDescriptor cld,
boolean forced)
Retrieve all Collection attributes of a given instance
|
void |
retrieveProxyCollection(java.lang.Object obj,
ClassDescriptor cld,
CollectionDescriptor cds,
boolean forced)
Retrieve a single Proxied Collection on behalf of obj.
|
void |
retrieveProxyCollections(java.lang.Object newObj,
ClassDescriptor cld,
boolean forced)
Retrieve all Collection attributes of a given instance, and make all of the Proxy Collections
|
void |
retrieveProxyReference(java.lang.Object obj,
ClassDescriptor cld,
ObjectReferenceDescriptor rds,
boolean forced)
Retrieve a single Reference.
|
void |
retrieveProxyReferences(java.lang.Object newObj,
ClassDescriptor cld,
boolean forced)
Retrieve all References
|
void |
retrieveReference(java.lang.Object obj,
ClassDescriptor cld,
ObjectReferenceDescriptor rds,
boolean forced)
Retrieve a single Reference.
|
void |
retrieveReferences(java.lang.Object newObj,
ClassDescriptor cld,
boolean forced)
Retrieve all References
|
public QueryReferenceBroker(PersistenceBrokerImpl pb)
public ManageableCollection getCollectionByQuery(java.lang.Class collectionClass, Query query, boolean lazy) throws PersistenceBrokerException
collectionClass - query - lazy - PersistenceBrokerExceptionpublic java.util.Collection getCollectionByQuery(Query query, boolean lazy) throws PersistenceBrokerException
PersistenceBrokerExceptionpublic void performRetrievalTasks()
public void retrieveReference(java.lang.Object obj,
ClassDescriptor cld,
ObjectReferenceDescriptor rds,
boolean forced)
obj - - object that will have it's field set with a referenced object.cld - - the ClassDescriptor describring objrds - - the ObjectReferenceDescriptor of the reference attribute to be loadedforced - - if set to true, the reference is loaded even if the rds differs.public void retrieveProxyReference(java.lang.Object obj,
ClassDescriptor cld,
ObjectReferenceDescriptor rds,
boolean forced)
obj - - object that will have it's field set with a referenced object.cld - - the ClassDescriptor describring objrds - - the ObjectReferenceDescriptor of the reference attribute to be loadedforced - - if set to true, the reference is loaded even if the rds differs.public void retrieveReferences(java.lang.Object newObj,
ClassDescriptor cld,
boolean forced)
throws PersistenceBrokerException
newObj - the instance to be loaded or refreshedcld - the ClassDescriptor of the instanceforced - if set to true loading is forced even if cld differs.PersistenceBrokerExceptionpublic void retrieveProxyReferences(java.lang.Object newObj,
ClassDescriptor cld,
boolean forced)
throws PersistenceBrokerException
newObj - the instance to be loaded or refreshedcld - the ClassDescriptor of the instanceforced - if set to true loading is forced even if cld differs.PersistenceBrokerExceptionpublic void retrieveCollection(java.lang.Object obj,
ClassDescriptor cld,
CollectionDescriptor cds,
boolean forced)
obj - - the object to be updatedcld - - the ClassDescriptor describing objcds - - the CollectionDescriptor describing the collection attribute to be loadedforced - - if set to true loading is forced, even if cds differs.public void retrieveProxyCollection(java.lang.Object obj,
ClassDescriptor cld,
CollectionDescriptor cds,
boolean forced)
obj - - the object to be updatedcld - - the ClassDescriptor describing objcds - - the CollectionDescriptor describing the collection attribute to be loadedforced - - if set to true a proxy will be placed, even if cds differs.public Query getPKQuery(Identity oid)
oid - the Identity of the Object to retrievepublic void retrieveCollections(java.lang.Object newObj,
ClassDescriptor cld,
boolean forced)
throws PersistenceBrokerException
newObj - the instance to be loaded or refreshedcld - the ClassDescriptor of the instanceforced - if set to true, loading is forced even if cld differsPersistenceBrokerExceptionpublic void retrieveProxyCollections(java.lang.Object newObj,
ClassDescriptor cld,
boolean forced)
throws PersistenceBrokerException
newObj - the instance to be loaded or refreshedcld - the ClassDescriptor of the instanceforced - if set to true, loading is forced even if cld differsPersistenceBrokerExceptionpublic void removePrefetchingListeners()
public java.lang.Class getClassToPrefetch()
(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30