|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.googlecode.sarasvati.impl.BaseEngine com.googlecode.sarasvati.hib.HibEngine
public class HibEngine
Constructor Summary | |
---|---|
HibEngine()
This constructor can be used in cases when the session will be set in later or when performing operations that don't require a session, such as adding global execution listeners. |
|
HibEngine(org.hibernate.Session session)
Creates a new HibEngine with the default application context. |
|
HibEngine(String applicationContext)
This constructor can be used in cases when the session will be set in later or when performing operations that don't require a session, such as adding global execution listeners. |
|
HibEngine(String applicationContext,
org.hibernate.Session session)
Creates a new HibEngine with the given application context. |
Method Summary | |
---|---|
void |
addExecutionListener(GraphProcess process,
Class<? extends ExecutionListener> listenerClass,
ExecutionEventType... eventTypes)
Adds a listener for the given event types for the given process. |
static void |
addToConfiguration(org.hibernate.cfg.AnnotationConfiguration config,
boolean enableCaching)
|
List<ArcToken> |
getActiveArcTokens(HibTokenSet tokenSet)
|
List<NodeToken> |
getActiveNodeTokens(HibTokenSet tokenSet)
|
HibGraphFactory |
getFactory()
Returns an appropriate GraphFactory for this Engine . |
GraphLoader<HibGraph> |
getLoader()
Returns an appropriate GraphLoader for this Engine . |
GraphLoader<HibGraph> |
getLoader(GraphValidator validator)
Returns an appropriate GraphLoader for this Engine . |
HibGraphRepository |
getRepository()
Returns an appropriate GraphRepository for this Engine . |
org.hibernate.Session |
getSession()
|
HibEngine |
newEngine()
Creates a new engine base on the same parameters as this. |
void |
removeExecutionListener(GraphProcess process,
Class<? extends ExecutionListener> listenerClass,
ExecutionEventType... eventTypes)
Will remove the listener from the given proces. |
void |
setSession(org.hibernate.Session session)
|
Methods inherited from class com.googlecode.sarasvati.impl.BaseEngine |
---|
addExecutionListener, addGlobalCustomNodeType, addNodeType, backtrack, cancelProcess, complete, completeAsynchronous, completeWithNewTokenSet, evaluateGuard, executeQueuedArcTokens, finalizeCancel, finalizeComplete, fireEvent, getParentEngine, newEngine, newJoinLangEnv, newRubricEnv, removeExecutionListener, setupScriptEnv, startProcess, startProcess, startProcess |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HibEngine()
Each application context has it's own set of global listeners. This allows different applications running the same JVM to have different sets of listeners without having to add them at the process level.
public HibEngine(String applicationContext)
Each application context has it's own set of global listeners. This allows different applications running the same JVM to have different sets of listeners without having to add them at the process level.
public HibEngine(org.hibernate.Session session)
Each application context has it's own set of global listeners. This allows different applications running the same JVM to have different sets of listeners without having to add them at the process level.
session
- The hibernate session.public HibEngine(String applicationContext, org.hibernate.Session session)
Each application context has it's own set of global listeners. This allows different applications running the same JVM to have different sets of listeners without having to add them at the process level.
session
- The hibernate session.Method Detail |
---|
public org.hibernate.Session getSession()
public void setSession(org.hibernate.Session session)
public HibGraphRepository getRepository()
Engine
GraphRepository
for this Engine
. Subclasses
may override this to provide custom behavior.
GraphRepository
for this Engine
public HibGraphFactory getFactory()
Engine
GraphFactory
for this Engine
. Subclasses
may override this provide customer behavior.
GraphFactory
which will generate the appropriate types for this Engine
.public GraphLoader<HibGraph> getLoader()
Engine
GraphLoader
for this Engine
. Subclasses
may override this provide customer behavior.
Equivalent to getLoader( null )
GraphLoader
which, by default, will use the factory and repository from this engine.public GraphLoader<HibGraph> getLoader(GraphValidator validator)
Engine
GraphLoader
for this Engine
. Subclasses
may override this provide customer behavior.
GraphLoader
which, by default, will use the factory and repository from this engine.public void addExecutionListener(GraphProcess process, Class<? extends ExecutionListener> listenerClass, ExecutionEventType... eventTypes)
Engine
ExecutionListener
Execution listeners must be thread safe. Because
listeners are specified by type, they must have a default constructor and be
instantiatable by a call to listenerClass.newInstance().
addExecutionListener
in interface Engine
addExecutionListener
in class BaseEngine
process
- The process to add the listener for, or null for all processeslistenerClass
- The listener type to be added.eventTypes
- The event types to be notified for. If no listener types are specified, the listener is added for all event types.public void removeExecutionListener(GraphProcess process, Class<? extends ExecutionListener> listenerClass, ExecutionEventType... eventTypes)
Engine
removeExecutionListener
in interface Engine
removeExecutionListener
in class BaseEngine
process
- The process to remove the listener from, or null to remove from the global listener setlistenerClass
- The type of listener to removeeventTypes
- The set of event types to remove the listener for, or none to remove for allpublic HibEngine newEngine()
BaseEngine
public List<ArcToken> getActiveArcTokens(HibTokenSet tokenSet)
public List<NodeToken> getActiveNodeTokens(HibTokenSet tokenSet)
public static void addToConfiguration(org.hibernate.cfg.AnnotationConfiguration config, boolean enableCaching)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |