org.apache.jdo.impl.model.jdo
Class JDOPropertyImplDynamic

java.lang.Object
  extended byorg.apache.jdo.impl.model.jdo.JDOElementImpl
      extended byorg.apache.jdo.impl.model.jdo.JDOMemberImpl
          extended byorg.apache.jdo.impl.model.jdo.JDOFieldImplDynamic
              extended byorg.apache.jdo.impl.model.jdo.JDOPropertyImplDynamic
All Implemented Interfaces:
java.lang.Comparable, JDOElement, JDOField, JDOMember, JDOProperty

public class JDOPropertyImplDynamic
extends JDOFieldImplDynamic
implements JDOProperty

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

Since:
2.0
Version:
2.0
Author:
Michael Bouschen

Field Summary
 
Fields inherited from class org.apache.jdo.impl.model.jdo.JDOFieldImplDynamic
defaultFetchGroup, embedded, javaField, msg, persistenceModifier, relationship
 
Fields inherited from class org.apache.jdo.impl.model.jdo.JDOMemberImpl
 
Fields inherited from class org.apache.jdo.impl.model.jdo.JDOElementImpl
 
Constructor Summary
protected JDOPropertyImplDynamic(java.lang.String name, JDOClass declaringClass)
          Constructor.
 
Method Summary
 JDOField getAssociatedJDOField()
          Return the JDOField instance associated with this property, if available.
 JavaField getJavaField()
          Get the corresponding JavaField representation for this JDOProperty.
 boolean isProperty()
          Convenience method to check whether this field represents a property.
 void setJavaField(JavaField javaField)
          Sets the corresponding JavaProperty representation for this JDOProperty.
 
Methods inherited from class org.apache.jdo.impl.model.jdo.JDOFieldImplDynamic
createJDOArray, createJDOArrayInternal, createJDOCollection, createJDOCollectionInternal, createJDOMap, createJDOMapInternal, createJDOReference, createJDOReferenceInternal, getFieldNumber, getMappedByName, getNullValueTreatment, getPersistenceModifier, getRelationship, getRelativeFieldNumber, getType, getUnresolvedRelationshipHelper, isDefaultFetchGroup, isEmbedded, isManaged, isPersistent, isPrimaryKey, isRelationship, isSerializable, isTransactional, setDefaultFetchGroup, setEmbedded, setMappedByName, setNullValueTreatment, setPersistenceModifier, setPrimaryKey, setRelationship, setSerializable
 
Methods inherited from class org.apache.jdo.impl.model.jdo.JDOMemberImpl
compareTo, equals, getDeclaringClass, getName, hashCode, toString
 
Methods inherited from class org.apache.jdo.impl.model.jdo.JDOElementImpl
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, firePropertyChange, fireVetoableChange, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jdo.model.jdo.JDOField
createJDOArray, createJDOCollection, createJDOMap, createJDOReference, getFieldNumber, getMappedByName, getNullValueTreatment, getPersistenceModifier, getRelationship, getRelativeFieldNumber, getType, isDefaultFetchGroup, isEmbedded, isManaged, isPersistent, isPrimaryKey, isRelationship, isSerializable, isTransactional, setDefaultFetchGroup, setEmbedded, setMappedByName, setNullValueTreatment, setPersistenceModifier, setPrimaryKey, setRelationship, setSerializable
 
Methods inherited from interface org.apache.jdo.model.jdo.JDOMember
getDeclaringClass, getName
 
Methods inherited from interface org.apache.jdo.model.jdo.JDOElement
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

JDOPropertyImplDynamic

protected JDOPropertyImplDynamic(java.lang.String name,
                                 JDOClass declaringClass)
Constructor.

Method Detail

getJavaField

public JavaField getJavaField()
Get the corresponding JavaField representation for this JDOProperty.

Specified by:
getJavaField in interface JDOField
Overrides:
getJavaField in class JDOFieldImplDynamic
Returns:
the corresponding JavaProperty representation

setJavaField

public void setJavaField(JavaField javaField)
                  throws ModelException
Sets the corresponding JavaProperty representation for this JDOProperty.

Specified by:
setJavaField in interface JDOField
Overrides:
setJavaField in class JDOFieldImplDynamic
Parameters:
javaField - the corresponding JavaProperty representation
Throws:
ModelException - if impossible

isProperty

public boolean isProperty()
Convenience method to check whether this field represents a property.

Specified by:
isProperty in interface JDOField
Overrides:
isProperty in class JDOFieldImplDynamic
Returns:
true if this field represents a property; false otherwise

getAssociatedJDOField

public JDOField getAssociatedJDOField()
Return the JDOField instance associated with this property, if available. If there is no JDOField instance associated, then the method returns null.

This implementation always retruns null.

Specified by:
getAssociatedJDOField in interface JDOProperty
Returns:
associated JDOField instance or null if not available.