|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.pimento.property.AbstractAssociationHandler
org.spicefactory.pimento.property.AbstractCollectionHandler
org.spicefactory.pimento.property.AbstractUnindexedCollectionHandler
org.spicefactory.pimento.property.MapHandler
public class MapHandler
Manages a Map property type. Currently only JPA 1.0 style maps are supported. These are maps where persistent entities are used as the values and one property value of the entities as the corresponding key.
| Field Summary |
|---|
| Fields inherited from class org.spicefactory.pimento.property.AbstractAssociationHandler |
|---|
property |
| Constructor Summary | |
|---|---|
MapHandler()
Creates a new instance. |
|
| Method Summary | |
|---|---|
protected void |
applyCollectionUpdate(Object entity,
CollectionUpdate update,
Property property)
Applies the specified collection update to the property of the given entity. |
protected Object |
createFullCollectionFromSnapshots(List<EntitySnapshot> snapshots,
SnapshotDecoder decoder)
Creates and returns a collection of entities from the specified list of snapshots. |
protected Collection<?> |
getCollection(Object value)
Returns the collection that should be used for creating a collection snapshot. |
ManagedProperty |
getKeyProperty()
Return the property of the associated entity that will be used as the Maps key. |
void |
setAssociationModel(TypeHierarchy associationModel)
Sets the type hierarchy for the polymorphic association. |
void |
setKeyProperty(ManagedProperty keyProperty)
Sets the property of the associated entity that will be used as the Maps key. |
| Methods inherited from class org.spicefactory.pimento.property.AbstractUnindexedCollectionHandler |
|---|
createCollectionUpdate, prepareValueFromSnapshot, setValue |
| Methods inherited from class org.spicefactory.pimento.property.AbstractCollectionHandler |
|---|
addSupportedInterface, createCollection, getValueForSnapshot |
| Methods inherited from class org.spicefactory.pimento.property.AbstractAssociationHandler |
|---|
entityForInstance, entityForSnapshot, equals, getAssociationModel, getFetchPlan, init |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapHandler()
| Method Detail |
|---|
public ManagedProperty getKeyProperty()
public void setKeyProperty(ManagedProperty keyProperty)
keyProperty - the property of the associated entity that will be used as the Maps keyprotected Collection<?> getCollection(Object value)
AbstractCollectionHandler
getCollection in class AbstractCollectionHandlervalue - the original collection value
protected Object createFullCollectionFromSnapshots(List<EntitySnapshot> snapshots,
SnapshotDecoder decoder)
AbstractCollectionHandler
createFullCollectionFromSnapshots in class AbstractCollectionHandlersnapshots - the list of snapshots to assemble to entitiesdecoder - the decoder to use for the specified snapshots
protected void applyCollectionUpdate(Object entity,
CollectionUpdate update,
Property property)
AbstractUnindexedCollectionHandler
applyCollectionUpdate in class AbstractUnindexedCollectionHandlerentity - the entity the update should be applied toupdate - the collection update to applyproperty - the property of the entity that the update should be applied topublic void setAssociationModel(TypeHierarchy associationModel)
AbstractAssociationHandler
setAssociationModel in class AbstractAssociationHandlerassociationModel - the type hierarchy for the polymorphic association
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||