public interface JDOField extends JDOMember
Type | Property and Description |
---|---|
boolean |
is
Convenience method to check whether this field represents a property.
|
Modifier and Type | Method and Description |
---|---|
JDOArray |
createJDOArray()
Creates and returns a new JDOArray instance.
|
JDOCollection |
createJDOCollection()
Creates and returns a new JDOCollection instance.
|
JDOMap |
createJDOMap()
Creates and returns a new JDOMap instance.
|
JDOReference |
createJDOReference()
Creates and returns a new JDOReference instance.
|
int |
getFieldNumber()
Returns the absolute field number of this JDOField.
|
JavaField |
getJavaField()
Get the corresponding Java field 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 nullValueTreament)
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.
|
getDeclaringClass, getName
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener
true
if this field represents a property;
false
otherwiseint getPersistenceModifier()
PersistenceModifier.UNSPECIFIED
,
PersistenceModifier.NONE
,
PersistenceModifier.PERSISTENT
,
PersistenceModifier.TRANSACTIONAL
,
PersistenceModifier.POSSIBLY_PERSISTENT
.void setPersistenceModifier(int persistenceModifier) throws ModelException
persistenceModifier
- an integer indicating the persistence
modifier, one of: PersistenceModifier.UNSPECIFIED
,
PersistenceModifier.NONE
,
PersistenceModifier.PERSISTENT
,
PersistenceModifier.TRANSACTIONAL
,
PersistenceModifier.POSSIBLY_PERSISTENT
.ModelException
- if impossibleboolean isPrimaryKey()
true
if the field is a key field,
false
otherwisevoid setPrimaryKey(boolean primaryKey) throws ModelException
primaryKey
- if true
, the JDOField is marked
as a key field; otherwise, it is notModelException
- if impossibleint getNullValueTreatment()
NullValueTreatment.NONE
, NullValueTreatment.EXCEPTION
or
NullValueTreatment.DEFAULT
void setNullValueTreatment(int nullValueTreament) throws ModelException
nullValueTreament
- an integer indicating the null value treatment,
one of: NullValueTreatment.NONE
,
NullValueTreatment.EXCEPTION
or
NullValueTreatment.DEFAULT
ModelException
- if impossibleboolean isDefaultFetchGroup()
true
if the field is part of the default fetch
group, false
otherwisevoid setDefaultFetchGroup(boolean defaultFetchGroup) throws ModelException
defaultFetchGroup
- if true
, the JDOField is marked
as beeing part of the default fetch group; otherwise, it is notModelException
- if impossibleboolean isEmbedded()
true
if the field is stored as part of the instance;
false
otherwisevoid setEmbedded(boolean embedded) throws ModelException
embedded
- true
if the field is stored as part of the
instance; false
otherwiseModelException
- if impossibleboolean isSerializable()
true
if the field is serializable,
false
otherwisevoid setSerializable(boolean serializable) throws ModelException
serializable
- if true
, the JDOField is serializable;
otherwise, it is notModelException
- if impossiblejava.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.null
otherwise.void setMappedByName(java.lang.String mappedByName) throws ModelException
mappedByName
- the mappedBy field name.ModelException
- if impossibleJavaField getJavaField()
void setJavaField(JavaField javaField) throws ModelException
javaField
- the corresponding Java field representationModelException
- if impossibleJDORelationship getRelationship()
null
if
this JDOField is not a relationshipvoid setRelationship(JDORelationship relationship) throws ModelException
relationship
- the JDORelationship instanceModelException
- if impossibleJDOReference createJDOReference() throws ModelException
getRelationship()
returns the new created instance
this.getRelationship().getDeclaringField() == this
ModelException
- if impossibleJDOCollection createJDOCollection() throws ModelException
getRelationship()
returns the new created instance
this.getRelationship().getDeclaringField() == this
ModelException
- if impossibleJDOArray createJDOArray() throws ModelException
getRelationship()
returns the new created instance
this.getRelationship().getDeclaringField() == this
ModelException
- if impossibleJDOMap createJDOMap() throws ModelException
getRelationship()
returns the new created instance
this.getRelationship().getDeclaringField() == this
ModelException
- if impossibleboolean isPersistent()
true
if this field has the
PersistenceModifier.PERSISTENT
modifier; false
otherwiseboolean isTransactional()
true
if this field has the
PersistenceModifier.TRANSACTIONAL
modifier; false
otherwiseboolean isManaged()
PersistenceModifier.PERSISTENT
or
PersistenceModifier.TRANSACTIONAL
.true
if this field is a managed field;
false
otherwiseboolean isRelationship()
true
if this field is a relationship;
false
otherwiseboolean isProperty()
true
if this field represents a property;
false
otherwiseJavaType getType()
int getFieldNumber()
int getRelativeFieldNumber()
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.