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: JDOFieldImplCaching [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.JDOFieldImplDynamic
            org.apache.jdo.impl.model.jdo.caching.JDOFieldImplCaching

All Implemented Interfaces:
    JDOField, JDOMember, JDOElement

Direct Known Subclasses:
    JDOPropertyImplCaching

An instance of this class represents the JDO metadata of a managed field of a persistence capable class. This caching implementation caches any calulated value to avoid re-calculating it if it is requested again.

Please note, this implementation does not support changing the relationship property once it is defined (either explicitly by the setter or internally calculated by the getter). The second attempt to define the relationship will result in an exception.

Fields inherited from org.apache.jdo.impl.model.jdo.JDOFieldImplDynamic:
persistenceModifier,  defaultFetchGroup,  embedded,  javaField,  relationship,  msg
Constructor:
 protected JDOFieldImplCaching(String name,
    JDOClass declaringClass) 
    Constructor.
Method from org.apache.jdo.impl.model.jdo.caching.JDOFieldImplCaching Summary:
createJDOArray,   createJDOArrayInternal,   createJDOCollection,   createJDOCollectionInternal,   createJDOMap,   createJDOMapInternal,   createJDOReference,   createJDOReferenceInternal,   getJavaField,   getPersistenceModifier,   getRelationship,   getRelativeFieldNumber,   isDefaultFetchGroup,   isEmbedded,   setRelativeFieldNumber
Methods from org.apache.jdo.impl.model.jdo.JDOFieldImplDynamic:
createJDOArray,   createJDOArrayInternal,   createJDOCollection,   createJDOCollectionInternal,   createJDOMap,   createJDOMapInternal,   createJDOReference,   createJDOReferenceInternal,   getFieldNumber,   getJavaField,   getMappedByName,   getNullValueTreatment,   getPersistenceModifier,   getRelationship,   getRelativeFieldNumber,   getType,   getUnresolvedRelationshipHelper,   isDefaultFetchGroup,   isEmbedded,   isManaged,   isPersistent,   isPrimaryKey,   isProperty,   isRelationship,   isSerializable,   isTransactional,   setDefaultFetchGroup,   setEmbedded,   setJavaField,   setMappedByName,   setNullValueTreatment,   setPersistenceModifier,   setPrimaryKey,   setRelationship,   setSerializable
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.JDOFieldImplCaching Detail:
 public JDOArray createJDOArray() throws ModelException 
    Creates and returns a new JDOArray instance. This method automatically binds the new JDOArray to this JDOField. It throws a ModelException, if this JDOField is already bound to another JDORelationship instance. Otherwise the following holds true:
    • Method #getRelationship returns the new created instance
    • this.getRelationship().getDeclaringField() == this
 protected JDOArray createJDOArrayInternal() 
    Creates and returns a new JDOArray instance. This method automatically this JDOField as the declarinmg field of the returned instance.
 public JDOCollection createJDOCollection() throws ModelException 
    Creates and returns a new JDOCollection instance. This method automatically binds the new JDOCollection to this JDOField. It throws a ModelException, if this JDOField is already bound to another JDORelationship instance. Otherwise the following holds true:
    • Method #getRelationship returns the new created instance
    • this.getRelationship().getDeclaringField() == this
 protected JDOCollection createJDOCollectionInternal() 
    Creates and returns a new JDOCollection instance. This method automatically this JDOField as the declarinmg field of the returned instance.
 public JDOMap createJDOMap() throws ModelException 
    Creates and returns a new JDOMap instance. This method automatically binds the new JDOMap to this JDOField. It throws a ModelException, if this JDOField is already bound to another JDORelationship instance. Otherwise the following holds true:
    • Method #getRelationship returns the new created instance
    • this.getRelationship().getDeclaringField() == this
 protected JDOMap createJDOMapInternal() 
    Creates and returns a new JDOMap instance. This method automatically this JDOField as the declarinmg field of the returned instance.
 public JDOReference createJDOReference() throws ModelException 
    Creates and returns a new JDOReference instance. This method automatically binds the new JDOReference to this JDOField. It throws a ModelException, if this JDOField is already bound to another JDORelationship instance. Otherwise the following holds true:
    • Method #getRelationship returns the new created instance
    • this.getRelationship().getDeclaringField() == this
 protected JDOReference createJDOReferenceInternal() 
    Creates and returns a new JDOReference instance. This method automatically sets this JDOField as the declaring field of the returned instance.
 public JavaField getJavaField() 
    Get the corresponding JavaField representation for this JDOField.
 public int getPersistenceModifier() 
    Get the persistence modifier of this JDOField.
 public JDORelationship getRelationship() 
    Get the relationship information for this JDOField. The method returns null if the field is not part of a relationship (e.g. it is a primitive type field).
 public int getRelativeFieldNumber() 
    Returns the relative field number of this JDOField.
 public boolean isDefaultFetchGroup() 
    Determines whether this JDOField is part of the default fetch group or not.
 public boolean isEmbedded() 
    Determines whether the field should be stored if possible as part of the instance instead of as its own instance in the datastore.
  void setRelativeFieldNumber(int number) 
    Sets the relative field number of this JDOField.