ilog.rules.res.persistence.trace
Interface IlrTraceDAO
-
- All Known Implementing Classes:
- IlrTraceDAOWrapper
public interface IlrTraceDAO
Interface for Decision Warehouse trace DAO. This interface defines the contract of the DAO that is injected into Rule Sessions, RES console, and SSP to write and read traces.Trace DAOs encapsulate transaction management via the
The following code example shows how to invoke transactional code:beginTransaction()
,commit()
androllback()
methods.try { dao.beginTransaction(); dao.xxx(); dao.commit(); } catch(IlrDAOException e) { ... dao.rollback(); ... } finally { dao.close(); }
- Since:
- 7.0
-
-
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.
-
-
-
Method Detail
-
beginTransaction
void beginTransaction() throws IlrTraceDAOException
Begins a transaction.- Throws:
IlrTraceDAOException
- if an error occurs.
-
close
void close()
Closes the underlying transaction.
-
commit
void commit() throws IlrTraceDAOException
Commits the underlying transaction.- Throws:
IlrTraceDAOException
- if an error occurred while committing.
-
rollback
void rollback()
Rollback the underlying transaction.
-
saveTrace
void saveTrace(IlrDWTrace trace, IlrSessionRequest request, IlrSessionResponse response) throws IlrTraceDAOException
Saves a given trace instance after ruleset execution.- 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
IlrTraceIterator findAllTraces() throws IlrTraceDAOException
Returns an iterator on all the execution traces stored. The transaction must be be initiated and committed or rolled-back by the client.- Throws:
IlrTraceDAOException
- if an error occurred while saving the trace.- Returns:
- An iterator on the traces.
-
deleteAllTraces
void deleteAllTraces() throws IlrTraceDAOException
Deletes all the stored traces.- Throws:
IlrTraceDAOException
- if an error occurred while deleting traces.
-
deleteTraces
void deleteTraces(IlrTraceQuery query) throws IlrTraceDAOException
Deletes the traces matching the query criteria.- Throws:
IlrTraceDAOException
- if an error occurred deleting the traces.- Parameters:
query
- The query.
-
createQuery
IlrTraceQuery createQuery()
Creates and returns anIlrTraceQuery
object.- Returns:
- A new query object that can be used to specify criteria.
-
findTraces
IlrTraceIterator findTraces(IlrTraceQuery query) throws IlrTraceDAOException
Returns a trace iterator that matches the query criteria.- 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
IlrDWTrace findByExecutionId(java.lang.String executionId) throws IlrTraceDAOException
Returns the trace that matches an execution ID (UUID).- 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.
-
-