Class SessionApplicationStatePersistenceStrategy
java.lang.Object
org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy
- All Implemented Interfaces:
ApplicationStatePersistenceStrategy
- Direct Known Subclasses:
EntityApplicationStatePersistenceStrategy
,EntityApplicationStatePersistenceStrategy
public class SessionApplicationStatePersistenceStrategy
extends Object
implements ApplicationStatePersistenceStrategy
Stores ASOs in the
Session
, which will be created as necessary.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> String
<T> boolean
Returns true if the SSO already exists, false if null.<T> T
get
(Class<T> ssoClass, ApplicationStateCreator<T> creator) Gets the SSO from the domain.<T> T
getIfExists
(Class<T> ssoClass) Returns the SSO if it exists or null.protected <T> Object
getOrCreate
(Class<T> ssoClass, ApplicationStateCreator<T> creator) protected Session
<T> void
Stores a new SSO, possibly replacing the existing one.protected <T> T
transformPersistedValue
(Object value)
-
Constructor Details
-
SessionApplicationStatePersistenceStrategy
-
-
Method Details
-
getSession
-
get
Description copied from interface:ApplicationStatePersistenceStrategy
Gets the SSO from the domain. If the SSO does not already exist, it is created and stored, then returned.- Specified by:
get
in interfaceApplicationStatePersistenceStrategy
-
getOrCreate
-
getIfExists
Description copied from interface:ApplicationStatePersistenceStrategy
Returns the SSO if it exists or null.- Specified by:
getIfExists
in interfaceApplicationStatePersistenceStrategy
-
transformPersistedValue
-
buildKey
-
set
Description copied from interface:ApplicationStatePersistenceStrategy
Stores a new SSO, possibly replacing the existing one.- Specified by:
set
in interfaceApplicationStatePersistenceStrategy
sso
- instance to store, or null to delete existing
-
exists
Description copied from interface:ApplicationStatePersistenceStrategy
Returns true if the SSO already exists, false if null.- Specified by:
exists
in interfaceApplicationStatePersistenceStrategy
-