|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.broker.accesslayer.BasePrefetcher
org.apache.ojb.broker.accesslayer.RelationshipPrefetcherImpl
org.apache.ojb.broker.accesslayer.CollectionPrefetcher
org.apache.ojb.broker.accesslayer.MtoNCollectionPrefetcher
public class MtoNCollectionPrefetcher
Relationship Prefetcher for MtoN-Collections.
| Field Summary |
|---|
| Fields inherited from class org.apache.ojb.broker.accesslayer.BasePrefetcher |
|---|
IN_LIMIT, itemClassDesc, pkLimit |
| Constructor Summary | |
|---|---|
MtoNCollectionPrefetcher(PersistenceBrokerImpl aBroker,
ObjectReferenceDescriptor anOrd)
|
|
| Method Summary | |
|---|---|
protected void |
associateBatched(Collection owners,
Collection children,
Collection mToNImplementors)
associate the batched Children with their owner object loop over children BRJ: There is a potential problem with the type of the pks used to build the Identities. |
protected Query[] |
buildMtoNImplementorQueries(Collection owners,
Collection children)
Build the multiple queries for one relationship because of limitation of IN(...) |
protected Query |
buildMtoNImplementorQuery(Collection ids)
Build a query to read the mn-implementors |
protected Query |
buildPrefetchQuery(Collection ids)
Build the prefetch query for a M-N relationship, The query looks like the following sample : |
void |
prefetchRelationship(Collection owners)
Prefetch the Relationship for the owners (the 1 side of a 1:n) |
| Methods inherited from class org.apache.ojb.broker.accesslayer.CollectionPrefetcher |
|---|
associateBatched, buildPrefetchQueries, createCollection, getCollectionDescriptor |
| Methods inherited from class org.apache.ojb.broker.accesslayer.RelationshipPrefetcherImpl |
|---|
getObjectReferenceDescriptor, getOwnerClassDescriptor, isCascadeRetrieve, prepareRelationshipSettings, restoreRelationshipSettings, setCascadeRetrieve, setObjectReferenceDescriptor |
| Methods inherited from class org.apache.ojb.broker.accesslayer.BasePrefetcher |
|---|
buildPrefetchCriteria, buildPrefetchQuery, buildPrefetchQuery, getBroker, getDescriptorRepository, getItemClassDescriptor, getLimit, getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MtoNCollectionPrefetcher(PersistenceBrokerImpl aBroker,
ObjectReferenceDescriptor anOrd)
aBroker - the PersistenceBrokeranOrd - the CollectionDescriptor| Method Detail |
|---|
public void prefetchRelationship(Collection owners)
RelationshipPrefetcher
prefetchRelationship in interface RelationshipPrefetcherprefetchRelationship in class BasePrefetcherRelationshipPrefetcher.prefetchRelationship(Collection)protected Query buildPrefetchQuery(Collection ids)
crit = new Criteria();
crit.addIn("PERSON_PROJECT.PROJECT_ID", ids);
crit.addEqualToField("id","PERSON_PROJECT.PERSON_ID");
qry = new QueryByMtoNCriteria(Person.class, "PERSON_PROJECT", crit, true);
buildPrefetchQuery in class CollectionPrefetcherids - Collection containing all identities of objects of the M side
protected Query buildMtoNImplementorQuery(Collection ids)
ids -
protected Query[] buildMtoNImplementorQueries(Collection owners,
Collection children)
owners - Collection containing all objects of the ONE side
protected void associateBatched(Collection owners,
Collection children,
Collection mToNImplementors)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||