|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.pimento.type.AbstractAssociationType
public abstract class AbstractAssociationType
Base class for property types that represent associations to other entities.
| Constructor Summary | |
|---|---|
AbstractAssociationType()
|
|
| Method Summary | |
|---|---|
protected boolean |
equals(EntitySnapshot newValue,
Object oldValue,
IoContext context)
Determines whether the specified snapshot represents the given entity. |
EntityMetadata |
getAssociationMetadata()
Returns the entity metadata for the associated entity. |
protected FetchPlan |
getFetchPlan(FetchMode fetchMode)
Returns the FetchPlan for the specified FetchMode. |
protected EntityMetadata |
getMetadataForEntity(IoContext context,
Object entity)
Returns the metadata for the specified entity. |
protected EntityMetadata |
getMetadataForSnapshot(IoContext context,
EntitySnapshot snapshot)
Returns the metadata for the specified entity snapshot. |
void |
setAssociationMetadata(EntityMetadata entityMetadata)
Sets the entity metadata for the associated entity. |
void |
setValue(Object entity,
Object value,
Property property)
Sets the specified property value of the given entity. |
protected boolean |
useLazyMode(Object entity,
FetchMode fetchMode,
IoContext context)
Checks whether the specified entity should be lazily fetched. |
| 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.type.PropertyType |
|---|
getValueForSnapshot, prepareValueFromSnapshot |
| Constructor Detail |
|---|
public AbstractAssociationType()
| Method Detail |
|---|
public EntityMetadata getAssociationMetadata()
public void setAssociationMetadata(EntityMetadata entityMetadata)
entityMetadata - the entity metadata for the associated entity
public void setValue(Object entity,
Object value,
Property property)
PropertyTypeprepareValueFromSnapshot method of this class before this method
gets invoked.
setValue in interface PropertyTypeentity - the entity to set the property forvalue - the new value for the propertyproperty - the property to set
protected EntityMetadata getMetadataForEntity(IoContext context,
Object entity)
context - the active IoContextentity - the entity to return the metadata for
IllegalArgumentException - if the entity does not correspond to the entity type mapped
by this property
protected EntityMetadata getMetadataForSnapshot(IoContext context,
EntitySnapshot snapshot)
context - the active IoContextsnapshot - the snapshot to return the metadata for
IllegalArgumentException - if the snapshot does not correspond to the entity type mapped
by this property
protected boolean useLazyMode(Object entity,
FetchMode fetchMode,
IoContext context)
entity - the entity to checkfetchMode - the fetch mode for the specified entitycontext - the active IoContext
protected FetchPlan getFetchPlan(FetchMode fetchMode)
fetchMode - the FetchMode to return the FetchPlan for
protected boolean equals(EntitySnapshot newValue,
Object oldValue,
IoContext context)
newValue - the snapshot to compareoldValue - the entity to comparecontext - the active IoContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||