|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.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
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.
| Field Summary | |
private int |
relativeFieldNumber
Relative field number. |
| 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 |
JDOFieldImplCaching(java.lang.String name,
JDOClass declaringClass)
Constructor. |
| Method Summary | |
JDOArray |
createJDOArray()
Creates and returns a new JDOArray instance. |
protected JDOArray |
createJDOArrayInternal()
Creates and returns a new JDOArray instance. |
JDOCollection |
createJDOCollection()
Creates and returns a new JDOCollection instance. |
protected JDOCollection |
createJDOCollectionInternal()
Creates and returns a new JDOCollection instance. |
JDOMap |
createJDOMap()
Creates and returns a new JDOMap instance. |
protected JDOMap |
createJDOMapInternal()
Creates and returns a new JDOMap instance. |
JDOReference |
createJDOReference()
Creates and returns a new JDOReference instance. |
protected JDOReference |
createJDOReferenceInternal()
Creates and returns a new JDOReference instance. |
JavaField |
getJavaField()
Get the corresponding JavaField representation for this JDOField. |
int |
getPersistenceModifier()
Get the persistence modifier of this JDOField. |
JDORelationship |
getRelationship()
Get the relationship information for this JDOField. |
int |
getRelativeFieldNumber()
Returns the relative field number of this JDOField. |
boolean |
isDefaultFetchGroup()
Determines whether this JDOField is part of the default fetch group or not. |
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. |
(package private) void |
setRelativeFieldNumber(int number)
Sets the relative field number of this JDOField. |
| Methods inherited from class org.apache.jdo.impl.model.jdo.JDOFieldImplDynamic |
getFieldNumber, getMappedByName, getNullValueTreatment, getType, isManaged, isPersistent, isPrimaryKey, isProperty, isRelationship, isSerializable, isTransactional, setDefaultFetchGroup, setEmbedded, setJavaField, 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.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 |
| Field Detail |
private int relativeFieldNumber
| Constructor Detail |
protected JDOFieldImplCaching(java.lang.String name,
JDOClass declaringClass)
| Method Detail |
public int getPersistenceModifier()
getPersistenceModifier in interface JDOFieldgetPersistenceModifier in class JDOFieldImplDynamicPersistenceModifier.NONE,
PersistenceModifier.PERSISTENT,
PersistenceModifier.TRANSACTIONAL, or
PersistenceModifier.POSSIBLY_PERSISTENT.public int getRelativeFieldNumber()
getRelativeFieldNumber in interface JDOFieldgetRelativeFieldNumber in class JDOFieldImplDynamicpublic boolean isDefaultFetchGroup()
isDefaultFetchGroup in interface JDOFieldisDefaultFetchGroup in class JDOFieldImplDynamictrue if the field is part of the default fetch
group, false otherwisepublic boolean isEmbedded()
isEmbedded in interface JDOFieldisEmbedded in class JDOFieldImplDynamictrue if the field is stored as part of the instance;
false otherwisepublic JavaField getJavaField()
getJavaField in interface JDOFieldgetJavaField in class JDOFieldImplDynamicpublic JDORelationship getRelationship()
getRelationship in interface JDOFieldgetRelationship in class JDOFieldImplDynamicnull if
this JDOField is not a relationship
public JDOReference createJDOReference()
throws ModelException
getRelationship() returns the new created instance
this.getRelationship().getDeclaringField() == this
createJDOReference in interface JDOFieldcreateJDOReference in class JDOFieldImplDynamicModelException - if impossible
public JDOCollection createJDOCollection()
throws ModelException
getRelationship() returns the new created instance
this.getRelationship().getDeclaringField() == this
createJDOCollection in interface JDOFieldcreateJDOCollection in class JDOFieldImplDynamicModelException - if impossible
public JDOArray createJDOArray()
throws ModelException
getRelationship() returns the new created instance
this.getRelationship().getDeclaringField() == this
createJDOArray in interface JDOFieldcreateJDOArray in class JDOFieldImplDynamicModelException - if impossible
public JDOMap createJDOMap()
throws ModelException
getRelationship() returns the new created instance
this.getRelationship().getDeclaringField() == this
createJDOMap in interface JDOFieldcreateJDOMap in class JDOFieldImplDynamicModelException - if impossibleprotected JDOReference createJDOReferenceInternal()
createJDOReferenceInternal in class JDOFieldImplDynamicprotected JDOCollection createJDOCollectionInternal()
createJDOCollectionInternal in class JDOFieldImplDynamicprotected JDOArray createJDOArrayInternal()
createJDOArrayInternal in class JDOFieldImplDynamicprotected JDOMap createJDOMapInternal()
createJDOMapInternal in class JDOFieldImplDynamicvoid setRelativeFieldNumber(int number)
number - the relative field number
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||