Rule Execution Server API

ilog.rules.res.persistence.trace
Class IlrTraceDAOWrapper

java.lang.Object
  extended by ilog.rules.res.persistence.trace.IlrTraceDAOWrapper
All Implemented Interfaces:
IlrTraceDAO

public class IlrTraceDAOWrapper
extends 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
IlrTraceDAOWrapper(IlrTraceDAO delegate)
          Constructs a wrapper on top of a delegate trace DAO.
 
Method Summary
 void beginTransaction()
          Begins a transaction.
 void close()
          Closes the underlying transaction.
 void commit()
          Commits the underlying transaction.
 IlrTraceQuery createQuery()
          Creates and returns an IlrTraceQuery 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(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface IlrTraceDAO
Throws:
IlrTraceDAOException - if an error occurs.

close

public void close()
Description copied from interface: IlrTraceDAO
Closes the underlying transaction.

Specified by:
close in interface IlrTraceDAO

commit

public void commit()
            throws IlrTraceDAOException
Description copied from interface: IlrTraceDAO
Commits the underlying transaction.

Specified by:
commit in interface IlrTraceDAO
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 interface IlrTraceDAO

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 interface IlrTraceDAO
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 interface IlrTraceDAO
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 interface IlrTraceDAO
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 interface IlrTraceDAO
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 an IlrTraceQuery object.

Specified by:
createQuery in interface IlrTraceDAO
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 interface IlrTraceDAO
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(String executionId)
                             throws IlrTraceDAOException
Description copied from interface: IlrTraceDAO
Returns the trace that matches an execution ID (UUID).

Specified by:
findByExecutionId in interface IlrTraceDAO
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.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013