|
|||||||||
| 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
public abstract class AbstractUnindexedCollectionType
Base class for property types that represent unindexed collections.
| Constructor Summary | |
|---|---|
AbstractUnindexedCollectionType()
|
|
| Method Summary | ||
|---|---|---|
protected
|
addSupportedInterface(Class<T> collectionInterface,
Class<? extends T> implementation)
Adds an interface type supported by this PropertyType. |
|
protected void |
applyCollectionUpdate(Object entity,
CollectionUpdate update,
Property property)
Applies the specified collection update to the property of the given entity. |
|
protected Object |
createCollection(Class<?> type)
Creates an instance for the specified collection type. |
|
protected CollectionUpdate |
createCollectionUpdate(CollectionChangeSet changeSet,
IoContext context)
Creates a CollectionUpdate instance from the specified change set. |
|
Object |
prepareValueFromSnapshot(Object entity,
Object value,
Property property,
IoContext context,
boolean createChangeSet)
Prepares the specified property value, performing all necessary conversions, but without actually applying it to the specified entity. |
|
void |
setValue(Object entity,
Object value,
Property property)
Sets the specified property value of the given entity. |
|
| Methods inherited from class org.spicefactory.pimento.type.AbstractCollectionType |
|---|
createFullCollectionFromSnapshots, getCollection, getValueForSnapshot |
| Methods inherited from class org.spicefactory.pimento.type.AbstractAssociationType |
|---|
equals, getAssociationMetadata, getFetchPlan, getMetadataForEntity, getMetadataForSnapshot, setAssociationMetadata, useLazyMode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractUnindexedCollectionType()
| Method Detail |
|---|
protected <T> void addSupportedInterface(Class<T> collectionInterface,
Class<? extends T> implementation)
collectionInterface - the supported interface type to addimplementation - the default implementation to use when creating instances of the supported type
public Object prepareValueFromSnapshot(Object entity,
Object value,
Property property,
IoContext context,
boolean createChangeSet)
PropertyTypeEntityUpdate
instance which gets passed to any configured interceptors before the property is applied with
the setValue method of this class.
entity - the entity to prepare the property forvalue - the new value for the propertyproperty - the property to preparecontext - the active IoContextcreateChangeSet - whether a change set is being created
protected CollectionUpdate createCollectionUpdate(CollectionChangeSet changeSet,
IoContext context)
applyCollectionUpdate. While the specified change set contains
entity snapshots the returned CollectionUpdate must contain the corresponding persistent entities.
changeSet - the change set to convertcontext - the active IoContext
public void setValue(Object entity,
Object value,
Property property)
PropertyTypeprepareValueFromSnapshot method of this class before this method
gets invoked.
setValue in interface PropertyTypesetValue in class AbstractAssociationTypeentity - the entity to set the property forvalue - the new value for the propertyproperty - the property to set
protected void applyCollectionUpdate(Object entity,
CollectionUpdate update,
Property property)
entity - the entity the update should be applied toupdate - the collection update to applyproperty - the property of the entity that the update should be applied toprotected Object createCollection(Class<?> type)
addSupportedInterface.
type - the collection type to create an instance for
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||