|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.pimento.property.AbstractAssociationHandler
public abstract class AbstractAssociationHandler
Base class for property handlers that manage associations to other entities.
| Field Summary | |
|---|---|
protected Property |
property
|
| Constructor Summary | |
|---|---|
AbstractAssociationHandler()
|
|
| Method Summary | |
|---|---|
protected Entity |
entityForInstance(Object instance)
Returns the entity metamodel for the specified entity. |
protected Entity |
entityForSnapshot(EntitySnapshot snapshot)
Returns the entity metamodel for the specified snapshot. |
protected boolean |
equals(EntitySnapshot newValue,
Object oldValue)
Determines whether the specified snapshot represents the given entity. |
TypeHierarchy |
getAssociationModel()
Returns the type hierarchy for the polymorphic association. |
protected FetchPlan |
getFetchPlan(FetchMode fetchMode)
Returns the FetchPlan for the specified FetchMode. |
void |
init(Property property)
|
void |
setAssociationModel(TypeHierarchy associationModel)
Sets the type hierarchy for the polymorphic association. |
void |
setValue(Object entity,
Object value)
Sets the specified property value of the given entity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.spicefactory.pimento.property.PropertyHandler |
|---|
getValueForSnapshot, prepareValueFromSnapshot |
| Field Detail |
|---|
protected Property property
| Constructor Detail |
|---|
public AbstractAssociationHandler()
| Method Detail |
|---|
public void init(Property property)
init in interface PropertyHandlerpublic TypeHierarchy getAssociationModel()
public void setAssociationModel(TypeHierarchy associationModel)
associationModel - the type hierarchy for the polymorphic association
public void setValue(Object entity,
Object value)
PropertyHandlerprepareValueFromSnapshot method of this class before this method
gets invoked.
setValue in interface PropertyHandlerentity - the entity to set the property forvalue - the new value for the propertyprotected Entity entityForInstance(Object instance)
instance - the entity to return the metamodel for
IllegalArgumentException - if the instance type does not correspond to the entity type mapped
by this propertyprotected Entity entityForSnapshot(EntitySnapshot snapshot)
snapshot - the snapshot to return the entity metamodel for
IllegalArgumentException - if the snapshot does not correspond to the entity type mapped
by this propertyprotected FetchPlan getFetchPlan(FetchMode fetchMode)
fetchMode - the FetchMode to return the FetchPlan for
protected boolean equals(EntitySnapshot newValue,
Object oldValue)
newValue - the snapshot to compareoldValue - the entity to compare
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||