public abstract class AbstractExternalDBGateway
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected HibernateEngine |
_dbEngine |
protected org.apache.logging.log4j.Logger |
_log |
| Constructor and Description |
|---|
AbstractExternalDBGateway() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureSession(java.lang.String propertiesFileName,
java.util.List<java.lang.Class> classes)
Configures the engine to the database specified in a properties file
|
protected void |
configureSession(java.lang.String dialect,
java.lang.String driver,
java.lang.String url,
java.lang.String username,
java.lang.String password,
java.util.List<java.lang.Class> classes)
Configures the engine to the database specified.
|
abstract java.lang.String |
getDescription() |
abstract Element |
populateCaseData(YSpecificationID specID,
java.lang.String caseID,
java.util.List<YParameter> inputParams,
java.util.List<YVariable> localVars,
Element caseDataTemplate)
Populates the case data template passed with values selected from a database.
|
abstract Element |
populateTaskParameter(YTask task,
YParameter param,
Element caseData)
Populates the task parameter passed with a value selected from a database.
|
java.lang.String |
toXML() |
abstract void |
updateFromCaseData(YSpecificationID specID,
java.lang.String caseID,
java.util.List<YParameter> outputParams,
Element updatingData)
Update the database with the case's values.
|
abstract void |
updateFromTaskCompletion(java.lang.String paramName,
Element outputData,
Element caseData)
Update the database with the workitem's values.
|
protected org.apache.logging.log4j.Logger _log
protected HibernateEngine _dbEngine
protected void configureSession(java.lang.String dialect,
java.lang.String driver,
java.lang.String url,
java.lang.String username,
java.lang.String password,
java.util.List<java.lang.Class> classes)
dialect - the database dialect (e.g. "org.hibernate.dialect.PostgreSQLDialect")driver - the database driver (e.g. "org.postgresql.Driver")url - the database url (e.g. "jdbc:postgresql:yawl")username - the logon name for the databasepassword - the logon passwordclasses - a list of classes for Hibernate to use to converse with the
underlying tables (can be null if no classes are involved)protected void configureSession(java.lang.String propertiesFileName,
java.util.List<java.lang.Class> classes)
propertiesFileName - the full path & name of the properties filepublic java.lang.String toXML()
public abstract java.lang.String getDescription()
public abstract Element populateTaskParameter(YTask task, YParameter param, Element caseData)
task - the task template for the starting workitem.param - the name of the parameter that requires values.caseData - the current set of case variables and values.public abstract void updateFromTaskCompletion(java.lang.String paramName,
Element outputData,
Element caseData)
paramName - the name of the task of which this workitem is an instance.outputData - the datalist from which the corresponding database values are
to be updated.caseData - the current set of case variables and values.public abstract Element populateCaseData(YSpecificationID specID, java.lang.String caseID, java.util.List<YParameter> inputParams, java.util.List<YVariable> localVars, Element caseDataTemplate)
specID - the specification identifier of the case.caseID - the case identifier.inputParams - the input parameters that require values.localVars - the local variables (optionally change their initial values).caseDataTemplate - the data structure that requires values.public abstract void updateFromCaseData(YSpecificationID specID, java.lang.String caseID, java.util.List<YParameter> outputParams, Element updatingData)
specID - the specification identifier of the case.caseID - the case identifier.outputParams - the output parameters for the case.updatingData - the datalist from which the corresponding database values are
to be updated.Copyright © 2004-2014 The YAWL Foundation.