org.yawlfoundation.yawl.worklet.support
Class DBManager

java.lang.Object
  extended by org.yawlfoundation.yawl.worklet.support.DBManager

public class DBManager
extends Object

The DBManager class provides persistence support for the Worklet Service.

Author:
Michael Adams v0.8, 04-09/2006

Field Summary
static int DB_DELETE
           
static int DB_INSERT
           
static int DB_UPDATE
           
 
Method Summary
 void closeFactory()
           
static DBManager getInstance(boolean persistenceOn)
          returns the current DBManager instance
 List getObjectsForClass(String className)
          returns all the instances currently persisted for the class passed
 void initialise()
          initialises the worklet tables in the database
 boolean isPersisting()
          returns true if this instance is persisting
 void persist(Object obj, int action)
          persists the object instance passed
 void persist(String query, int action)
          executes a query against the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DB_UPDATE

public static final int DB_UPDATE
See Also:
Constant Field Values

DB_DELETE

public static final int DB_DELETE
See Also:
Constant Field Values

DB_INSERT

public static final int DB_INSERT
See Also:
Constant Field Values
Method Detail

initialise

public void initialise()
                throws org.hibernate.HibernateException
initialises the worklet tables in the database

Throws:
org.hibernate.HibernateException

getInstance

public static DBManager getInstance(boolean persistenceOn)
returns the current DBManager instance


closeFactory

public void closeFactory()

isPersisting

public boolean isPersisting()
returns true if this instance is persisting


persist

public void persist(String query,
                    int action)
executes a query against the database

Parameters:
query - - the sql query to execute
action - - the type of action performed

persist

public void persist(Object obj,
                    int action)
persists the object instance passed

Parameters:
obj - - an instance of the object to persist
action - - type type of action performed

getObjectsForClass

public List getObjectsForClass(String className)
returns all the instances currently persisted for the class passed

Parameters:
className - - the name of the class to retrieve instances of
Returns:
a List of the instances retrieved


Copyright © 2004-2012 The YAWL Foundation.