Package org.copperengine.core.persistent
Class DefaultPersistenceContextFactory
- java.lang.Object
-
- org.copperengine.core.persistent.DefaultPersistenceContextFactory
-
- All Implemented Interfaces:
PersistenceContextFactory<PersistenceContext>
public final class DefaultPersistenceContextFactory extends java.lang.Object implements PersistenceContextFactory<PersistenceContext>
Default implementation of thePersistenceContextFactory
interface.
-
-
Constructor Summary
Constructors Constructor Description DefaultPersistenceContextFactory(DefaultPersistenceContextFactoryConfiguration configuration, java.sql.Connection con)
Constructs a DefaultPersistenceContextFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PersistenceContext
createPersistenceContextForDeletion(PersistentWorkflow<?> workflow)
Creates a persistence context for use during deletion of workflows.PersistenceContext
createPersistenceContextForLoading(PersistentWorkflow<?> workflow)
Creates a persistence context for use during loading of workflows.PersistenceContext
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.
-
-
-
Constructor Detail
-
DefaultPersistenceContextFactory
public DefaultPersistenceContextFactory(DefaultPersistenceContextFactoryConfiguration configuration, java.sql.Connection con)
Constructs a DefaultPersistenceContextFactory.- Parameters:
configuration
- The persister factory configurationcon
- The connection that this persistence context factory will flush to. Seeflush()
.
-
-
Method Detail
-
createPersistenceContextForLoading
public PersistenceContext createPersistenceContextForLoading(PersistentWorkflow<?> workflow)
Description copied from interface:PersistenceContextFactory
Creates a persistence context for use during loading of workflows.- Specified by:
createPersistenceContextForLoading
in interfacePersistenceContextFactory<PersistenceContext>
- Parameters:
workflow
- the workflow for which the context is created- Returns:
- the created context
-
createPersistenceContextForSaving
public PersistenceContext createPersistenceContextForSaving(PersistentWorkflow<?> workflow)
Description copied from interface:PersistenceContextFactory
Creates a persistence context for use during saving of workflows.- Specified by:
createPersistenceContextForSaving
in interfacePersistenceContextFactory<PersistenceContext>
- Parameters:
workflow
- the workflow for which the context is created- Returns:
- the created context
-
createPersistenceContextForDeletion
public PersistenceContext createPersistenceContextForDeletion(PersistentWorkflow<?> workflow)
Description copied from interface:PersistenceContextFactory
Creates a persistence context for use during deletion of workflows.- Specified by:
createPersistenceContextForDeletion
in interfacePersistenceContextFactory<PersistenceContext>
- Parameters:
workflow
- the workflow for which the context is created- Returns:
- the created context
-
flush
public void flush() throws java.sql.SQLException
Description copied from interface:PersistenceContextFactory
Flushes all operations that were passed to the createdPersistenceContext
s.- Specified by:
flush
in interfacePersistenceContextFactory<PersistenceContext>
- Throws:
java.sql.SQLException
- for any SQL exception happening during this operation
-
-