|
|||||||||||
| 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.JDOAssociatedPropertyImplDynamic
An instance of this class represents the JDO metadata of a managed property of a persistence capable class. This JDOProperty implementation is used for persistent properties with an associated JDOField. All JDOField getter methods delegate to the associated JDOField, except methods getName, getDeclaringClass and getJavaField. All JDOField setter method throw a ModelException to avoid changing the associated JDOField through this JDOProperty instance. This dynamic implementation only stores values explicitly set by setter method.
| Field Summary | |
private JDOField |
associatedJDOField
The associated JDOField instance. |
protected JavaProperty |
javaProperty
The corresponding JavaProperty instance. |
protected static I18NHelper |
msg
I18N support. |
| 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 |
JDOAssociatedPropertyImplDynamic(java.lang.String name,
JDOClass declaringClass,
JDOField associatedJDOField)
Constrcutor. |
| Method Summary | |
JDOArray |
createJDOArray()
Throws ModelException. |
JDOCollection |
createJDOCollection()
Throws ModelException. |
JDOMap |
createJDOMap()
Throws ModelException. |
JDOReference |
createJDOReference()
Throws ModelException. |
JDOField |
getAssociatedJDOField()
Return the JDOField instance associated with this property, if available. |
int |
getFieldNumber()
Deletegate to associatedJDOField. |
JavaField |
getJavaField()
Get the corresponding JavaProperty representation for this JDOProperty. |
java.lang.String |
getMappedByName()
Deletegate to associatedJDOField. |
int |
getNullValueTreatment()
Deletegate to associatedJDOField. |
int |
getPersistenceModifier()
Deletegate to associatedJDOField. |
JDORelationship |
getRelationship()
Deletegate to associatedJDOField. |
int |
getRelativeFieldNumber()
Deletegate to associatedJDOField. |
JavaType |
getType()
Deletegate to associatedJDOField. |
boolean |
isDefaultFetchGroup()
Deletegate to associatedJDOField. |
boolean |
isEmbedded()
Deletegate to associatedJDOField. |
boolean |
isManaged()
Deletegate to associatedJDOField. |
boolean |
isPersistent()
Deletegate to associatedJDOField. |
boolean |
isPrimaryKey()
Deletegate to associatedJDOField. |
boolean |
isProperty()
Convenience method to check whether this field represents a property. |
boolean |
isRelationship()
Deletegate to associatedJDOField. |
boolean |
isSerializable()
Deletegate to associatedJDOField. |
boolean |
isTransactional()
Deletegate to associatedJDOField. |
void |
setDefaultFetchGroup(boolean defaultFetchGroup)
Throws ModelException. |
void |
setEmbedded(boolean embedded)
Throws ModelException. |
void |
setJavaField(JavaField javaField)
Sets the corresponding JavaProperty representation for this JDOProperty. |
void |
setMappedByName(java.lang.String mappedByName)
Throws ModelException. |
void |
setNullValueTreatment(int nullValueTreament)
Throws ModelException. |
void |
setPersistenceModifier(int persistenceModifier)
Throws ModelException. |
void |
setPrimaryKey(boolean primaryKey)
Throws ModelException. |
void |
setRelationship(JDORelationship relationship)
Throws ModelException. |
void |
setSerializable(boolean serializable)
Throws ModelException. |
| 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 final JDOField associatedJDOField
protected JavaProperty javaProperty
protected static final I18NHelper msg
| Constructor Detail |
protected JDOAssociatedPropertyImplDynamic(java.lang.String name,
JDOClass declaringClass,
JDOField associatedJDOField)
throws ModelException
| Method Detail |
public JavaField getJavaField()
getJavaField in interface JDOField
public void setJavaField(JavaField javaField)
throws ModelException
setJavaField in interface JDOFieldjavaField - the corresponding JavaProperty representation
ModelException - if impossiblepublic boolean isProperty()
isProperty in interface JDOFieldtrue if this field represents a property;
false otherwisepublic int getPersistenceModifier()
getPersistenceModifier in interface JDOFieldPersistenceModifier.UNSPECIFIED,
PersistenceModifier.NONE,
PersistenceModifier.PERSISTENT,
PersistenceModifier.TRANSACTIONAL,
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,
PersistenceModifier.POSSIBLY_PERSISTENT.
ModelException - if impossiblepublic boolean isPrimaryKey()
isPrimaryKey in interface JDOFieldtrue if the field is a key field,
false otherwise
public void setPrimaryKey(boolean primaryKey)
throws ModelException
setPrimaryKey in interface JDOFieldprimaryKey - if true, the JDOField is marked
as a key field; otherwise, it is not
ModelException - if impossiblepublic int getNullValueTreatment()
getNullValueTreatment in interface JDOFieldNullValueTreatment.NONE, NullValueTreatment.EXCEPTION or
NullValueTreatment.DEFAULT
public void setNullValueTreatment(int nullValueTreament)
throws ModelException
setNullValueTreatment in interface JDOFieldnullValueTreament - an integer indicating the null value treatment,
one of: NullValueTreatment.NONE,
NullValueTreatment.EXCEPTION or
NullValueTreatment.DEFAULT
ModelException - if impossiblepublic boolean isDefaultFetchGroup()
isDefaultFetchGroup in interface JDOFieldtrue if the field is part of the default fetch
group, false otherwise
public void setDefaultFetchGroup(boolean defaultFetchGroup)
throws ModelException
setDefaultFetchGroup in interface JDOFielddefaultFetchGroup - if true, the JDOField is marked
as beeing part of the default fetch group; otherwise, it is not
ModelException - if impossiblepublic boolean isEmbedded()
isEmbedded in interface JDOFieldtrue if the field is stored as part of the instance;
false otherwise
public void setEmbedded(boolean embedded)
throws ModelException
setEmbedded in interface JDOFieldembedded - true if the field is stored as part of the
instance; false otherwise
ModelException - if impossiblepublic boolean isSerializable()
isSerializable in interface JDOFieldtrue if the field is serializable,
false otherwise
public void setSerializable(boolean serializable)
throws ModelException
setSerializable in interface JDOFieldserializable - if true, the JDOField is serializable;
otherwise, it is not
ModelException - if impossiblepublic java.lang.String getMappedByName()
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 relationship
public void setRelationship(JDORelationship relationship)
throws ModelException
setRelationship in interface JDOFieldrelationship - the JDORelationship instance
ModelException - if impossible
public JDOReference createJDOReference()
throws ModelException
createJDOReference in interface JDOFieldModelException - if impossible
public JDOCollection createJDOCollection()
throws ModelException
createJDOCollection in interface JDOFieldModelException - if impossible
public JDOArray createJDOArray()
throws ModelException
createJDOArray in interface JDOFieldModelException - if impossible
public JDOMap createJDOMap()
throws ModelException
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()
isManaged in interface JDOFieldtrue if this field is a managed field;
false otherwisepublic boolean isRelationship()
isRelationship in interface JDOFieldtrue if this field is a relationship;
false otherwisepublic JavaType getType()
getType in interface JDOFieldpublic int getFieldNumber()
getFieldNumber in interface JDOFieldpublic int getRelativeFieldNumber()
getRelativeFieldNumber in interface JDOFieldpublic JDOField getAssociatedJDOField()
null.
getAssociatedJDOField in interface JDOPropertynull if not
available.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||