public interface java.sql
QueryObjectGenerator


Hide details Login
Java SE 6
  

This interface is provided for JDBC driver vendors who choose to provide their own implementation of QueryObjectGenerator to process the standard JDBC annotations and provide the mapping between a DataSet and the underlying data store. A reference implementation of QueryObjectGenerator is provided with Java SE.
since1.6

Methods
public BaseQuery<T> createQueryObject(Class ifc, DataSource ds) throws SQLException
Creates a concrete implementation of a Query interface using the JDBC drivers QueryObjectGenerator implementation.

ifcThe Query interface that will be created
dsThe DataSource that will be used when invoking methods that access the data source. The QueryObjectGenerator implementation will use this DataSource without any unwrapping or modications to create connections to the data source.
returnAn concrete implementation of a Query interface
ThrowsSQLException: if a database access error occurs.
since1.6

public BaseQuery<T> createQueryObject(Class ifc, Connection con) throws SQLException
Creates a concrete implementation of a Query interface using the JDBC drivers QueryObjectGenerator implementation.

ifcThe Query interface that will be created
conThe Connection that will be used when invoking methods that access the data source. The QueryObjectGenerator implementation will use this Connection without any unwrapping or modications to create statements from the data source.
returnAn concrete implementation of a Query interface
ThrowsSQLException: if a database access error occurs.
since1.6