Class DeleteForCompositeKey

java.lang.Object
net.solarnetwork.central.common.dao.jdbc.sql.DeleteForCompositeKey
All Implemented Interfaces:
org.springframework.jdbc.core.PreparedStatementCreator, org.springframework.jdbc.core.SqlProvider

public class DeleteForCompositeKey extends Object implements org.springframework.jdbc.core.PreparedStatementCreator, org.springframework.jdbc.core.SqlProvider
Delete based on a composite primary key.
  • Constructor Details

    • DeleteForCompositeKey

      public DeleteForCompositeKey(CompositeKey pk, String tableName, String[] columnNames)
      Constructor.
      Parameters:
      pk - the primary key
      tableName - the table name
      columnNames - the column names that correspond to key indexes
      Throws:
      IllegalArgumentException - if any argument is null
  • Method Details

    • getSql

      public String getSql()
      Specified by:
      getSql in interface org.springframework.jdbc.core.SqlProvider
    • createPreparedStatement

      public PreparedStatement createPreparedStatement(Connection con) throws SQLException
      Specified by:
      createPreparedStatement in interface org.springframework.jdbc.core.PreparedStatementCreator
      Throws:
      SQLException