# Uses of Interface
org.apache.cayenne.access.translator.TranslatedStatement

Packages that use TranslatedStatement
Package
Description
org.apache.cayenne
Contains persistence APIs directly accessible by users.
org.apache.cayenne.access
Contains classes that make up Cayenne ORM stack.
org.apache.cayenne.access.translator
org.apache.cayenne.log

- ## Uses of TranslatedStatement in org.apache.cayenne

  Methods in org.apache.cayenne that return TranslatedStatement
  Modifier and Type
  Method
  Description
  `TranslatedStatement`
  CayenneSqlException.`getStatement()`
  Returns the statement that was being executed when the failure occurred, or null if it is not known.
  Constructors in org.apache.cayenne with parameters of type TranslatedStatement
  Modifier
  Constructor
  Description
  ``
  `CayenneSqlException(String message, Query query, TranslatedStatement statement, Throwable cause)`
  Creates an exception for a failure that happened while executing the provided query and statement.

- ## Uses of TranslatedStatement in org.apache.cayenne.access

  Methods in org.apache.cayenne.access that return TranslatedStatement
  Modifier and Type
  Method
  Description
  `TranslatedStatement`
  OptimisticLockException.`getStatement()`
  Methods in org.apache.cayenne.access with parameters of type TranslatedStatement
  Modifier and Type
  Method
  Description
  `default void`
  OperationObserver.`nextStatement(Query query, TranslatedStatement statement)`
  Callback invoked with the translated form of a query (its SQL and bindings) just before the statement is executed.
  Constructors in org.apache.cayenne.access with parameters of type TranslatedStatement
  Modifier
  Constructor
  Description
  ``
  `OptimisticLockException(ObjectId id, DbEntity rootEntity, Map<String,?> qualifierSnapshot, TranslatedStatement statement)`

- ## Uses of TranslatedStatement in org.apache.cayenne.access.translator

  Classes in org.apache.cayenne.access.translator that implement TranslatedStatement
  Modifier and Type
  Class
  Description
  `final record`
  `TranslatedBatch`
  An immutable result of translating a batch query: the SQL String shared by all rows of the batch, and one `PSBatchParameter` per PreparedStatement placeholder, each carrying the values of all batch rows for its placeholder.
  `final record`
  `TranslatedProcedure`
  An immutable result of translating a `ProcedureQuery` to a stored procedure call.
  `final record`
  `TranslatedSelect`
  An immutable result of translating a `Select` query to SQL, produced by `SelectTranslator.translate(Select, DbAdapter, EntityResolver)`.
  `final record`
  `TranslatedSQL`
  A translated form of a Query used to generated PreparedStatements.

- ## Uses of TranslatedStatement in org.apache.cayenne.log

  Methods in org.apache.cayenne.log with parameters of type TranslatedStatement
  Modifier and Type
  Method
  Description
  `void`
  NoopSQLLogger.`logQueryError(TranslatedStatement statement, Throwable error, long durationMillis)`
  `void`
  Slf4jSQLLogger.`logQueryError(TranslatedStatement statement, Throwable error, long durationMillis)`
  `void`
  SQLLogger.`logQueryError(TranslatedStatement statement, Throwable error, long durationMillis)`
  Logs, at the ERROR level, the statement that was in progress when a query exception occurred: SQL + `bind:[...]` + the error message, followed by a trailing `time_ms:N` block with the time elapsed until the failure.
  `void`
  NoopSQLLogger.`logSelect(TranslatedStatement statement, int rowCount, long durationMillis)`
  `void`
  Slf4jSQLLogger.`logSelect(TranslatedStatement statement, int rowCount, long durationMillis)`
  `void`
  SQLLogger.`logSelect(TranslatedStatement statement, int rowCount, long durationMillis)`
  Logs the main line for a statement that returned a result set: SQL + `bind:[...]` + `selected:N`, followed by a trailing `time_ms:N` block with the statement's execution time.
  `void`
  NoopSQLLogger.`logUpdate(TranslatedStatement statement, int rowCount, List<? extends Map<String,?>> generatedKeys, long durationMillis)`
  `void`
  Slf4jSQLLogger.`logUpdate(TranslatedStatement statement, int rowCount, List<? extends Map<String,?>> generatedKeys, long durationMillis)`
  `void`
  SQLLogger.`logUpdate(TranslatedStatement statement, int rowCount, List<? extends Map<String,?>> generatedKeys, long durationMillis)`
  Logs the main line for a statement that performed an update: SQL + `bind:[...]` + `updated:N`, optionally followed by a `generated:[...]` block listing any database-generated keys, and a trailing `time_ms:N` block with the statement's execution time.