ilog.rules.res.persistence.trace
Class IlrTraceDAOWrapper
- java.lang.Object
-
- ilog.rules.res.persistence.trace.IlrTraceDAOWrapper
-
- All Implemented Interfaces:
- IlrTraceDAO
public class IlrTraceDAOWrapper extends java.lang.Object implements IlrTraceDAO
A DAO wrapper trace utility class. Use this class to extend the default behavior of the JRules trace DAOs. // * @since 7.0
-
-
Constructor Summary
Constructors Constructor and Description IlrTraceDAOWrapper(IlrTraceDAO delegate)
Constructs a wrapper on top of a delegate trace DAO.
-
Method Summary
Methods Modifier and Type Method and Description void
beginTransaction()
Begins a transaction.void
close()
Closes the underlying transaction.void
commit()
Commits the underlying transaction.IlrTraceQuery
createQuery()
Creates and returns anIlrTraceQuery
object.void
deleteAllTraces()
Deletes all the stored traces.void
deleteTraces(IlrTraceQuery query)
Deletes the traces matching the query criteria.IlrTraceIterator
findAllTraces()
Returns an iterator on all the execution traces stored.IlrDWTrace
findByExecutionId(java.lang.String executionId)
Returns the trace that matches an execution ID (UUID).IlrTraceIterator
findTraces(IlrTraceQuery query)
Returns a trace iterator that matches the query criteria.void
rollback()
Rollback the underlying transaction.void
saveTrace(IlrDWTrace trace, IlrSessionRequest request, IlrSessionResponse response)
Saves a given trace instance after ruleset execution.
-
-
-
Constructor Detail
-
IlrTraceDAOWrapper
public IlrTraceDAOWrapper(IlrTraceDAO delegate)
Constructs a wrapper on top of a delegate trace DAO.- Parameters:
delegate
- The original trace DAO.
-
-
Method Detail
-
beginTransaction
public void beginTransaction() throws IlrTraceDAOException
Description copied from interface:IlrTraceDAO
Begins a transaction.- Specified by:
beginTransaction
in interfaceIlrTraceDAO
- Throws:
IlrTraceDAOException
- if an error occurs.
-
close
public void close()
Description copied from interface:IlrTraceDAO
Closes the underlying transaction.- Specified by:
close
in interfaceIlrTraceDAO
-
commit
public void commit() throws IlrTraceDAOException
Description copied from interface:IlrTraceDAO
Commits the underlying transaction.- Specified by:
commit
in interfaceIlrTraceDAO
- Throws:
IlrTraceDAOException
- if an error occurred while committing.
-
rollback
public void rollback()
Description copied from interface:IlrTraceDAO
Rollback the underlying transaction.- Specified by:
rollback
in interfaceIlrTraceDAO
-
saveTrace
public void saveTrace(IlrDWTrace trace, IlrSessionRequest request, IlrSessionResponse response) throws IlrTraceDAOException
Description copied from interface:IlrTraceDAO
Saves a given trace instance after ruleset execution.- Specified by:
saveTrace
in interfaceIlrTraceDAO
- Throws:
IlrTraceDAOException
- if an error occurred while saving the trace.- Parameters:
trace
- The Decision Warehouse trace instance to save.request
- The session request used for the execution.response
- The session response returned by the execution.
-
findAllTraces
public IlrTraceIterator findAllTraces() throws IlrTraceDAOException
Description copied from interface:IlrTraceDAO
Returns an iterator on all the execution traces stored. The transaction must be be initiated and committed or rolled-back by the client.- Specified by:
findAllTraces
in interfaceIlrTraceDAO
- Throws:
IlrTraceDAOException
- if an error occurred while saving the trace.- Returns:
- An iterator on the traces.
-
deleteAllTraces
public void deleteAllTraces() throws IlrTraceDAOException
Description copied from interface:IlrTraceDAO
Deletes all the stored traces.- Specified by:
deleteAllTraces
in interfaceIlrTraceDAO
- Throws:
IlrTraceDAOException
- if an error occurred while deleting traces.
-
deleteTraces
public void deleteTraces(IlrTraceQuery query) throws IlrTraceDAOException
Description copied from interface:IlrTraceDAO
Deletes the traces matching the query criteria.- Specified by:
deleteTraces
in interfaceIlrTraceDAO
- Throws:
IlrTraceDAOException
- if an error occurred deleting the traces.- Parameters:
query
- The query.
-
createQuery
public IlrTraceQuery createQuery()
Description copied from interface:IlrTraceDAO
Creates and returns anIlrTraceQuery
object.- Specified by:
createQuery
in interfaceIlrTraceDAO
- Returns:
- A new query object that can be used to specify criteria.
-
findTraces
public IlrTraceIterator findTraces(IlrTraceQuery query) throws IlrTraceDAOException
Description copied from interface:IlrTraceDAO
Returns a trace iterator that matches the query criteria.- Specified by:
findTraces
in interfaceIlrTraceDAO
- Throws:
IlrTraceDAOException
- if an error occurred while searching for the trace.- Parameters:
query
- A query that specifies the search criteria.- Returns:
- An iterator on the retrieved traces.
-
findByExecutionId
public IlrDWTrace findByExecutionId(java.lang.String executionId) throws IlrTraceDAOException
Description copied from interface:IlrTraceDAO
Returns the trace that matches an execution ID (UUID).- Specified by:
findByExecutionId
in interfaceIlrTraceDAO
- Throws:
IlrTraceDAOException
- if an error occurred while searching for the trace.- Parameters:
executionId
- The execution ID to search for.- Returns:
- The trace matching
executionId
. If no matching trace is found,null
is returned.
-
-