/** * INTERNAL: * Used to set the collection class by name. * This is required when building from metadata to allow the correct class loader to be used. */ public void useListClassName(String concreteClassName) { setContainerPolicy(new ListContainerPolicy(concreteClassName)); }
/** * INTERNAL: * Used to set the collection class by name. * This is required when building from metadata to allow the correct class loader to be used. */ public void useCollectionClassName(String concreteClassName) { setContainerPolicy(new CollectionContainerPolicy(concreteClassName)); }
/** * INTERNAL: * Used to set the collection class by name. * This is required when building from metadata to allow the correct class loader to be used. */ public void useCollectionClassName(String concreteClassName) { setContainerPolicy(new CollectionContainerPolicy(concreteClassName)); }
/** * INTERNAL: * Used to set the collection class by name. * This is required when building from metadata to allow the correct class loader to be used. */ public void useListClassName(String concreteClassName) { setContainerPolicy(new ListContainerPolicy(concreteClassName)); }
/** * INTERNAL: * Not sure were this is used, MW? */ public void useCollectionClassName(String concreteClassName) { setContainerPolicy(new CollectionContainerPolicy(concreteClassName)); }
/** * INTERNAL: * Not sure were this is used, MW? */ public void useListClassName(String concreteClassName) { setContainerPolicy(new ListContainerPolicy(concreteClassName)); }
/** * INTERNAL: * Configure the mapping to use an instance of the specified container class name * to hold the target objects. This method is used by MW. * <p>The container class must implement (directly or indirectly) the * <code>java.util.SortedSet</code> interface. */ public void useSortedSetClassName(String className, String comparatorClassName) { SortedCollectionContainerPolicy policy = new SortedCollectionContainerPolicy(className); policy.setComparatorClassName(comparatorClassName); setContainerPolicy(policy); }
/** * PUBLIC: * Configure the mapping to use an instance of the specified container class * to hold the target objects. * Note that if listOrderField is used then setListOrderField method * should be called before this method. * <p>The container class must implement (directly or indirectly) the * <code>java.util.Collection</code> interface. */ public void useCollectionClass(Class concreteClass) { ContainerPolicy policy = ContainerPolicy.buildPolicyFor(concreteClass, hasOrderBy() || listOrderField != null); setContainerPolicy(policy); }
/** * INTERNAL: * Configure the mapping to use an instance of the specified container class name * to hold the target objects. This method is used by MW. * <p>The container class must implement (directly or indirectly) the * <code>java.util.SortedSet</code> interface. */ public void useSortedSetClassName(String className, String comparatorClassName) { SortedCollectionContainerPolicy policy = new SortedCollectionContainerPolicy(className); policy.setComparatorClassName(comparatorClassName); setContainerPolicy(policy); }
/** * INTERNAL: * Configure the mapping to use an instance of the specified container class name * to hold the target objects. This method is used by MW. * <p>The container class must implement (directly or indirectly) the * <code>java.util.SortedSet</code> interface. */ public void useSortedSetClassName(String className, String comparatorClassName) { SortedCollectionContainerPolicy policy = new SortedCollectionContainerPolicy(className); policy.setComparatorClassName(comparatorClassName); setContainerPolicy(policy); }
/** * PUBLIC: * Configure the mapping to use an instance of the specified container class * to hold the target objects. * Note that if listOrderField is used then setListOrderField method * should be called before this method. * <p>The container class must implement (directly or indirectly) the * <code>java.util.Collection</code> interface. */ public void useCollectionClass(Class concreteClass) { ContainerPolicy policy = ContainerPolicy.buildPolicyFor(concreteClass, hasOrderBy() || listOrderField != null); setContainerPolicy(policy); }
/** * PUBLIC: * Configure the mapping to use an instance of the specified container class * to hold the target objects. * Note that if listOrderField is used then setListOrderField method * should be called before this method. * <p>The container class must implement (directly or indirectly) the * <code>java.util.Collection</code> interface. */ public void useCollectionClass(Class concreteClass) { ContainerPolicy policy = ContainerPolicy.buildPolicyFor(concreteClass, hasOrderBy() || listOrderField != null); setContainerPolicy(policy); }
/** * 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 * <code>java.util.SortedSet</code> interface. */ public void useSortedSetClass(Class concreteClass, Comparator comparator) { try { SortedCollectionContainerPolicy policy = (SortedCollectionContainerPolicy)ContainerPolicy.buildPolicyFor(concreteClass); policy.setComparator(comparator); setContainerPolicy(policy); } catch (ClassCastException e) { useCollectionClass(concreteClass); } }
/** * INTERNAL: * Not sure were this is used, MW? */ public void useMapClassName(String concreteClassName, String methodName) { // the reference class has to be specified before coming here if (getReferenceClassName() == null) { throw DescriptorException.referenceClassNotSpecified(this); } MapContainerPolicy policy = new MapContainerPolicy(concreteClassName); policy.setKeyName(methodName, getReferenceClass().getName()); setContainerPolicy(policy); }
/** * INTERNAL: * Not sure were this is used, MW? */ public void useMapClassName(String concreteClassName, String methodName) { // the reference class has to be specified before coming here if (getReferenceClassName() == null) { throw DescriptorException.referenceClassNotSpecified(this); } MapContainerPolicy policy = new MapContainerPolicy(concreteClassName); policy.setKeyName(methodName, getReferenceClass().getName()); setContainerPolicy(policy); }
/** * 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 * <code>java.util.SortedSet</code> interface. */ public void useSortedSetClass(Class concreteClass, Comparator comparator) { try { SortedCollectionContainerPolicy policy = (SortedCollectionContainerPolicy)ContainerPolicy.buildPolicyFor(concreteClass); policy.setComparator(comparator); setContainerPolicy(policy); } catch (ClassCastException e) { useCollectionClass(concreteClass); } }
/** * 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 * <code>java.util.SortedSet</code> interface. */ public void useSortedSetClass(Class concreteClass, Comparator comparator) { try { SortedCollectionContainerPolicy policy = (SortedCollectionContainerPolicy)ContainerPolicy.buildPolicyFor(concreteClass); policy.setComparator(comparator); setContainerPolicy(policy); } catch (ClassCastException e) { useCollectionClass(concreteClass); } }
/** * INTERNAL: * Not sure were this is used, MW? */ public void useMapClassName(String concreteClassName, String methodName) { // the reference class has to be specified before coming here if (getReferenceClassName() == null) { throw DescriptorException.referenceClassNotSpecified(this); } MapContainerPolicy policy = new MapContainerPolicy(concreteClassName); policy.setKeyName(methodName, getReferenceClass().getName()); setContainerPolicy(policy); }
/** * PUBLIC: * Configure the mapping to use an instance of the specified container class * to hold the target objects. The key used to index a value in the * <code>Map</code> is the value returned by a call to the specified * zero-argument method. * The method must be implemented by the class (or a superclass) of any * value to be inserted into the <code>Map</code>. * <p>The container class must implement (directly or indirectly) the * <code>java.util.Map</code> interface. * <p>To facilitate resolving the method, the mapping's referenceClass * must set before calling this method. */ public void useMapClass(Class concreteClass, String keyName) { // the reference class has to be specified before coming here if (getReferenceClassName() == null) { throw DescriptorException.referenceClassNotSpecified(this); } ContainerPolicy policy = ContainerPolicy.buildPolicyFor(concreteClass); policy.setKeyName(keyName, getReferenceClassName()); setContainerPolicy(policy); }
/** * PUBLIC: * Configure the mapping to use an instance of the specified container class * to hold the target objects. The key used to index a value in the * <code>Map</code> is the value returned by a call to the specified * zero-argument method. * The method must be implemented by the class (or a superclass) of any * value to be inserted into the <code>Map</code>. * <p>The container class must implement (directly or indirectly) the * <code>java.util.Map</code> interface. * <p>To facilitate resolving the method, the mapping's referenceClass * must set before calling this method. */ public void useMapClass(Class concreteClass, String keyName) { // the reference class has to be specified before coming here if (getReferenceClassName() == null) { throw DescriptorException.referenceClassNotSpecified(this); } ContainerPolicy policy = ContainerPolicy.buildPolicyFor(concreteClass); policy.setKeyName(keyName, getReferenceClassName()); setContainerPolicy(policy); }