public class JDOFieldImplDynamic extends JDOMemberImpl implements JDOField
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:
| Type | Property and Description |
|---|---|
boolean |
is
Convenience method to check whether this field represents a property.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Boolean |
defaultFetchGroup
Property defaultFetchGroup.
|
protected java.lang.Boolean |
embedded
Property embedded.
|
protected JavaField |
javaField
Property javaField.
|
protected static I18NHelper |
msg
I18N support
|
protected int |
persistenceModifier
Property persistenceModifier.
|
protected JDORelationship |
relationship
Relationship JDOField<->JDORelationship.
|
| Modifier | Constructor and Description |
|---|---|
protected |
JDOFieldImplDynamic(java.lang.String name,
JDOClass declaringClass)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
int |
getFieldNumber()
Returns the absolute field number of this JDOField.
|
JavaField |
getJavaField()
Get the corresponding JavaField representation for this JDOField.
|
java.lang.String |
getMappedByName()
Get the name of the field specified in a mappedBy attribute in the
metadata.
|
int |
getNullValueTreatment()
Gets the null value treatment indicator of 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.
|
JavaType |
getType()
Get the JavaType representation of the type of the field.
|
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.
|
boolean |
isManaged()
Convenience method to check the persistence modifier from this JDOField.
|
boolean |
isPersistent()
Convenience method to check the persistence modifier from this JDOField.
|
boolean |
isPrimaryKey()
Determines whether this JDOField is a key field or not.
|
boolean |
isProperty()
Convenience method to check whether this field represents a property.
|
boolean |
isRelationship()
Convenience method to check whether this field is a relationship field.
|
boolean |
isSerializable()
Determines whether this JDOField is serializable or not.
|
boolean |
isTransactional()
Convenience method to check the persistence modifier from this JDOField.
|
void |
setDefaultFetchGroup(boolean defaultFetchGroup)
Set whether this JDOField is part of the default fetch group or not.
|
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.
|
void |
setJavaField(JavaField javaField)
Sets the corresponding Java field representation for this JDOField.
|
void |
setMappedByName(java.lang.String mappedByName)
Set the name of the field specified in a mappedBy attribute in the
metadata.
|
void |
setNullValueTreatment(int nullValueTreatment)
Sets the null value treatment indicator for this JDOField.
|
void |
setPersistenceModifier(int persistenceModifier)
Set the persistence modifier for this JDOField.
|
void |
setPrimaryKey(boolean primaryKey)
Set whether this JDOField is a key field or not.
|
void |
setRelationship(JDORelationship relationship)
Set the relationship information for this JDOField.
|
void |
setSerializable(boolean serializable)
Set whether this JDOField is serializable or not.
|
compareTo, equals, getDeclaringClass, getName, hashCode, toStringaddPropertyChangeListener, addVetoableChangeListener, createJDOExtension, firePropertyChange, fireVetoableChange, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDeclaringClass, getNameaddPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListenerisProperty in interface JDOFieldtrue if this field represents a property;
false otherwiseprotected int persistenceModifier
getPersistenceModifier().protected java.lang.Boolean defaultFetchGroup
isDefaultFetchGroup().protected java.lang.Boolean embedded
isEmbedded().protected transient JavaField javaField
protected JDORelationship relationship
protected static final I18NHelper msg
protected JDOFieldImplDynamic(java.lang.String name,
JDOClass declaringClass)
public int getPersistenceModifier()
getPersistenceModifier in interface JDOFieldPersistenceModifier.NONE,
PersistenceModifier.PERSISTENT,
PersistenceModifier.TRANSACTIONAL, or
PersistenceModifier.POSSIBLY_PERSISTENT.public void setPersistenceModifier(int persistenceModifier)
throws ModelException
setPersistenceModifier in interface JDOFieldpersistenceModifier - an integer indicating the persistence
modifier, one of: PersistenceModifier.UNSPECIFIED,
PersistenceModifier.NONE,
PersistenceModifier.PERSISTENT,
PersistenceModifier.TRANSACTIONAL, or
PersistenceModifier.POSSIBLY_PERSISTENT.ModelException - if impossiblepublic boolean isPrimaryKey()
isPrimaryKey in interface JDOFieldtrue if the field is a key field,
false otherwisepublic void setPrimaryKey(boolean primaryKey)
setPrimaryKey in interface JDOFieldprimaryKey - if true, the JDOField is marked
as a key field; otherwise, it is notpublic int getNullValueTreatment()
getNullValueTreatment in interface JDOFieldNullValueTreatment.NONE, NullValueTreatment.EXCEPTION or
NullValueTreatment.DEFAULTpublic void setNullValueTreatment(int nullValueTreatment)
setNullValueTreatment in interface JDOFieldnullValueTreatment - an integer indicating the null
value treatment, one of: NullValueTreatment.NONE,
NullValueTreatment.EXCEPTION or
NullValueTreatment.DEFAULTpublic boolean isDefaultFetchGroup()
isDefaultFetchGroup in interface JDOFieldtrue if the field is part of the default fetch
group, false otherwisepublic void setDefaultFetchGroup(boolean defaultFetchGroup)
setDefaultFetchGroup in interface JDOFielddefaultFetchGroup - if true, the JDOField is marked
as beeing part of the default fetch group; otherwise, it is notpublic boolean isEmbedded()
isEmbedded in interface JDOFieldtrue if the field is stored as part of the instance;
false otherwisepublic void setEmbedded(boolean embedded)
setEmbedded in interface JDOFieldembedded - true if the field is stored as part of the
instance; false otherwisepublic JavaField getJavaField()
getJavaField in interface JDOFieldpublic void setJavaField(JavaField javaField) throws ModelException
setJavaField in interface JDOFieldjavaField - the corresponding Java field representationModelException - if impossiblepublic boolean isSerializable()
isSerializable in interface JDOFieldtrue if the field is serializable,
false otherwisepublic void setSerializable(boolean serializable)
throws ModelException
setSerializable in interface JDOFieldserializable - if true, the JDOField is serializable;
otherwise, it is notModelException - if impossiblepublic java.lang.String getMappedByName()
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.getMappedByName in interface JDOFieldnull
otherwise.public void setMappedByName(java.lang.String mappedByName)
throws ModelException
setMappedByName in interface JDOFieldmappedByName - the mappedBy field name.ModelException - if impossiblepublic JDORelationship getRelationship()
getRelationship in interface JDOFieldnull if
this JDOField is not a relationshippublic void setRelationship(JDORelationship relationship) throws ModelException
setRelationship in interface JDOFieldrelationship - the JDORelationship instanceModelException - if impossiblepublic JDOReference createJDOReference() throws ModelException
getRelationship() returns the new created instance
this.getRelationship().getDeclaringField() == this
createJDOReference in interface JDOFieldModelException - if impossiblepublic JDOCollection createJDOCollection() throws ModelException
getRelationship() returns the new created instance
this.getRelationship().getDeclaringField() == this
createJDOCollection in interface JDOFieldModelException - if impossiblepublic JDOArray createJDOArray() throws ModelException
getRelationship() returns the new created instance
this.getRelationship().getDeclaringField() == this
createJDOArray in interface JDOFieldModelException - if impossiblepublic JDOMap createJDOMap() throws ModelException
getRelationship() returns the new created instance
this.getRelationship().getDeclaringField() == this
createJDOMap in interface JDOFieldModelException - if impossiblepublic boolean isPersistent()
isPersistent in interface JDOFieldtrue if this field has the
PersistenceModifier.PERSISTENT modifier; false
otherwisepublic boolean isTransactional()
isTransactional in interface JDOFieldtrue if this field has the
PersistenceModifier.TRANSACTIONAL modifier; false
otherwisepublic boolean isManaged()
PersistenceModifier.PERSISTENT or
PersistenceModifier.TRANSACTIONAL.public boolean isRelationship()
isRelationship in interface JDOFieldtrue if this field is a relationship;
false otherwisepublic boolean isProperty()
isProperty in interface JDOFieldtrue if this field represents a property;
false otherwisepublic JavaType getType()
public int getFieldNumber()
getFieldNumber in interface JDOFieldpublic int getRelativeFieldNumber()
getRelativeFieldNumber in interface JDOFieldprotected JDOReference createJDOReferenceInternal()
protected JDOCollection createJDOCollectionInternal()
protected JDOArray createJDOArrayInternal()
protected JDOMap createJDOMapInternal()
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.