Class EntityPersistentFieldStrategy
- java.lang.Object
-
- org.apache.tapestry5.internal.services.AbstractSessionPersistentFieldStrategy
-
- org.apache.tapestry5.hibernate.web.internal.EntityPersistentFieldStrategy
-
- All Implemented Interfaces:
PersistentFieldStrategy
public class EntityPersistentFieldStrategy extends AbstractSessionPersistentFieldStrategy
Persists Hibernate entities by storing their id in the session.- See Also:
PersistedEntity
-
-
Constructor Summary
Constructors Constructor Description EntityPersistentFieldStrategy(org.hibernate.Session session, Request request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectconvertApplicationValueToPersisted(java.lang.Object newValue)Hook that allows a value to be converted as it is written to the session.java.lang.ObjectconvertPersistedToApplicationValue(java.lang.Object persistedValue)Converts a persisted value stored in the session back into an application value.-
Methods inherited from class org.apache.tapestry5.internal.services.AbstractSessionPersistentFieldStrategy
didReadChange, discardChanges, gatherFieldChanges, postChange
-
-
-
-
Constructor Detail
-
EntityPersistentFieldStrategy
public EntityPersistentFieldStrategy(org.hibernate.Session session, Request request)
-
-
Method Detail
-
convertApplicationValueToPersisted
public java.lang.Object convertApplicationValueToPersisted(java.lang.Object newValue)
Description copied from class:AbstractSessionPersistentFieldStrategyHook that allows a value to be converted as it is written to the session. Passed the new value provided by the application, returns the object to be stored in the session. This implementation simply returns the provided value.- Overrides:
convertApplicationValueToPersistedin classAbstractSessionPersistentFieldStrategy- Parameters:
newValue- non-null value- Returns:
- persisted value
- See Also:
AbstractSessionPersistentFieldStrategy.convertPersistedToApplicationValue(Object)
-
convertPersistedToApplicationValue
public java.lang.Object convertPersistedToApplicationValue(java.lang.Object persistedValue)
Description copied from class:AbstractSessionPersistentFieldStrategyConverts a persisted value stored in the session back into an application value. This implementation returns the persisted value as is.- Overrides:
convertPersistedToApplicationValuein classAbstractSessionPersistentFieldStrategy- Parameters:
persistedValue- non-null persisted value- Returns:
- application value
- See Also:
AbstractSessionPersistentFieldStrategy.convertPersistedToApplicationValue(Object)
-
-