Class SQLStatement
java.lang.Object
net.ontopia.persistence.query.sql.SQLStatement
- All Implemented Interfaces:
SQLStatementIF
INTERNAL: The default SQL statement implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected ObjectAccessIFprotected ParameterProcessorIFprotected AccessRegistrarIFprotected FieldHandlerIF[]protected int[]protected Stringprotected int -
Constructor Summary
ConstructorsConstructorDescriptionSQLStatement(String sql, FieldHandlerIF[] select_fields, ParameterProcessorIF param_processor) -
Method Summary
Modifier and TypeMethodDescriptionexecuteQuery(Connection conn) INTERNAL: Execute the statement without any parameters and return a JDBC result set.executeQuery(Connection conn, Object[] params) INTERNAL: Execute the statement with parameters and return a JDBC result set.executeQuery(Connection conn, Map params) INTERNAL: Execute the statement with parameters and return a JDBC result set.getSQL()intgetWidth()INTERNAL: Returns the number of fields that will be selected by the statement.INTERNAL: Read the field value of the specified index from the current row in the result set.Object[]readValues(TicketIF ticket, ResultSet rs, boolean lookup_identities) INTERNAL: Reads all the field values from the current row in the result set.Object[]readValues(TicketIF ticket, ResultSet rs, Object[] values, boolean lookup_identities) INTERNAL: Reads all the field values from the current row into the specified value array.voidsetAccessRegistrar(AccessRegistrarIF registrar) voidsetFetchSize(int fetchSize) voidsetObjectAccess(ObjectAccessIF oaccess) toString()
-
Field Details
-
oaccess
-
registrar
-
sql
-
fetchSize
protected int fetchSize -
width
protected int width -
select_offsets
protected int[] select_offsets -
select_fields
-
param_processor
-
-
Constructor Details
-
SQLStatement
public SQLStatement(String sql, FieldHandlerIF[] select_fields, ParameterProcessorIF param_processor)
-
-
Method Details
-
setObjectAccess
- Specified by:
setObjectAccessin interfaceSQLStatementIF
-
setAccessRegistrar
- Specified by:
setAccessRegistrarin interfaceSQLStatementIF
-
getTicket
- Specified by:
getTicketin interfaceSQLStatementIF
-
setFetchSize
public void setFetchSize(int fetchSize) -
getWidth
public int getWidth()Description copied from interface:SQLStatementIFINTERNAL: Returns the number of fields that will be selected by the statement.- Specified by:
getWidthin interfaceSQLStatementIF
-
getSQL
-
executeQuery
Description copied from interface:SQLStatementIFINTERNAL: Execute the statement without any parameters and return a JDBC result set.- Specified by:
executeQueryin interfaceSQLStatementIF- Throws:
Exception
-
executeQuery
Description copied from interface:SQLStatementIFINTERNAL: Execute the statement with parameters and return a JDBC result set.- Specified by:
executeQueryin interfaceSQLStatementIF- Throws:
Exception
-
executeQuery
Description copied from interface:SQLStatementIFINTERNAL: Execute the statement with parameters and return a JDBC result set.- Specified by:
executeQueryin interfaceSQLStatementIF- Throws:
Exception
-
readValue
public Object readValue(TicketIF ticket, ResultSet rs, int index, boolean lookup_identity) throws Exception Description copied from interface:SQLStatementIFINTERNAL: Read the field value of the specified index from the current row in the result set.If the field is an identity field or a reference field, the object identity will be extracted and the identity will be used to look up the object in the transaction.
- Specified by:
readValuein interfaceSQLStatementIF- Throws:
Exception
-
readValues
public Object[] readValues(TicketIF ticket, ResultSet rs, Object[] values, boolean lookup_identities) throws Exception Description copied from interface:SQLStatementIFINTERNAL: Reads all the field values from the current row into the specified value array. Note that this array must have a width that is equal or greater than the width of the result.- Specified by:
readValuesin interfaceSQLStatementIF- Throws:
Exception
-
readValues
public Object[] readValues(TicketIF ticket, ResultSet rs, boolean lookup_identities) throws Exception Description copied from interface:SQLStatementIFINTERNAL: Reads all the field values from the current row in the result set.- Specified by:
readValuesin interfaceSQLStatementIF- Throws:
Exception
-
toString
-