StatementFacade.StatementProxy (Apache Tomcat 9.0.120 API Documentation)
Description: declaration: package: org.apache.tomcat.jdbc.pool, class: StatementFacade, class: StatementProxy

# Class StatementFacade.StatementProxy

java.lang.Object
org.apache.tomcat.jdbc.pool.StatementFacade.StatementProxy

All Implemented Interfaces:
  `InvocationHandler`

Enclosing class:
  `StatementFacade`

protected class StatementFacade.StatementProxy extends Object implements InvocationHandler
Proxy for a SQL statement used to measure query execute time.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected boolean`
  `closed`
  Indicates whether this statement has been closed.
  `protected Object`
  `delegate`
  The delegated statement.
  `protected final String`
  `query`
  The SQL query text.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StatementProxy(Object parent, String query)`
  Constructs a StatementProxy.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `int`
  `hashCode()`
  `Object`
  `invoke(Object proxy, Method method, Object[] args)`
  `String`
  `toString()`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### closed

    protected boolean closed
    Indicates whether this statement has been closed.

  - ### delegate

    protected Object delegate
    The delegated statement.

  - ### query

    protected final String query
    The SQL query text.

- ## Constructor Details

  - ### StatementProxy

    public StatementProxy(Object parent, String query)
    Constructs a StatementProxy.
    Parameters:
      `parent` - the parent statement
      `query` - the SQL query text

- ## Method Details

  - ### invoke

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
    Specified by:
      `invoke` in interface `InvocationHandler`
    Throws:
      `Throwable`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`