|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.pimento.io.TypeHandler<S,T>
public abstract class TypeHandler<S extends TypeSnapshot,T extends ManagedType>
Responsible for managing a particular persistent type.
| Constructor Summary | |
|---|---|
protected |
TypeHandler(Object instance,
S snapshot,
T type,
EntityState state)
Creates a new instance. |
| Method Summary | |
|---|---|
protected void |
applyUpdates(PropertyChangeSet changeSet)
Applies the specified change set to the entity managed by this instance. |
protected void |
assertUpdatePermitted(ManagedProperty property)
Assert whether an update for the specified property is permitted |
Object |
getInstance()
Returns the entity instance. |
S |
getSnapshot()
Returns the snapshot representation of the entity instance. |
EntityState |
getState()
The persistent state of the entity. |
T |
getType()
Returns the metamodel of the entity. |
protected Object |
getValueForSnapshot(ManagedProperty property,
SnapshotEncoder encoder,
FetchMode fetchMode)
Return the value to be included in a snapshot for the specified property. |
void |
populateSnapshot(SnapshotEncoder encoder,
FetchPlan fetchPlan)
Populates the snapshot of the entity managed by this instance. |
protected void |
populateSnapshot(SnapshotEncoder encoder,
FetchPlan fetchPlan,
EntityEncoder entityEncoder)
Populates the snapshot of the entity managed by this instance. |
protected PropertyChangeSet |
prepareChangeSet(SnapshotDecoder decoder)
Prepares a change set that may later be applied to the snapshot and entity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected TypeHandler(Object instance,
S snapshot,
T type,
EntityState state)
instance - the entity instance to managesnapshot - the snapshot representation of the entity instancetype - the metamodel of the entitystate - the state of the entity| Method Detail |
|---|
public Object getInstance()
public S getSnapshot()
public T getType()
public EntityState getState()
public void populateSnapshot(SnapshotEncoder encoder,
FetchPlan fetchPlan)
encoder - the encoder to use for encoding associationsfetchPlan - the effective fetch plan
protected void populateSnapshot(SnapshotEncoder encoder,
FetchPlan fetchPlan,
EntityEncoder entityEncoder)
encoder - the encoder to use for encoding associationsfetchPlan - the effective fetch planentityEncoder - the encode specifying potential exclusions
protected Object getValueForSnapshot(ManagedProperty property,
SnapshotEncoder encoder,
FetchMode fetchMode)
property - the property to return the snapshot value forencoder - the encoder to use for encoding associationsfetchMode - the effective fetch mode for the property
protected PropertyChangeSet prepareChangeSet(SnapshotDecoder decoder)
decoder - the decoder to use for decoding associations
protected void applyUpdates(PropertyChangeSet changeSet)
changeSet - the change set to applyprotected void assertUpdatePermitted(ManagedProperty property)
property - the property to check
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||