Save This Page
Home » jdo2-model-2.3-ea-src » org.apache.jdo.impl.model.jdo » [javadoc | source]
org.apache.jdo.impl.model.jdo
public class: JDOFieldImplDynamic [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

All Implemented Interfaces:
    JDOField, JDOMember, JDOElement

Direct Known Subclasses:
    JDOPropertyImplCaching, JDOPropertyImplDynamic, JDOFieldImplCaching

An instance of this class represents the JDO metadata of a managed field of a persistence capable class. This dynamic implementation only stores property values explicitly set by setter method.

Please note, you cannot rely on the Java identity of the JDORelationship instance returned by #getRelationship . The getter will always return a new Java Instance, unless the relationship is explicitly set by the setter #setRelationship(JDORelationship relationship) .

TBD:

Field Summary
protected  int persistenceModifier    Property persistenceModifier. Default see #getPersistenceModifier
protected  Boolean defaultFetchGroup    Property defaultFetchGroup. Default see #isDefaultFetchGroup
protected  Boolean embedded    Property embedded. Default see #isEmbedded
protected transient  JavaField javaField    Property javaField. No default. 
protected  JDORelationship relationship    Relationship JDOField<->JDORelationship. 
protected static final  I18NHelper msg    I18N support 
Constructor:
 protected JDOFieldImplDynamic(String name,
    JDOClass declaringClass) 
    Constructor.
Method from org.apache.jdo.impl.model.jdo.JDOFieldImplDynamic Summary:
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.JDOFieldImplDynamic Detail:
 public JDOArray createJDOArray() throws ModelException 
    Creates and returns a new JDOArray instance. This method automatically binds the new JDOArray to this JDOField. 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 declaring 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. 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 declaring 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. 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 declaring 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. 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 int getFieldNumber() 
    Returns the absolute field number of this JDOField.
 public JavaField getJavaField() 
    Get the corresponding JavaField representation for this JDOField.
 public String getMappedByName() 
    Get the name of the field specified in a mappedBy attribute in the metadata. The method returns null if the metadata for this field does not specify the mappedBy attribute. Note that this can be provided at the field level to help population of the model, but should only be specified on a field that has a corresponding relationship.
 public int getNullValueTreatment() 
    Gets the null value treatment indicator of 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 JavaType getType() 
    Get the JavaType representation of the type of the field.
 UnresolvedRelationshipHelper getUnresolvedRelationshipHelper() 
    Returns the UnresolvedRelationshipHelper instance from the declaring JDOModel instacne of the declaring JDOClass.
 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.
 public boolean isManaged() 
 public boolean isPersistent() 
    Convenience method to check the persistence modifier from this JDOField.
 public boolean isPrimaryKey() 
    Determines whether this JDOField is a key field or not.
 public boolean isProperty() 
    Convenience method to check whether this field represents a property.
 public boolean isRelationship() 
    Convenience method to check whether this field is a relationship field.
 public boolean isSerializable() 
    Determines whether this JDOField is serializable or not.
 public boolean isTransactional() 
    Convenience method to check the persistence modifier from this JDOField.
 public  void setDefaultFetchGroup(boolean defaultFetchGroup) 
    Set whether this JDOField is part of the default fetch group or not.
 public  void setEmbedded(boolean embedded) 
    Set whether the field should be stored if possible as part of the instance instead of as its own instance in the datastore.
 public  void setJavaField(JavaField javaField) throws ModelException 
    Sets the corresponding Java field representation for this JDOField.
 public  void setMappedByName(String mappedByName) throws ModelException 
    Set the name of the field specified in a mappedBy attribute in the metadata. Note that this can be provided at the field level to help population of the model, but should only be specified on a field that has a corresponding relationship.
 public  void setNullValueTreatment(int nullValueTreatment) 
    Sets the null value treatment indicator for this JDOField.
 public  void setPersistenceModifier(int persistenceModifier) throws ModelException 
    Set the persistence modifier for this JDOField.
 public  void setPrimaryKey(boolean primaryKey) 
    Set whether this JDOField is a key field or not.
 public  void setRelationship(JDORelationship relationship) throws ModelException 
    Set the relationship information for this JDOField.
 public  void setSerializable(boolean serializable) throws ModelException 
    Set whether this JDOField is serializable or not.