public interface Log
| Modifier and Type | Method and Description |
|---|---|
long |
count(SessionToken session,
java.lang.String sqlWhereClause)
Counts all log entries that match the specified WHERE clause.
|
java.lang.String |
formatCondition(SessionToken session,
java.lang.String conditionFormat,
java.io.Serializable... values)
Formats the given condition format string and values to an SQL condition
that can e.g. be used in the WHERE clause of
query(SessionToken, String, int) or
read(SessionToken, String, String, int, String...). |
java.lang.String |
getName()
Returns the name of this log.
|
Schema |
getSchema()
Returns the schema of this log.
|
java.sql.ResultSet |
query(SessionToken session,
java.lang.String sqlQuery,
int maxEntries)
Executes a user-defined SQL query on the data source of the associated log
manager.
|
LogEntry |
read(SessionToken session,
long logEntryID,
java.lang.String... columnNames)
Reads the log entry with the specified ID.
|
LogEntrySet |
read(SessionToken session,
java.lang.String sqlWhereClause,
java.lang.String sqlOrderByClause,
int startEntry,
int maxEntries,
java.lang.String... columnNames)
Reads all log entries that match the specified WHERE clause.
|
LogEntrySet |
read(SessionToken session,
java.lang.String sqlWhereClause,
java.lang.String sqlOrderByClause,
int maxEntries,
java.lang.String... columnNames)
Reads all log entries that match the specified WHERE clause.
|
java.lang.String getName()
Schema getSchema()
LogEntry read(SessionToken session, long logEntryID, java.lang.String... columnNames) throws DataSourceException
session - The session which is used to check for access rights on this
method.logEntryID - ID of the desired log entrycolumnNames - the columns to be selected, i.e. that will be contained
in the returned log entry; when no column is specified, all will
be selectednull if the entry does not existDataSourceException - if an unrecoverable error occurs while
accessing the data sourceLogEntrySet read(SessionToken session, java.lang.String sqlWhereClause, java.lang.String sqlOrderByClause, int maxEntries, java.lang.String... columnNames) throws DataSourceException
This method only returns the specified number of entries; all excess entries are silently dropped.
session - The session which is used to check for access rights on this
method.sqlWhereClause - the SQL WHERE clause (without the WHERE keyword) that
determines which log entries should be read; may be null
to read them allsqlOrderByClause - the SQL ORDER BY clause (without the ORDER BY
keywords) to determine the order of the log entries (but not their
nested entries in complex columns); may be null (then the
entries are sorted by id ASC, i.e. from old to new)maxEntries - the maximum number of entries to return; the excess
entries are silently dropped; 0 disables this limitcolumnNames - the columns to be selected, i.e. that will be contained
in the returned log entry set; when no column is specified, all
will be selectedDataSourceException - if an unrecoverable error occurs while
accessing the data sourceLogEntrySet read(SessionToken session, java.lang.String sqlWhereClause, java.lang.String sqlOrderByClause, int startEntry, int maxEntries, java.lang.String... columnNames) throws DataSourceException
This method only returns the specified number of entries, starting at the specified entry (where 1 is the first entry of the unlimited result)); all excess entries are silently dropped.
session - The session which is used to check for access rights on this
method.sqlWhereClause - the SQL WHERE clause (without the WHERE keyword) that
determines which log entries should be read; may be null
to read them allsqlOrderByClause - the SQL ORDER BY clause (without the ORDER BY
keywords) to determine the order of the log entries (but not their
nested entries in complex columns); may be null (then the
entries are sorted by id ASC, i.e. from old to new)startEntry - The entry with which the result should start (with 1 being the first entry of
the unlimited result). This refers to the result set and not to any data within the
result set, that is, with a descending order, a start entry of 1 is the highest
element of the order.maxEntries - the maximum number of entries to return; the excess
entries are silently dropped; 0 disables this limitcolumnNames - the columns to be selected, i.e. that will be contained
in the returned log entry set; when no column is specified, all
will be selectedDataSourceException - if an unrecoverable error occurs while
accessing the data sourcelong count(SessionToken session, java.lang.String sqlWhereClause) throws DataSourceException
session - The session which is used to check for access rights on this
method.sqlWhereClause - the SQL WHERE clause (without the WHERE keyword) that
determines which log entries should be countedDataSourceException - if an unrecoverable error occurs while
accessing the data sourcejava.sql.ResultSet query(SessionToken session, java.lang.String sqlQuery, int maxEntries) throws java.sql.SQLException
This method is equivalent to
LogManager.query(SessionToken, String, int), to which a call is
usually redirected. See this method for more information.
session - The session which is used to check for access rights on this
method.sqlQuery - the SQL query to be executedmaxEntries - the maximum number of entries to return; the excess
entries are silently dropped; 0 disables this limitjava.sql.SQLException - if a database access error occursLogManager.query(SessionToken, String, int)java.lang.String formatCondition(SessionToken session, java.lang.String conditionFormat, java.io.Serializable... values) throws DataSourceException
query(SessionToken, String, int) or
read(SessionToken, String, String, int, String...).
This method is equivalent to
LogManager.formatCondition(SessionToken, Log, String, Serializable...),
to which a call is usually redirected. See this method for more
information.session - The session which is used to check for access rights on this
method.conditionFormat - the condition format stringvalues - the values to be filled in the condition format string; the
number of values must match the condition format stringDataSourceException - if an unrecoverable error occurs while
accessing the data source