Package org.kawanfw.sql.api.server
Class SqlEvent
java.lang.Object
org.kawanfw.sql.api.server.SqlEvent
public class SqlEvent extends Object
Allows to get all details of a SQL event asked by the client side.
- Since:
- 9.0
- Author:
- Nicolas de Pomereu
-
Method Summary
Modifier and Type Method Description String
getDatabase()
Returns the database name.String
getIpAddress()
Returns the IP address of the client user.List<String>
getParameterStringValues()
Returns the parameter String values of a prepared statement in the natural order, empty list for a (non prepared) statement.List<Object>
getParameterValues()
Returns the parameter values of a prepared statement in the natural order, empty list for a (non prepared) statement.String
getSql()
Returns the SQL statement to execute.String
getUsername()
Returns the client username that asked for the SQL request.boolean
isMetadataQuery()
Says if the SQL event is a special Metadata query.boolean
isPreparedStatement()
Returnstrue
if the statement is aPreparedStatement
, elsefalse
.String
toString()
-
Method Details
-
getUsername
Returns the client username that asked for the SQL request.- Returns:
- the client username that asked for the SQL request
-
getDatabase
Returns the database name.- Returns:
- the database name
-
getIpAddress
Returns the IP address of the client user.- Returns:
- the IP address of the client user
-
getSql
Returns the SQL statement to execute.- Returns:
- the SQL statement to execute
-
isPreparedStatement
public boolean isPreparedStatement()Returnstrue
if the statement is aPreparedStatement
, elsefalse
.- Returns:
true
if the statement is aPreparedStatement
, elsefalse
-
getParameterValues
Returns the parameter values of a prepared statement in the natural order, empty list for a (non prepared) statement.- Returns:
- the parameter values of a prepared statement in the natural order, empty list for a (non prepared) statement
-
getParameterStringValues
Returns the parameter String values of a prepared statement in the natural order, empty list for a (non prepared) statement.- Returns:
- the parameter String values of a prepared statement in the natural order, empty list for a (non prepared) statement
-
isMetadataQuery
public boolean isMetadataQuery()Says if the SQL event is a special Metadata query.- Returns:
true
if the SQL event is a special Metadata query, elsefalse
-
toString
-