Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.internal.jpa
Class EntityPersistentFieldStrategy

    java.lang.Object
      org.apache.tapestry5.internal.services.AbstractSessionPersistentFieldStrategy
          org.apache.tapestry5.internal.jpa.EntityPersistentFieldStrategy

All Implemented Interfaces:
  PersistentFieldStrategy

    public class EntityPersistentFieldStrategy

extends AbstractSessionPersistentFieldStrategy

Persists JPA entities by storing their id in the session.

Constructor Summary
`EntityPersistentFieldStrategy(EntityManagerManager entityManagerManager, Request request)`

Method Summary
`protected java.lang.Object` | `convertApplicationValueToPersisted(java.lang.Object newValue)` Hook that allows a value to be converted as it is written to the session.
`protected java.lang.Object` | `convertPersistedToApplicationValue(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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EntityPersistentFieldStrategy

    public EntityPersistentFieldStrategy(EntityManagerManager entityManagerManager,
                                         Request request)

Method Detail

### convertApplicationValueToPersisted

    protected java.lang.Object convertApplicationValueToPersisted(java.lang.Object newValue)

  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 class `AbstractSessionPersistentFieldStrategy`
  Parameters:
    `newValue` - non-null value
  Returns:
    persisted value
  See Also:
    `AbstractSessionPersistentFieldStrategy.convertPersistedToApplicationValue(Object)`

### convertPersistedToApplicationValue

    protected java.lang.Object convertPersistedToApplicationValue(java.lang.Object persistedValue)

  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 class `AbstractSessionPersistentFieldStrategy`
  Parameters:
    `persistedValue` - non-null persisted value
  Returns:
    application value
  See Also:
    `AbstractSessionPersistentFieldStrategy.convertPersistedToApplicationValue(Object)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.