Top Description Methods
org.hibernate.resource.jdbc.spi

public Interface StatementInspector

extends Serializable
Known Direct Implementers
org.hibernate.resource.jdbc.internal.EmptyStatementInspector
Imports
java.io.Serializable

Implementors may inspect and even process each SQL command issued by a session, before a JDBC statement is prepared. A StatementInspector may be either:

An implementation may be specified via the configuration property hibernate.session_factory.statement_inspector. An implementation registered this way is shared between sessions.

Author
Steve Ebersole
See Also
org.hibernate.cfg.AvailableSettings#STATEMENT_INSPECTOR, org.hibernate.cfg.Configuration#setStatementInspector(StatementInspector), org.hibernate.boot.SessionFactoryBuilder#applyStatementInspector(StatementInspector), org.hibernate.SessionBuilder#statementInspector(StatementInspector)

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The processed SQL to use; may be null
inspect
(String
The SQL to inspect
sql
)

Inspect the given SQL command, possibly returning a different SQL command to be used instead.

Method Detail

inspectback to summary
public String inspect(String sql)

Inspect the given SQL command, possibly returning a different SQL command to be used instead. A null return value is interpreted as if the method had returned its argument.

Parameters
sql:String

The SQL to inspect

Returns:String

The processed SQL to use; may be null