Save This Page
Home » jdo2-model-2.3-ea-src » org.apache.jdo.model.jdo » [javadoc | source]
org.apache.jdo.model.jdo
public interface: JDOField [javadoc | source]

All Implemented Interfaces:
    JDOMember

All Known Implementing Classes:
    JDOAssociatedPropertyImplCaching, JDOAssociatedPropertyImplDynamic, JDOPropertyImplCaching, JDOFieldImplDynamic, JDOPropertyImplDynamic, JDOFieldImplCaching, JDOProperty

A JDOField instance represents the JDO metadata of a managed field of a persistence-capable class.
Method from org.apache.jdo.model.jdo.JDOField Summary:
createJDOArray,   createJDOCollection,   createJDOMap,   createJDOReference,   getFieldNumber,   getJavaField,   getMappedByName,   getNullValueTreatment,   getPersistenceModifier,   getRelationship,   getRelativeFieldNumber,   getType,   isDefaultFetchGroup,   isEmbedded,   isManaged,   isPersistent,   isPrimaryKey,   isProperty,   isRelationship,   isSerializable,   isTransactional,   setDefaultFetchGroup,   setEmbedded,   setJavaField,   setMappedByName,   setNullValueTreatment,   setPersistenceModifier,   setPrimaryKey,   setRelationship,   setSerializable
Method from org.apache.jdo.model.jdo.JDOField 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
 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
 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
 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
 public int getFieldNumber()
    Returns the absolute field number of this JDOField.
 public JavaField getJavaField()
    Get the corresponding Java field 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.
 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) throws ModelException
    Set whether this JDOField is part of the default fetch group or not.
 public  void setEmbedded(boolean embedded) throws ModelException
    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 nullValueTreament) throws ModelException
    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) throws ModelException
    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.