/** * INTERNAL: */ public String toString() { return Helper.getShortClassName(getClass()) + "(" + getDescriptor() + ")"; }
/** * INTERNAL: * all tables for reference class plus childrenTables */ public Vector getAllTables() { if (allTables == null) { return this.getDescriptor().getTables(); } else { return allTables; } }
/** * INTERNAL: */ public String toString() { return Helper.getShortClassName(getClass()) + "(" + getDescriptor() + ")"; }
/** * INTERNAL: * Returns descriptor corresponding to the class owning the policy or its subclass - otherwise null. */ public ClassDescriptor getDescriptor(Class theClass) { if(getDescriptor().getJavaClass().equals(theClass)) { return getDescriptor(); } else { return getSubclassDescriptor(theClass); } }
/** * INTERNAL: * all tables for reference class plus childrenTables */ public Vector getAllTables() { if (allTables == null) { return this.getDescriptor().getTables(); } else { return allTables; } }
/** * INTERNAL: * Returns descriptor corresponding to the class owning the policy or its subclass - otherwise null. */ public ClassDescriptor getDescriptor(Class theClass) { if(getDescriptor().getJavaClass().equals(theClass)) { return getDescriptor(); } else { return getSubclassDescriptor(theClass); } }
/** * INTERNAL: */ public String toString() { return Helper.getShortClassName(getClass()) + "(" + getDescriptor() + ")"; }
/** * INTERNAL: * Returns descriptor corresponding to the class owning the policy or its subclass - otherwise null. */ public ClassDescriptor getDescriptor(Class theClass) { if(getDescriptor().getJavaClass().equals(theClass)) { return getDescriptor(); } else { return getSubclassDescriptor(theClass); } }
/** * INTERNAL: * Returns value of the abstract class indicator for the Java class. */ protected Object getClassIndicatorValue() { return getClassIndicatorValue(getDescriptor().getJavaClass()); }
/** * INTERNAL: * Potentially override the optimistic locking behavior */ protected void initializeOptimisticLocking(){ // CR#3214106, do not override if specified in subclass. if (!getDescriptor().usesOptimisticLocking() && getParentDescriptor().usesOptimisticLocking()) { getDescriptor().setOptimisticLockingPolicy((OptimisticLockingPolicy)getParentDescriptor().getOptimisticLockingPolicy().clone()); getDescriptor().getOptimisticLockingPolicy().setDescriptor(getDescriptor()); } }
/** * INTERNAL: * Returns value of the abstract class indicator for the Java class. */ protected Object getClassIndicatorValue() { return getClassIndicatorValue(getDescriptor().getJavaClass()); }
/** * INTERNAL: * Returns value of the abstract class indicator for the Java class. */ protected Object getClassIndicatorValue() { return getClassIndicatorValue(getDescriptor().getJavaClass()); }
/** * INTERNAL: * Potentially override the optimistic locking behavior */ protected void initializeOptimisticLocking(){ // CR#3214106, do not override if specified in subclass. if (!getDescriptor().usesOptimisticLocking() && getParentDescriptor().usesOptimisticLocking()) { getDescriptor().setOptimisticLockingPolicy((OptimisticLockingPolicy)getParentDescriptor().getOptimisticLockingPolicy().clone()); getDescriptor().getOptimisticLockingPolicy().setDescriptor(getDescriptor()); } }
/** * INTERNAL: * Potentially override the optimistic locking behavior */ protected void initializeOptimisticLocking(){ // CR#3214106, do not override if specified in subclass. if (!getDescriptor().usesOptimisticLocking() && getParentDescriptor().usesOptimisticLocking()) { getDescriptor().setOptimisticLockingPolicy((OptimisticLockingPolicy)getParentDescriptor().getOptimisticLockingPolicy().clone()); getDescriptor().getOptimisticLockingPolicy().setDescriptor(getDescriptor()); } }
/** * INTERNAL: * Potentially override the cache invalidation behavior */ protected void initializeCacheInvalidationPolicy() { CacheInvalidationPolicy parentPolicyClone = (CacheInvalidationPolicy)getParentDescriptor().getCacheInvalidationPolicy().clone(); getDescriptor().setCacheInvalidationPolicy(parentPolicyClone); }
/** * INTERNAL: * Return the root parent descriptor */ public ClassDescriptor getRootParentDescriptor() { if (this.rootParentDescriptor == null) { if (isRootParentDescriptor()) { this.rootParentDescriptor = getDescriptor(); } else { this.rootParentDescriptor = getParentDescriptor().getInheritancePolicy().getRootParentDescriptor(); } } return rootParentDescriptor; }
/** * INTERNAL: * Potentially override the cache invalidation behavior */ protected void initializeCacheInvalidationPolicy() { CacheInvalidationPolicy parentPolicyClone = (CacheInvalidationPolicy)getParentDescriptor().getCacheInvalidationPolicy().clone(); getDescriptor().setCacheInvalidationPolicy(parentPolicyClone); }
/** * INTERNAL: * Post initialize the child descriptors */ protected void addClassIndicatorTypeToParent(Object indicator) { ClassDescriptor parentDescriptor = getDescriptor().getInheritancePolicy().getParentDescriptor(); if (parentDescriptor.getInheritancePolicy().isChildDescriptor()) { if (parentDescriptor.getInheritancePolicy().shouldReadSubclasses()) { parentDescriptor.getInheritancePolicy().getAllChildClassIndicators().addElement(indicator); } parentDescriptor.getInheritancePolicy().addClassIndicatorTypeToParent(indicator); } }
/** * INTERNAL: * Setup the default classExtractionMethod, or if one was specified by the user make sure it is valid. */ protected void initializeClassExtractor(AbstractSession session) throws DescriptorException { if (getClassExtractor() == null) { if (isChildDescriptor()) { setClassExtractor(getParentDescriptor().getInheritancePolicy().getClassExtractor()); } } else { getClassExtractor().initialize(getDescriptor(), session); } }
/** * INTERNAL: * Setup the default classExtractionMethod, or if one was specified by the user make sure it is valid. */ protected void initializeClassExtractor(AbstractSession session) throws DescriptorException { if (getClassExtractor() == null) { if (isChildDescriptor()) { setClassExtractor(getParentDescriptor().getInheritancePolicy().getClassExtractor()); } } else { getClassExtractor().initialize(getDescriptor(), session); } }