Package org.ametys.plugins.workflow
Class JDBCPropertySet
- java.lang.Object
-
- com.opensymphony.module.propertyset.AbstractPropertySet
-
- com.opensymphony.module.propertyset.database.JDBCPropertySet
-
- org.ametys.plugins.workflow.JDBCPropertySet
-
- All Implemented Interfaces:
com.opensymphony.module.propertyset.PropertySet
public class JDBCPropertySet extends com.opensymphony.module.propertyset.database.JDBCPropertySet
JDBC implementation for PropertySet without JNDI.
Use a cocoon connection pool instead.
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__GLOBAL_KEY_COL
private static String
__ITEM_KEY_COL
private static String
__ITEM_TYPE_COL
private static Log
__log
private static String
__STRING_COL
private static String
__TABLE_NAME
protected DataSource
_ds
datasourcestatic String
OSWF_PREFIX
Prefix for osworkflow entries
-
Constructor Summary
Constructors Constructor Description JDBCPropertySet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static List
__doExpressionQuery(DataSource ds, String query, List values)
private static Long
__getWorkflowID(String globalKey)
private static String
_getCondition(DataSource ds, com.opensymphony.workflow.query.Expression e, List<String> values)
private static String
_getCondition(PropertySetExpression e, List<String> values)
protected void
cleanup(Connection connection, Statement statement, ResultSet result)
protected Connection
getConnection()
void
init(Map config, Map args)
static boolean
isPropertySetExpressionsNested(com.opensymphony.workflow.query.NestedExpression expr)
Test if an expression contains only nested PropertySet expression.static List
query(DataSource ds, com.opensymphony.workflow.query.Expression e)
Process a query from an osworkflow expression.-
Methods inherited from class com.opensymphony.module.propertyset.database.JDBCPropertySet
exists, get, getKeys, getType, remove, remove, setImpl, supportsType
-
Methods inherited from class com.opensymphony.module.propertyset.AbstractPropertySet
getAsActualType, getBoolean, getData, getDate, getDouble, getInt, getKeys, getKeys, getKeys, getLong, getObject, getProperties, getSchema, getString, getText, getXML, isSettable, setAsActualType, setBoolean, setData, setDate, setDouble, setInt, setLong, setObject, setProperties, setSchema, setString, setText, setXML, supportsTypes, toString, type, type
-
-
-
-
Field Detail
-
OSWF_PREFIX
public static final String OSWF_PREFIX
Prefix for osworkflow entries- See Also:
- Constant Field Values
-
__TABLE_NAME
private static final String __TABLE_NAME
- See Also:
- Constant Field Values
-
__GLOBAL_KEY_COL
private static final String __GLOBAL_KEY_COL
- See Also:
- Constant Field Values
-
__ITEM_KEY_COL
private static final String __ITEM_KEY_COL
- See Also:
- Constant Field Values
-
__ITEM_TYPE_COL
private static final String __ITEM_TYPE_COL
- See Also:
- Constant Field Values
-
__STRING_COL
private static final String __STRING_COL
- See Also:
- Constant Field Values
-
_ds
protected DataSource _ds
datasource
-
-
Constructor Detail
-
JDBCPropertySet
public JDBCPropertySet()
-
-
Method Detail
-
init
public void init(Map config, Map args)
- Specified by:
init
in interfacecom.opensymphony.module.propertyset.PropertySet
- Overrides:
init
in classcom.opensymphony.module.propertyset.database.JDBCPropertySet
-
getConnection
protected Connection getConnection() throws SQLException
- Overrides:
getConnection
in classcom.opensymphony.module.propertyset.database.JDBCPropertySet
- Throws:
SQLException
-
cleanup
protected void cleanup(Connection connection, Statement statement, ResultSet result)
- Overrides:
cleanup
in classcom.opensymphony.module.propertyset.database.JDBCPropertySet
-
isPropertySetExpressionsNested
public static boolean isPropertySetExpressionsNested(com.opensymphony.workflow.query.NestedExpression expr) throws com.opensymphony.workflow.StoreException
Test if an expression contains only nested PropertySet expression.- Parameters:
expr
- The nested expression to test.- Returns:
true
if the expression contains only PropertySet expression,false
otherwise.- Throws:
com.opensymphony.workflow.StoreException
- If an error occurs.
-
query
public static List query(DataSource ds, com.opensymphony.workflow.query.Expression e) throws com.opensymphony.workflow.StoreException
Process a query from an osworkflow expression.- Parameters:
ds
- The datasourcee
- The expression.- Returns:
- The result as a List of Long (Workflow ID).
- Throws:
com.opensymphony.workflow.StoreException
- If an error occurs.
-
_getCondition
private static String _getCondition(DataSource ds, com.opensymphony.workflow.query.Expression e, List<String> values) throws com.opensymphony.workflow.StoreException
- Throws:
com.opensymphony.workflow.StoreException
-
_getCondition
private static String _getCondition(PropertySetExpression e, List<String> values) throws com.opensymphony.workflow.StoreException
- Throws:
com.opensymphony.workflow.StoreException
-
__doExpressionQuery
private static List __doExpressionQuery(DataSource ds, String query, List values) throws com.opensymphony.workflow.StoreException
- Throws:
com.opensymphony.workflow.StoreException
-
__getWorkflowID
private static Long __getWorkflowID(String globalKey)
-
-