com.onewebsql.dao.monitors
Class Log4JDaoMonitor

java.lang.Object
  extended by com.onewebsql.dao.monitors.Log4JDaoMonitor
All Implemented Interfaces:
DaoMonitor

public class Log4JDaoMonitor
extends Object
implements DaoMonitor

DAO monitor which logs information using Log4J.


Constructor Summary
Log4JDaoMonitor()
          Constructor.
 
Method Summary
 void delete(DAO<?> dao, String deleteStatement, List<Value> parameters)
          Callback of DELETE statement.
 org.apache.log4j.Logger getLogger(DAO<?> dao)
          Returns a logger associated with the specified DAO object.
 void insert(DAO<?> dao, String insertStatement, List<Value> parameters)
          Callback of INSERT statement.
 void selectObjectList(DAO<?> dao, String queryString, List<Value> parameters)
          Callback of SELECT query.
 void update(DAO<?> dao, String updateStatement, List<Value> parameters)
          Callback of UPDATE statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4JDaoMonitor

public Log4JDaoMonitor()
Constructor.

Method Detail

selectObjectList

public void selectObjectList(DAO<?> dao,
                             String queryString,
                             List<Value> parameters)
Description copied from interface: DaoMonitor
Callback of SELECT query.

Specified by:
selectObjectList in interface DaoMonitor
Parameters:
dao - DAO object
queryString - SQL query
parameters - SQL query parameters.

insert

public void insert(DAO<?> dao,
                   String insertStatement,
                   List<Value> parameters)
Description copied from interface: DaoMonitor
Callback of INSERT statement.

Specified by:
insert in interface DaoMonitor
Parameters:
dao - DAO object
insertStatement - SQL insert statement
parameters - SQL statement parameters.

update

public void update(DAO<?> dao,
                   String updateStatement,
                   List<Value> parameters)
Description copied from interface: DaoMonitor
Callback of UPDATE statement.

Specified by:
update in interface DaoMonitor
Parameters:
dao - DAO object
updateStatement - SQL update statement
parameters - SQL statement parameters

delete

public void delete(DAO<?> dao,
                   String deleteStatement,
                   List<Value> parameters)
Description copied from interface: DaoMonitor
Callback of DELETE statement.

Specified by:
delete in interface DaoMonitor
Parameters:
dao - DAO object
deleteStatement - SQL delete statement
parameters - SQL statement parameters

getLogger

public org.apache.log4j.Logger getLogger(DAO<?> dao)
Returns a logger associated with the specified DAO object.

Parameters:
dao - DAO object
Returns:
logger associated with the specified DAO object


Copyright © 2011-2013 e-point SA. All Rights Reserved.