Package org.copperengine.core.persistent
Interface PersistenceContextFactory<T extends PersistenceContext>
-
- Type Parameters:
T
- subtype of PersistenceContext
- All Known Implementing Classes:
DefaultPersistenceContextFactory
public interface PersistenceContextFactory<T extends PersistenceContext>
Interface for custom persistence ofPersistentWorkflow
members. For every worklow, during saving and loading from and to storage aPersistenceContext
is being created. This context is passed toPersistentWorkflow.onLoad(PersistenceContext)
,PersistentWorkflow.onSave(PersistenceContext)
andPersistentWorkflow.onDelete(PersistenceContext)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
createPersistenceContextForDeletion(PersistentWorkflow<?> workflow)
Creates a persistence context for use during deletion of workflows.T
createPersistenceContextForLoading(PersistentWorkflow<?> workflow)
Creates a persistence context for use during loading of workflows.T
createPersistenceContextForSaving(PersistentWorkflow<?> workflow)
Creates a persistence context for use during saving of workflows.void
flush()
Flushes all operations that were passed to the createdPersistenceContext
s.
-
-
-
Method Detail
-
createPersistenceContextForLoading
T createPersistenceContextForLoading(PersistentWorkflow<?> workflow)
Creates a persistence context for use during loading of workflows.- Parameters:
workflow
- the workflow for which the context is created- Returns:
- the created context
-
createPersistenceContextForSaving
T createPersistenceContextForSaving(PersistentWorkflow<?> workflow)
Creates a persistence context for use during saving of workflows.- Parameters:
workflow
- the workflow for which the context is created- Returns:
- the created context
-
createPersistenceContextForDeletion
T createPersistenceContextForDeletion(PersistentWorkflow<?> workflow)
Creates a persistence context for use during deletion of workflows.- Parameters:
workflow
- the workflow for which the context is created- Returns:
- the created context
-
flush
void flush() throws java.sql.SQLException
Flushes all operations that were passed to the createdPersistenceContext
s.- Throws:
java.sql.SQLException
- for any SQL exception happening during this operation
-
-