コード例 #1
0
 /**
  * Constructs an instance.
  *
  * @param sqlBuilder appropriate <code>SelectSQLBuilder</code> instance that maps to the <code>
  *     AbstractDomain</code> sub-class with the primary key.
  * @param primaryKeyColSpec Description of the Parameter
  * @param tableAlias Description of the Parameter
  * @param dataSourceProperties Description of the Parameter
  */
 JRFSelectPKPreparedStatement(
     SelectSQLBuilder sqlBuilder,
     ColumnSpec primaryKeyColSpec,
     String tableAlias,
     DataSourceProperties dataSourceProperties) {
   // Set super class up so protected setPrimaryKeyPreparedValues() can be called.
   super(dataSourceProperties);
   super.setPrimaryKeyColumnSpec(primaryKeyColSpec);
   // Build the SQL
   sqlBuilder.setWhere(primaryKeyColSpec.buildPreparedWhereClause(tableAlias));
   super.sql = sqlBuilder.buildSQL();
 }
コード例 #2
0
 /**
  * Using the list of <code>ColumnSpec</code> instances, set the prepared statement values from
  * parameter.
  *
  * @param obj Object that contains parameters to set.
  * @throws SQLException if a JDBC set parameter method fails.
  */
 public void setPreparedValues(Object obj) throws SQLException {
   super.setPrimaryKeyPreparedValues(1, obj);
 }