/** * PUBLIC: * Configure the mapping to use an instance of the specified container class * to hold the target objects. * <p>The container class must implement (directly or indirectly) the Map interface. * <p>Note: Do not use both useMapClass(Class concreteClass), useTransparentMap(). The last use of one of the two methods will override the previous one. */ public void useTransparentMap() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useMapClass(ClassConstants.IndirectMap_Class); }
/** * PUBLIC: * Configure the mapping to use an instance of the specified container class * to hold the target objects. * <p>The container class must implement (directly or indirectly) the Map interface. * <p>Note: Do not use both useMapClass(Class concreteClass), useTransparentMap(). The last use of one of the two methods will override the previous one. */ public void useTransparentMap() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useMapClass(ClassConstants.IndirectMap_Class); }
/** * PUBLIC: * Configure the mapping to use an instance of the specified container class * to hold the target objects. * <p>The container class must implement (directly or indirectly) the Map interface. * <p>Note: Do not use both useMapClass(Class concreteClass), useTransparentMap(). The last use of one of the two methods will override the previous one. */ public void useTransparentMap() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useMapClass(ClassConstants.IndirectMap_Class); }
/** * PUBLIC: * If transparent indirection is used, a special collection will be placed in the source * object's attribute. * Fetching of the contents of the collection from the database will be delayed * until absolutely necessary. (Any message sent to the collection will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from Collection (or List or Vector) to * ValueHolderInterface. */ public void useTransparentCollection() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useCollectionClass(ClassConstants.IndirectList_Class); }
/** * PUBLIC: * If transparent indirection is used, a special collection will be placed in the source * object's attribute. * Fetching of the contents of the collection from the database will be delayed * until absolutely necessary. (Any message sent to the collection will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from Collection (or List or Vector) to * ValueHolderInterface. */ public void useTransparentCollection() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useCollectionClass(ClassConstants.IndirectList_Class); }
/** * PUBLIC: * If transparent indirection is used, a special collection will be placed in the source * object's attribute. * Fetching of the contents of the collection from the database will be delayed * until absolutely necessary. (Any message sent to the collection will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from Collection (or List or Vector) to * ValueHolderInterface. */ public void useTransparentCollection() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useCollectionClass(ClassConstants.IndirectList_Class); }
/** * PUBLIC: * If transparent indirection is used, a special collection will be placed in the source * object's attribute. * Fetching of the contents of the collection from the database will be delayed * until absolutely necessary. (Any message sent to the collection will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from Set to * ValueHolderInterface. */ public void useTransparentSet() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useCollectionClass(IndirectSet.class); setSelectionQueryContainerPolicy(ContainerPolicy.buildPolicyFor(HashSet.class)); }
/** * PUBLIC: * If transparent indirection is used, a special collection will be placed in the source * object's attribute. * Fetching of the contents of the collection from the database will be delayed * until absolutely necessary. (Any message sent to the collection will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from Set to * ValueHolderInterface. */ public void useTransparentSet() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useCollectionClass(IndirectSet.class); setSelectionQueryContainerPolicy(ContainerPolicy.buildPolicyFor(HashSet.class)); }
/** * PUBLIC: * If transparent indirection is used, a special collection will be placed in the source * object's attribute. * Fetching of the contents of the collection from the database will be delayed * until absolutely necessary. (Any message sent to the collection will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from Set to * ValueHolderInterface. */ public void useTransparentSet() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useCollectionClass(IndirectSet.class); setSelectionQueryContainerPolicy(ContainerPolicy.buildPolicyFor(HashSet.class)); }
/** * PUBLIC: * If transparent indirection is used, a special collection will be placed in the source * object's attribute. * Fetching of the contents of the collection from the database will be delayed * until absolutely necessary. (Any message sent to the collection will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from List to * ValueHolderInterface. */ public void useTransparentList() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useCollectionClass(ClassConstants.IndirectList_Class); setSelectionQueryContainerPolicy(ContainerPolicy.buildPolicyFor(Vector.class, hasOrderBy() || listOrderField != null)); }
/** * PUBLIC: * If transparent indirection is used, a special collection will be placed in the source * object's attribute. * Fetching of the contents of the collection from the database will be delayed * until absolutely necessary. (Any message sent to the collection will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from List to * ValueHolderInterface. */ public void useTransparentList() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useCollectionClass(ClassConstants.IndirectList_Class); setSelectionQueryContainerPolicy(ContainerPolicy.buildPolicyFor(Vector.class, hasOrderBy() || listOrderField != null)); }
/** * PUBLIC: * If transparent indirection is used, a special collection will be placed in the source * object's attribute. * Fetching of the contents of the collection from the database will be delayed * until absolutely necessary. (Any message sent to the collection will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from List to * ValueHolderInterface. */ public void useTransparentList() { setIndirectionPolicy(new TransparentIndirectionPolicy()); useCollectionClass(ClassConstants.IndirectList_Class); setSelectionQueryContainerPolicy(ContainerPolicy.buildPolicyFor(Vector.class, hasOrderBy() || listOrderField != null)); }
/** * PUBLIC: * If transparent indirection is used, a special map will be placed in the source * object's attribute. * Fetching of the contents of the map from the database will be delayed * until absolutely necessary. (Any message sent to the map will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from Map (or Map or Hashtable) to * ValueHolderInterface.<p> * The key used in the Map is the value returned by a call to the zero parameter * method named methodName. The method should be a zero argument method implemented (or * inherited) by the value to be inserted into the Map. */ public void useTransparentMap(String methodName) { setIndirectionPolicy(new TransparentIndirectionPolicy()); useMapClass(ClassConstants.IndirectMap_Class, methodName); ContainerPolicy policy = ContainerPolicy.buildPolicyFor(Hashtable.class); policy.setKeyName(methodName, getReferenceClass()); setSelectionQueryContainerPolicy(policy); }
/** * PUBLIC: * If transparent indirection is used, a special map will be placed in the source * object's attribute. * Fetching of the contents of the map from the database will be delayed * until absolutely necessary. (Any message sent to the map will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from Map (or Map or Hashtable) to * ValueHolderInterface.<p> * The key used in the Map is the value returned by a call to the zero parameter * method named methodName. The method should be a zero argument method implemented (or * inherited) by the value to be inserted into the Map. */ public void useTransparentMap(String methodName) { setIndirectionPolicy(new TransparentIndirectionPolicy()); useMapClass(ClassConstants.IndirectMap_Class, methodName); ContainerPolicy policy = ContainerPolicy.buildPolicyFor(Hashtable.class); policy.setKeyName(methodName, getReferenceClass()); setSelectionQueryContainerPolicy(policy); }
/** * PUBLIC: * If transparent indirection is used, a special map will be placed in the source * object's attribute. * Fetching of the contents of the map from the database will be delayed * until absolutely necessary. (Any message sent to the map will cause * the contents to be faulted in from the database.) * This can result in rather significant performance gains, without having to change * the source object's attribute from Map (or Map or Hashtable) to * ValueHolderInterface.<p> * The key used in the Map is the value returned by a call to the zero parameter * method named methodName. The method should be a zero argument method implemented (or * inherited) by the value to be inserted into the Map. */ public void useTransparentMap(String methodName) { setIndirectionPolicy(new TransparentIndirectionPolicy()); useMapClass(ClassConstants.IndirectMap_Class, methodName); ContainerPolicy policy = ContainerPolicy.buildPolicyFor(Hashtable.class); policy.setKeyName(methodName, getReferenceClass()); setSelectionQueryContainerPolicy(policy); }
if (usesIndirection()) { containerClass = ClassConstants.IndirectMap_Class; ((ForeignReferenceMapping) mapping).setIndirectionPolicy(new TransparentIndirectionPolicy()); } else { containerClass = java.util.Hashtable.class;