org.yawlfoundation.yawl.resourcing.datastore.orgdata
Class HibernateImpl

java.lang.Object
  extended by org.yawlfoundation.yawl.resourcing.datastore.orgdata.DataSource
      extended by org.yawlfoundation.yawl.resourcing.datastore.orgdata.HibernateImpl

public class HibernateImpl
extends DataSource

This class implements methods for Organisational Data CRUD.

Author:
Michael Adams v0.1, 03/08/2007

Field Summary
 
Fields inherited from class org.yawlfoundation.yawl.resourcing.datastore.orgdata.DataSource
_name
 
Constructor Summary
HibernateImpl()
           
 
Method Summary
 boolean authenticate(String userid, String password)
          Allows a user/password pair to be passed to an external data source for validation.
 boolean delete(Object obj)
          deletes a persisted object
 int execUpdate(String query)
          Executes an low-level update command
 void importObj(Object obj)
          imports (persists) a new object into the datastore.
 String insert(Object obj)
          inserts (persists) a new object record into the datastore
 HashMap<String,Capability> loadCapabilities()
          these methods load resource entity sets individually
 HashMap<String,NonHumanCategory> loadNonHumanCategories()
           
 HashMap<String,NonHumanResource> loadNonHumanResources()
           
 HashMap<String,OrgGroup> loadOrgGroups()
           
 HashMap<String,Position> loadPositions()
           
 ResourceDataSet loadResources()
          Loads the entire contents of the org datastores into the relevant Participant, Role, Capability, Position and OrgGroup objects
 HashMap<String,Role> loadRoles()
           
 void update(Object obj)
          updates a persisted object
 
Methods inherited from class org.yawlfoundation.yawl.resourcing.datastore.orgdata.DataSource
getName, getNextID, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateImpl

public HibernateImpl()
Method Detail

loadCapabilities

public HashMap<String,Capability> loadCapabilities()
these methods load resource entity sets individually


loadRoles

public HashMap<String,Role> loadRoles()

loadPositions

public HashMap<String,Position> loadPositions()

loadOrgGroups

public HashMap<String,OrgGroup> loadOrgGroups()

loadNonHumanResources

public HashMap<String,NonHumanResource> loadNonHumanResources()

loadNonHumanCategories

public HashMap<String,NonHumanCategory> loadNonHumanCategories()

loadResources

public ResourceDataSet loadResources()
Description copied from class: DataSource
Loads the entire contents of the org datastores into the relevant Participant, Role, Capability, Position and OrgGroup objects

Specified by:
loadResources in class DataSource
Returns:
a fully populated ResourceSet

update

public void update(Object obj)
Description copied from class: DataSource
updates a persisted object

Specified by:
update in class DataSource
Parameters:
obj - the object to update

delete

public boolean delete(Object obj)
Description copied from class: DataSource
deletes a persisted object

Specified by:
delete in class DataSource
Parameters:
obj - the object to delete

insert

public String insert(Object obj)
Description copied from class: DataSource
inserts (persists) a new object record into the datastore

Specified by:
insert in class DataSource
Parameters:
obj - the object to insert
Returns:
a newly created unique identifier (primary key) for the inserted object

importObj

public void importObj(Object obj)
Description copied from class: DataSource
imports (persists) a new object into the datastore. The difference between this method and 'insert' is that insert generates a new object id - this method does not (it assumes the object already has a valid id).

Specified by:
importObj in class DataSource
Parameters:
obj - the object to insert

execUpdate

public int execUpdate(String query)
Description copied from class: DataSource
Executes an low-level update command

Specified by:
execUpdate in class DataSource
Parameters:
query - the query to execute
Returns:
the number of rows affected

authenticate

public boolean authenticate(String userid,
                            String password)
                     throws YAuthenticationException
Description copied from class: DataSource
Allows a user/password pair to be passed to an external data source for validation.

Specified by:
authenticate in class DataSource
Parameters:
userid - the userid
password - the plain-text password
Returns:
the outcome of the authentication
Throws:
YAuthenticationException


Copyright © 2004-2012 The YAWL Foundation.