|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.spicefactory.pimento.type.AbstractAssociationType
org.spicefactory.pimento.type.AbstractCollectionType
org.spicefactory.pimento.type.AbstractUnindexedCollectionType
org.spicefactory.pimento.type.MapType
public class MapType
Represents 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.
| Constructor Summary | |
|---|---|
MapType()
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,
IoContext context)
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. |
PropertyMetadata |
getKeyProperty()
Return the metadata for the property of the associated entity that will be used as the Maps key. |
void |
setAssociationMetadata(EntityMetadata entityMetadata)
Sets the entity metadata for the associated entity. |
void |
setKeyProperty(PropertyMetadata entityMetadata)
Sets the metadata for the property of the associated entity that will be used as the Maps key. |
void |
setProperty(Property property)
Sets the property that this PropertyType instance is applied to. |
| Methods inherited from class org.spicefactory.pimento.type.AbstractUnindexedCollectionType |
|---|
addSupportedInterface, createCollection, createCollectionUpdate, prepareValueFromSnapshot, setValue |
| Methods inherited from class org.spicefactory.pimento.type.AbstractCollectionType |
|---|
getValueForSnapshot |
| Methods inherited from class org.spicefactory.pimento.type.AbstractAssociationType |
|---|
equals, getAssociationMetadata, getFetchPlan, getMetadataForEntity, getMetadataForSnapshot, useLazyMode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapType()
| Method Detail |
|---|
public PropertyMetadata getKeyProperty()
public void setKeyProperty(PropertyMetadata entityMetadata)
entityMetadata - the metadata for the property of the associated entity that will be used as the Maps keyprotected Collection<?> getCollection(Object value)
AbstractCollectionType
getCollection in class AbstractCollectionTypevalue - the original collection value
protected Object createFullCollectionFromSnapshots(List<EntitySnapshot> snapshots,
IoContext context)
AbstractCollectionType
createFullCollectionFromSnapshots in class AbstractCollectionTypesnapshots - the list of snapshots to assemble to entitiescontext - the active IoContext
protected void applyCollectionUpdate(Object entity,
CollectionUpdate update,
Property property)
AbstractUnindexedCollectionType
applyCollectionUpdate in class AbstractUnindexedCollectionTypeentity - 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 setAssociationMetadata(EntityMetadata entityMetadata)
AbstractAssociationType
setAssociationMetadata in class AbstractAssociationTypeentityMetadata - the entity metadata for the associated entitypublic void setProperty(Property property)
PropertyAware
setProperty in interface PropertyAwareproperty - the property that this PropertyType instance is applied to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||