|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementImpl
com.sun.jdo.api.persistence.model.jdo.impl.PersistenceMemberElementImpl
com.sun.jdo.api.persistence.model.jdo.impl.PersistenceFieldElementImpl
com.sun.jdo.api.persistence.model.jdo.impl.RelationshipElementImpl
public class RelationshipElementImpl
| Field Summary |
|---|
| Fields inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl |
|---|
ADD, REMOVE, SET |
| Fields inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElementProperties |
|---|
PROP_CARDINALITY, PROP_COLLECTION_CLASS, PROP_DELETE_ACTION, PROP_ELEMENT_CLASS, PROP_FIELDS, PROP_GROUPS, PROP_IDENTITY, PROP_INVERSE_FIELD, PROP_KEY_CLASS, PROP_KEY_FIELD, PROP_MODIFIED, PROP_NAME, PROP_PERSISTENCE, PROP_PREFETCH, PROP_SENSITIVITY, PROP_UPDATE_ACTION |
| Constructor Summary | |
|---|---|
RelationshipElementImpl()
Create new RelationshipElementImpl with no corresponding name. |
|
RelationshipElementImpl(String name)
Creates new RelationshipElementImpl with the corresponding name |
|
| Method Summary | |
|---|---|
void |
changeInverseRelationship(RelationshipElement inverseRelationship)
Changes the inverse relationship element for this relationship element. |
String |
getCollectionClass()
Get the collection class (for example Set, List, Vector, etc.) for this relationship element. |
int |
getDeleteAction()
Get the delete action for this relationship element. |
String |
getElementClass()
Get the element class for this relationship element. |
String |
getInverseRelationshipName()
Get the relative name of the inverse relationship field for this relationship element. |
int |
getLowerBound()
Get the lower cardinality bound for this relationship element. |
int |
getUpdateAction()
Get the update action for this relationship element. |
int |
getUpperBound()
Get the upper cardinality bound for this relationship element. |
boolean |
isPrefetch()
Determines whether this relationship element should prefetch or not. |
void |
setCollectionClass(String collectionClass)
Set the collection class for this relationship element. |
void |
setDeleteAction(int action)
Set the delete action for this relationship element. |
void |
setElementClass(String elementClass)
Set the element class for this relationship element. |
void |
setLowerBound(int lowerBound)
Set the lower cardinality bound for this relationship element. |
void |
setPrefetch(boolean flag)
Set whether this relationship element should prefetch or not. |
void |
setUpdateAction(int action)
Set the update action for this relationship element. |
void |
setUpperBound(int upperBound)
Set the upper cardinality bound for this relationship element. |
| Methods inherited from class com.sun.jdo.api.persistence.model.jdo.impl.PersistenceFieldElementImpl |
|---|
getPersistenceType, isKey, isReadSensitive, isWriteSensitive, setKey, setPersistenceType, setReadSensitive, setWriteSensitive |
| Methods inherited from class com.sun.jdo.api.persistence.model.jdo.impl.PersistenceMemberElementImpl |
|---|
firePropertyChange, fireVetoableChange |
| Methods inherited from class com.sun.jdo.api.persistence.model.jdo.impl.PersistenceElementImpl |
|---|
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement.Impl |
|---|
getPersistenceType, isKey, isReadSensitive, isWriteSensitive, setKey, setPersistenceType, setReadSensitive, setWriteSensitive |
| Methods inherited from interface com.sun.jdo.api.persistence.model.jdo.PersistenceElement.Impl |
|---|
addPropertyChangeListener, addVetoableChangeListener, attachToElement, getName, removePropertyChangeListener, removeVetoableChangeListener, setName |
| Constructor Detail |
|---|
public RelationshipElementImpl()
public RelationshipElementImpl(String name)
name - the name of the element| Method Detail |
|---|
public int getUpdateAction()
getUpdateAction in interface RelationshipElement.ImplRelationshipElement.NONE_ACTION,
RelationshipElement.NULLIFY_ACTION,
RelationshipElement.RESTRICT_ACTION,
RelationshipElement.CASCADE_ACTION, or
RelationshipElement.AGGREGATE_ACTION. The default is
NONE_ACTION.
public void setUpdateAction(int action)
throws ModelException
setUpdateAction in interface RelationshipElement.Implaction - - an integer indicating the update action, one of:
RelationshipElement.NONE_ACTION,
RelationshipElement.NULLIFY_ACTION,
RelationshipElement.RESTRICT_ACTION,
RelationshipElement.CASCADE_ACTION, or
RelationshipElement.AGGREGATE_ACTION
ModelException - if impossiblepublic int getDeleteAction()
getDeleteAction in interface RelationshipElement.ImplRelationshipElement.NONE_ACTION,
RelationshipElement.NULLIFY_ACTION,
RelationshipElement.RESTRICT_ACTION,
RelationshipElement.CASCADE_ACTION, or
RelationshipElement.AGGREGATE_ACTION. The default is
NONE_ACTION.
public void setDeleteAction(int action)
throws ModelException
setDeleteAction in interface RelationshipElement.Implaction - - an integer indicating the delete action, one of:
RelationshipElement.NONE_ACTION,
RelationshipElement.NULLIFY_ACTION,
RelationshipElement.RESTRICT_ACTION,
RelationshipElement.CASCADE_ACTION, or
RelationshipElement.AGGREGATE_ACTION
ModelException - if impossiblepublic boolean isPrefetch()
isPrefetch in interface RelationshipElement.Impltrue if the relationship should prefetch,
false otherwise. The default is false.
public void setPrefetch(boolean flag)
throws ModelException
setPrefetch in interface RelationshipElement.Implflag - - if true, the relationship is set to
prefetch; otherwise, it is not
ModelException - if impossiblepublic int getLowerBound()
getLowerBound in interface RelationshipElement.Impl
public void setLowerBound(int lowerBound)
throws ModelException
setLowerBound in interface RelationshipElement.ImpllowerBound - - an integer indicating the lower cardinality bound
ModelException - if impossiblepublic int getUpperBound()
Integer.MAX_VALUE for n
getUpperBound in interface RelationshipElement.Impl
public void setUpperBound(int upperBound)
throws ModelException
setUpperBound in interface RelationshipElement.ImplupperBound - - an integer indicating the upper cardinality bound
(use Integer.MAX_VALUE for n)
ModelException - if impossiblepublic String getCollectionClass()
getCollectionClass in interface RelationshipElement.Impl
public void setCollectionClass(String collectionClass)
throws ModelException
setCollectionClass in interface RelationshipElement.ImplcollectionClass - - a string indicating the type of
collection (for example Set, List, Vector, etc.)
ModelException - if impossiblepublic String getElementClass()
wrapperclass.TYPE.toString() to specify them.
getElementClass in interface RelationshipElement.Impl
public void setElementClass(String elementClass)
throws ModelException
setElementClass in interface RelationshipElement.ImplelementClass - - a string indicating the type of elements
in the collection. If primitive types are supported, you can use
wrapperclass.TYPE.toString() to specify them.
ModelException - if impossiblepublic String getInverseRelationshipName()
null. Note that it is possible to have this
method return a value, but because of the combination of related class
and lookup, there may be no corresponding RelationshipElement which can
be found.
getInverseRelationshipName in interface RelationshipElement.ImplRelationshipElement.getInverseRelationship(com.sun.jdo.api.persistence.model.Model)
public void changeInverseRelationship(RelationshipElement inverseRelationship)
throws ModelException
RelationshipElement.setInverseRelationship(com.sun.jdo.api.persistence.model.jdo.RelationshipElement, com.sun.jdo.api.persistence.model.Model) and should handle the
vetoable change events, property change events, and setting the internal
variable.
changeInverseRelationship in interface RelationshipElement.ImplinverseRelationship - - a relationship element to be used as the
inverse for this relationship element or null if this
relationship element does not participate in a two-way relationship.
ModelException - if impossible
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||