1 package org.apache.ojb.broker.accesslayer; 2 3 17 18 import org.apache.ojb.broker.core.PersistenceBrokerImpl; 19 import org.apache.ojb.broker.metadata.ClassDescriptor; 20 import org.apache.ojb.broker.metadata.ObjectReferenceDescriptor; 21 22 29 public abstract class RelationshipPrefetcherImpl extends BasePrefetcher 30 { 31 private ObjectReferenceDescriptor objectReferenceDescriptor; 32 private boolean cascadeRetrieve; 33 34 37 public RelationshipPrefetcherImpl(PersistenceBrokerImpl aBroker, ObjectReferenceDescriptor anOrd) 38 { 39 super(aBroker, anOrd.getItemClass()); 40 objectReferenceDescriptor = anOrd; 41 } 42 43 46 public void prepareRelationshipSettings() 47 { 48 setCascadeRetrieve(getObjectReferenceDescriptor().getCascadeRetrieve()); 49 50 } 53 54 58 protected ClassDescriptor getOwnerClassDescriptor() 59 { 60 return getObjectReferenceDescriptor().getClassDescriptor(); 61 } 62 63 66 public void restoreRelationshipSettings() 67 { 68 } 71 72 76 protected ObjectReferenceDescriptor getObjectReferenceDescriptor() 77 { 78 return objectReferenceDescriptor; 79 } 80 81 85 protected void setObjectReferenceDescriptor(ObjectReferenceDescriptor objectReferenceDescriptor) 86 { 87 this.objectReferenceDescriptor = objectReferenceDescriptor; 88 } 89 90 94 protected boolean isCascadeRetrieve() 95 { 96 return cascadeRetrieve; 97 } 98 99 103 protected void setCascadeRetrieve(boolean cascadeRetrieve) 104 { 105 this.cascadeRetrieve = cascadeRetrieve; 106 } 107 } 108 | Popular Tags |