|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.pimento.property.AbstractPropertyHandler
public abstract class AbstractPropertyHandler
Base class for all simple properties.
| Constructor Summary | |
|---|---|
AbstractPropertyHandler()
|
|
| Method Summary | |
|---|---|
protected Property |
getProperty()
Returns the property managed by this handler. |
Object |
getValueForSnapshot(Object entity,
SnapshotEncoder encoder,
FetchMode fetchMode)
Reads the specified property from the given entity and returns it in a form suitable for inclusion in an entity snapshot. |
void |
init(Property property)
|
Object |
prepareValueFromSnapshot(Object entity,
Object value,
SnapshotDecoder decoder,
EntityState state)
Prepares the specified property value, performing all necessary conversions, but without actually applying it to the specified entity. |
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 |
| Constructor Detail |
|---|
public AbstractPropertyHandler()
| Method Detail |
|---|
protected Property getProperty()
public void init(Property property)
init in interface PropertyHandler
public Object getValueForSnapshot(Object entity,
SnapshotEncoder encoder,
FetchMode fetchMode)
PropertyHandlerSnapshotEncoder instance. Simple values
could be returned as-is in most cases.
getValueForSnapshot in interface PropertyHandlerentity - the entity to extract the property value fromencoder - the encoder to use for encoding associationsfetchMode - the fetchMode to use if the property type is an association
public Object prepareValueFromSnapshot(Object entity,
Object value,
SnapshotDecoder decoder,
EntityState state)
PropertyHandlerPropertyChangeSet
instance which gets passed to any configured interceptors before the property is applied with
the setValue method of this class.
prepareValueFromSnapshot in interface PropertyHandlerentity - the entity to prepare the property forvalue - the new value for the propertydecoder - the decoder to use for decoding associationsstate - the state of the entity
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 property
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||