org.springframework.webflow.engine.model
Class PersistenceContextModel

java.lang.Object
  extended by org.springframework.webflow.engine.model.AbstractModel
      extended by org.springframework.webflow.engine.model.PersistenceContextModel
All Implemented Interfaces:
Model

public class PersistenceContextModel
extends AbstractModel

Model support for persistence context elements.

Allocates a persistence context when this flow starts. The persistence context is closed when the flow ends. If the flow ends by reaching a "commit" end-state, changes made to managed persistent entities during the course of flow execution are flushed to the database in a transaction.

The persistence context can be referenced from within this flow by the "entityManager" variable.

Author:
Scott Andrews

Constructor Summary
PersistenceContextModel()
          Create a persistence context model
 
Method Summary
 Model createCopy()
          Create a deep copy of this model.
 boolean isMergeableWith(Model model)
          Determine if the model is able to be merged into the current model
 void merge(Model model)
          Merge the model into the current model
 
Methods inherited from class org.springframework.webflow.engine.model.AbstractModel
copy, copyList, merge, merge, merge, merge, merge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceContextModel

public PersistenceContextModel()
Create a persistence context model

Method Detail

isMergeableWith

public boolean isMergeableWith(Model model)
Description copied from interface: Model
Determine if the model is able to be merged into the current model

Parameters:
model - the model to compare
Returns:
true if able to merge

merge

public void merge(Model model)
Description copied from interface: Model
Merge the model into the current model

Parameters:
model - the model to merge with

createCopy

public Model createCopy()
Description copied from interface: Model
Create a deep copy of this model. Needed when merging models and collections.

Returns:
a deep copy of this model