Save This Page
Home » jdo2-model-2.3-ea-src » org.apache.jdo.impl.model.jdo.caching » [javadoc | source]
org.apache.jdo.impl.model.jdo.caching
public class: JDOClassImplCaching [javadoc | source]
java.lang.Object
   org.apache.jdo.impl.model.jdo.JDOElementImpl
      org.apache.jdo.impl.model.jdo.JDOMemberImpl
         org.apache.jdo.impl.model.jdo.JDOClassImplDynamic
            org.apache.jdo.impl.model.jdo.caching.JDOClassImplCaching

All Implemented Interfaces:
    JDOClass, JDOMember, JDOElement

An instance of this class represents the JDO metadata of a persistence capable class. This caching implementation caches any calulated value to avoid re-calculating it if it is requested again.
Fields inherited from org.apache.jdo.impl.model.jdo.JDOClassImplDynamic:
shortName,  identityType,  objectIdClass,  pcSuperclass,  javaType,  msg
Constructor:
 protected JDOClassImplCaching(String name) 
    Constructor.
 protected JDOClassImplCaching(String name,
    JDOClass declaringClass) 
    Constructor for inner classes.
Method from org.apache.jdo.impl.model.jdo.caching.JDOClassImplCaching Summary:
calculateFieldNumbers,   createJDOField,   getDeclaredManagedFields,   getDefaultFetchGroupFields,   getIdentityType,   getInheritedManagedFieldCount,   getJavaType,   getManagedFieldNumbers,   getManagedFields,   getObjectIdClass,   getPersistenceCapableSuperclass,   getPersistentFieldNumbers,   getPersistentFields,   getPersistentNonPrimaryKeyFieldNumbers,   getPersistentRelationshipFieldNumbers,   getPersistentRelationshipFields,   getPersistentSerializableFieldNumbers,   getPrimaryKeyFieldNumbers,   getPrimaryKeyFields,   getShortName,   newJDOClassInstance,   newJDOFieldInstance,   newJDOPropertyInstance,   newJDOPropertyInstance,   removeDeclaredMember
Methods from org.apache.jdo.impl.model.jdo.JDOClassImplDynamic:
createJDOClass,   createJDOField,   createJDOProperty,   createJDOProperty,   getAssociatedProperty,   getAssociatedProperty,   getDeclaredClasses,   getDeclaredField,   getDeclaredFields,   getDeclaredManagedFieldCount,   getDeclaredManagedFields,   getDeclaredMembers,   getDeclaredObjectIdClassName,   getDeclaredPrimaryKeyFields,   getDeclaringModel,   getDefaultFetchGroupFields,   getField,   getField,   getFieldInternal,   getIdentityType,   getInheritedManagedFieldCount,   getJDOPackage,   getJavaType,   getManagedField,   getManagedFieldCount,   getManagedFieldNumbers,   getManagedFields,   getObjectIdClass,   getPackagePrefix,   getPersistenceCapableRootClass,   getPersistenceCapableSuperclass,   getPersistenceCapableSuperclassName,   getPersistentFieldNumbers,   getPersistentFields,   getPersistentNonPrimaryKeyFieldNumbers,   getPersistentRelationshipFieldNumbers,   getPersistentRelationshipFields,   getPersistentSerializableFieldNumbers,   getPrimaryKeyFieldNumbers,   getPrimaryKeyFields,   getShortName,   isXMLMetadataLoaded,   newJDOClassInstance,   newJDOFieldInstance,   newJDOPropertyInstance,   newJDOPropertyInstance,   removeDeclaredMember,   requiresExtent,   setDeclaredObjectIdClassName,   setDeclaringModel,   setIdentityType,   setJDOPackage,   setJavaType,   setObjectIdClass,   setPersistenceCapableSuperclass,   setPersistenceCapableSuperclassName,   setRequiresExtent,   setShortName,   setXMLMetadataLoaded
Methods from org.apache.jdo.impl.model.jdo.JDOMemberImpl:
compareTo,   equals,   getDeclaringClass,   getName,   hashCode,   toString
Methods from org.apache.jdo.impl.model.jdo.JDOElementImpl:
addPropertyChangeListener,   addVetoableChangeListener,   createJDOExtension,   firePropertyChange,   fireVetoableChange,   getJDOExtensions,   removeJDOExtension,   removePropertyChangeListener,   removeVetoableChangeListener
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jdo.impl.model.jdo.caching.JDOClassImplCaching Detail:
 protected  void calculateFieldNumbers() 
    This method calculates the relative field number of the declared managed fields of this JDOClass and uddates the relativeFieldNumber property of the JDOField instance.
 public JDOField createJDOField(String name) throws ModelException 
    This method returns a JDOField instance for the field with the specified name. If this JDOClass already declares such a field, the existing JDOField instance is returned. Otherwise, it creates a new JDOField instance, sets its declaringClass and returns the new instance.

    Note, if the field numbers for the managed fields of this JDOClass are calculated, this methid will fail to create a new JDOField. Any new field would possibly invalidate existing field number

 public JDOField[] getDeclaredManagedFields() 
 public JDOField[] getDefaultFetchGroupFields() 
    Returns the collection of default fetch group fields of this JDOClass in the form of an array. The method returns the JDOField instances defined as part of the default fetch group (method JDOField#isDefaultFetchGroup returns true.
 public int getIdentityType() 
    Get the JDO identity type of this JDOClass. The identity type of the least-derived persistence-capable class defines the identity type for all persistence-capable classes that extend it. The identity type of the least-derived persistence-capable class is defaulted to JDOIdentityType#APPLICATION if objectid-class is specified, and JDOIdentityType#DATASTORE , if not.
 public synchronized int getInheritedManagedFieldCount() 
    Returns the number of inherited managed fields for this class.
 public JavaType getJavaType() 
    Provides the JavaType representaion corresponding to this JDOClass.

    Note the difference between Object.getClass() and this method. The former returns the class of the object in hand, this returns the class of the object represented by this meta data.

 public int[] getManagedFieldNumbers() 
 public JDOField[] getManagedFields() 
 public JavaType getObjectIdClass() 
    Get the JavaType representation of the object identity class (primary key class) for this JDOClass.
 public JDOClass getPersistenceCapableSuperclass() 
    Returns the JDOClass instance for the persistence-capable superclass of this JDOClass. If this class does not have a persistence-capable superclass then null is returned.
 public int[] getPersistentFieldNumbers() 
 public JDOField[] getPersistentFields() 
    Returns the collection of persistent JDOField instances of this JDOClass in the form of an array. The returned array includes inherited fields. A field is a persistent field, if it has the persistence-modifier org.apache.jdo.model.jdo.PersistenceModifier#PERSISTENT . Please note, the position of the fields in the returned array might not equal their absolute field number as returned by JDOField#getFieldNumber() .
 public int[] getPersistentNonPrimaryKeyFieldNumbers() 
 public int[] getPersistentRelationshipFieldNumbers() 
 public JDOField[] getPersistentRelationshipFields() 
 public int[] getPersistentSerializableFieldNumbers() 
 public int[] getPrimaryKeyFieldNumbers() 
    Returns an array of absolute field numbers of the identifying fields of this JDOClass. A field number is included in the returned array, iff the corresponding JDOField instance is defined as primary key field (see JDOField#isPrimaryKey ).
 public JDOField[] getPrimaryKeyFields() 
    Returns the collection of identifying fields of this JDOClass in the form of an array. The method returns the JDOField instances defined as primary key fields (see JDOField#isPrimaryKey ).
 public String getShortName() 
    Get the short name of this JDOClass. The short name defaults to the unqualified class name, if not explicitly set by method #setShortName(String shortName) .
 protected JDOClass newJDOClassInstance(String name) 
    Returns a new instance of the JDOClass implementation class.
 protected JDOField newJDOFieldInstance(String name) 
    Returns a new instance of the JDOField implementation class.
 protected JDOProperty newJDOPropertyInstance(String name) 
    Returns a new instance of the JDOProperty implementation class.
 protected JDOProperty newJDOPropertyInstance(String name,
    JDOField associatedJDOField) throws ModelException 
    Returns a new instance of the JDOProperty implementation class.
 public  void removeDeclaredMember(JDOMember member) throws ModelException 
    Remove the supplied member from the collection of members maintained by this JDOClass.