org.deltava.dao
Class GetSystemLog

java.lang.Object
  extended by org.deltava.dao.DAO
      extended by org.deltava.dao.GetSystemLog

public class GetSystemLog
extends DAO

A Data Access Object to read System Log entries.

Since:
1.0
Version:
1.0
Author:
Luke

Field Summary
 
Fields inherited from class org.deltava.dao.DAO
_ps, _queryMax, _queryStart, _queryTimeout
 
Constructor Summary
GetSystemLog(Connection c)
          Initialize the Data Access Object.
 
Method Summary
 List<LogEntry> getAll()
          Gets all Log Entries from a particular System Log table.
 List<LogEntry> getByType(String className)
          Gets all Log Entries from a particular logger or package.
 void setDateRange(Date sd, Date ed)
          Sets the date range to query.
 void setName(String name)
          Sets the log name to query.
 void setPriority(int p)
          Sets the log priority to query.
 
Methods inherited from class org.deltava.dao.DAO
commitTransaction, createTimestamp, executeUpdate, expandDate, formatDBName, getNewID, getQueryCount, prepareStatement, prepareStatementWithoutLimits, rollbackTransaction, setManualCommit, setQueryMax, setQueryStart, setQueryTimeout, startTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetSystemLog

public GetSystemLog(Connection c)
Initialize the Data Access Object.

Parameters:
c - the JDBC connection to use
Method Detail

setName

public void setName(String name)
Sets the log name to query.

Parameters:
name - the log name

setDateRange

public void setDateRange(Date sd,
                         Date ed)
Sets the date range to query.

Parameters:
sd - the start date/time
ed - the end date/time

setPriority

public void setPriority(int p)
Sets the log priority to query.

Parameters:
p - the priority code

getAll

public List<LogEntry> getAll()
                      throws DAOException
Gets all Log Entries from a particular System Log table.

Returns:
a List of LogEntry beans
Throws:
DAOException - if a JDBC error occurs

getByType

public List<LogEntry> getByType(String className)
                         throws DAOException
Gets all Log Entries from a particular logger or package. This call will perform a LIKE comparison on the logger name, so passing com.foo will return entries for com.foo.x1 and com.foo.x2.

Parameters:
className - the logger class name or portion thereof
Returns:
a List of LogEntry beans
Throws:
DAOException - if a JDBC error occurs


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.