Class EntityPersistentFieldStrategy
java.lang.Object
org.apache.tapestry5.internal.services.AbstractSessionPersistentFieldStrategy
org.apache.tapestry5.internal.jpa.EntityPersistentFieldStrategy
- All Implemented Interfaces:
PersistentFieldStrategy
Persists JPA entities by storing their id in the session.
-
Constructor Summary
ConstructorsConstructorDescriptionEntityPersistentFieldStrategy
(EntityManagerManager entityManagerManager, Request request) -
Method Summary
Modifier and TypeMethodDescriptionconvertApplicationValueToPersisted
(Object newValue) Hook that allows a value to be converted as it is written to the session.convertPersistedToApplicationValue
(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 Details
-
EntityPersistentFieldStrategy
-
-
Method Details
-
convertApplicationValueToPersisted
Description copied from class:AbstractSessionPersistentFieldStrategy
Hook 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:
convertApplicationValueToPersisted
in classAbstractSessionPersistentFieldStrategy
- Parameters:
newValue
- non-null value- Returns:
- persisted value
- See Also:
-
convertPersistedToApplicationValue
Description copied from class:AbstractSessionPersistentFieldStrategy
Converts a persisted value stored in the session back into an application value. This implementation returns the persisted value as is.- Overrides:
convertPersistedToApplicationValue
in classAbstractSessionPersistentFieldStrategy
- Parameters:
persistedValue
- non-null persisted value- Returns:
- application value
- See Also:
-