Package overit.geocall.sql
Class QueryEvent
java.lang.Object
overit.geocall.util.EventHistory.Event
overit.geocall.sql.QueryEvent
- All Implemented Interfaces:
Comparable
This class defines a (weighed) event that occurs in the query execution phase (see
StandardDBStatement)
and can be traced for reasons of maintenance of an operation history, logging and debugging.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected Stringprotected Mapprotected Stringprotected intprotected longprotected longprotected StringFields inherited from class overit.geocall.util.EventHistory.Event
_sequence -
Constructor Summary
ConstructorsConstructorDescriptionQueryEvent(String lastDBClientIdentifier, String transaction, String query, Map params, int rows, long startTime, long endTime) Creates a new QueryEventQueryEvent(String transaction, String query, Map params, int rows, long startTime, long endTime) Creates a new QueryEvent -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the time, expressed in milliseconds, of the ending of the query's executionReturns the string that defines the last client identifier, for the DB, associated to the queryReturns theMapof the query's parametersgetQuery()Returns the query associated to the QueryEventintgetRows()Returns the number of the rowslongReturns the time, expressed in milliseconds, of the starting of the query's executionlonggetTime()Returns the time of query's executionReturns the string that describes the activity associated to the querylongReturns the weight of the eventMethods inherited from class overit.geocall.util.EventHistory.Event
compareTo, equals, getId, hashCode
-
Field Details
-
_query
-
_rows
protected int _rows -
_time
protected long _time -
_startTime
protected long _startTime -
_endTime
protected long _endTime -
_params
-
_transaction
-
_lastDBClientIdentifier
-
-
Constructor Details
-
QueryEvent
public QueryEvent(String transaction, String query, Map params, int rows, long startTime, long endTime) Creates a new QueryEvent- Parameters:
transaction- A string that describes the activity (transaction) associated to the queryquery- The query stringparams- The map of parameters of the queryrows- The number of the rows extracted with the querystartTime- The time, in milliseconds, of the starting of the query's executionendTime- The time, in milliseconds, of the ending of the query's execution
-
QueryEvent
public QueryEvent(String lastDBClientIdentifier, String transaction, String query, Map params, int rows, long startTime, long endTime) Creates a new QueryEvent- Parameters:
lastDBClientIdentifier- A string that describes the client identifier, for the DB, associated to the querytransaction- A string that describes the activity (transaction) associated to the queryquery- The query stringparams- The map of parameters of the queryrows- The number of the rows extracted with the querystartTime- The time, in milliseconds, of the starting of the query's executionendTime- The time, in milliseconds, of the ending of the query's execution
-
-
Method Details
-
getParams
Returns theMapof the query's parameters- Returns:
- The query's parameters
-
getWeight
public long getWeight()Returns the weight of the event- Specified by:
getWeightin classEventHistory.Event- Returns:
- The number of the rows
-
getEndTime
public long getEndTime()Returns the time, expressed in milliseconds, of the ending of the query's execution- Returns:
- The time of the ending of the query's execution
-
getQuery
Returns the query associated to the QueryEvent- Returns:
- The string that defines the query
-
getRows
public int getRows()Returns the number of the rows- Returns:
- The number of the rows
-
getStartTime
public long getStartTime()Returns the time, expressed in milliseconds, of the starting of the query's execution- Returns:
- The time of the starting of the query's execution
-
getTime
public long getTime()Returns the time of query's execution- Returns:
- End time - start time
-
getTransaction
Returns the string that describes the activity associated to the query- Returns:
- The transaction associated to the QueryEvent
-
getLastDBClientIdentifier
Returns the string that defines the last client identifier, for the DB, associated to the query- Returns:
- The last DB client identifier associated to the QueryEvent
-