Class ProcedureTranslator
java.lang.Object
org.apache.cayenne.access.translator.procedure.ProcedureTranslator
- Direct Known Subclasses:
HSQLDBProcedureTranslator
Stored procedure query translator.
-
Field Summary
Modifier and TypeFieldDescriptionprotected DbAdapter
protected List
<ProcedureParameter> protected Connection
protected EntityResolver
protected JdbcEventLogger
protected ProcedureQuery
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
Creates an SQL String for the stored procedure call.Creates and binds a PreparedStatement to execute query SQL via JDBC.protected void
Set IN and OUT parameters.protected void
void
setAdapter
(DbAdapter adapter) void
setConnection
(Connection connection) void
setEntityResolver
(EntityResolver entityResolver) protected void
setInParam
(CallableStatement stmt, ProcedureParameter param, Object val, int pos) Sets a single IN parameter of the CallableStatement.void
setJdbcEventLogger
(JdbcEventLogger logger) protected void
setOutParam
(CallableStatement stmt, ProcedureParameter param, int pos) Sets a single OUT parameter of the CallableStatement.void
setQuery
(ProcedureQuery query)
-
Field Details
-
query
-
connection
-
adapter
-
entityResolver
-
callParams
-
values
-
logger
-
-
Constructor Details
-
ProcedureTranslator
public ProcedureTranslator()
-
-
Method Details
-
setQuery
-
setConnection
-
setAdapter
-
setJdbcEventLogger
- Since:
- 3.1
-
getJdbcEventLogger
- Since:
- 3.1
-
setEntityResolver
- Since:
- 1.2
-
createSqlString
Creates an SQL String for the stored procedure call. -
createStatement
Creates and binds a PreparedStatement to execute query SQL via JDBC.- Throws:
Exception
-
getProcedure
-
getProcedureQuery
-
initStatement
Set IN and OUT parameters.- Throws:
Exception
-
initValues
protected void initValues() -
setInParam
protected void setInParam(CallableStatement stmt, ProcedureParameter param, Object val, int pos) throws Exception Sets a single IN parameter of the CallableStatement.- Throws:
Exception
-
setOutParam
protected void setOutParam(CallableStatement stmt, ProcedureParameter param, int pos) throws Exception Sets a single OUT parameter of the CallableStatement.- Throws:
Exception
-