Package org.copperengine.core.persistent
Class DefaultWorkflowPersistencePlugin
- java.lang.Object
-
- org.copperengine.core.persistent.DefaultWorkflowPersistencePlugin
-
- All Implemented Interfaces:
WorkflowPersistencePlugin
public class DefaultWorkflowPersistencePlugin extends java.lang.Object implements WorkflowPersistencePlugin
Default implementation for theWorkflowPersistencePlugin
. This implementation handles primitive persistence forPersistentWorkflow
members. It is not capable of handling data-based dependencies between entities concerning insertion and deletion order.
-
-
Field Summary
-
Fields inherited from interface org.copperengine.core.persistent.WorkflowPersistencePlugin
NULL_PLUGIN
-
-
Constructor Summary
Constructors Constructor Description DefaultWorkflowPersistencePlugin(DefaultPersistenceContextFactoryConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DefaultPersistenceContextFactoryConfiguration
configuration()
protected PersistenceContextFactory<?>
createPersistenceContextFactory(java.sql.Connection con)
void
onWorkflowsDeleted(java.sql.Connection con, java.lang.Iterable<? extends PersistentWorkflow<?>> workflows)
Implementations have to callPersistentWorkflow.onDelete(PersistenceContext)
for every workflow passed.void
onWorkflowsLoaded(java.sql.Connection con, java.lang.Iterable<? extends PersistentWorkflow<?>> workflows)
Implementations have to callPersistentWorkflow.onLoad(PersistenceContext)
for every workflow passed.void
onWorkflowsSaved(java.sql.Connection con, java.lang.Iterable<? extends PersistentWorkflow<?>> workflows)
Implementations have to callPersistentWorkflow.onLoad(PersistenceContext)
for every workflow passed.
-
-
-
Constructor Detail
-
DefaultWorkflowPersistencePlugin
public DefaultWorkflowPersistencePlugin(DefaultPersistenceContextFactoryConfiguration configuration)
-
-
Method Detail
-
onWorkflowsLoaded
public void onWorkflowsLoaded(java.sql.Connection con, java.lang.Iterable<? extends PersistentWorkflow<?>> workflows) throws java.sql.SQLException
Description copied from interface:WorkflowPersistencePlugin
Implementations have to callPersistentWorkflow.onLoad(PersistenceContext)
for every workflow passed.- Specified by:
onWorkflowsLoaded
in interfaceWorkflowPersistencePlugin
- Parameters:
con
- The database connection the load operation is bound to.workflows
- The workflows that are being loaded- Throws:
java.sql.SQLException
- Implementations may pass SQL Exception to be handled by the database dialect
-
onWorkflowsSaved
public void onWorkflowsSaved(java.sql.Connection con, java.lang.Iterable<? extends PersistentWorkflow<?>> workflows) throws java.sql.SQLException
Description copied from interface:WorkflowPersistencePlugin
Implementations have to callPersistentWorkflow.onLoad(PersistenceContext)
for every workflow passed.- Specified by:
onWorkflowsSaved
in interfaceWorkflowPersistencePlugin
- Parameters:
con
- The database connection the load operation is bound to.workflows
- The workflows that are being loaded- Throws:
java.sql.SQLException
- Implementations may pass SQL Exception to be handled by the database dialect
-
onWorkflowsDeleted
public void onWorkflowsDeleted(java.sql.Connection con, java.lang.Iterable<? extends PersistentWorkflow<?>> workflows) throws java.sql.SQLException
Description copied from interface:WorkflowPersistencePlugin
Implementations have to callPersistentWorkflow.onDelete(PersistenceContext)
for every workflow passed.- Specified by:
onWorkflowsDeleted
in interfaceWorkflowPersistencePlugin
- Parameters:
con
- The database connection the load operation is bound to.workflows
- list of workflows specified by any Iterable.- Throws:
java.sql.SQLException
- Implementations may pass SQL Exception to be handled by the database dialect
-
configuration
protected DefaultPersistenceContextFactoryConfiguration configuration()
-
createPersistenceContextFactory
protected PersistenceContextFactory<?> createPersistenceContextFactory(java.sql.Connection con)
-
-