Class UpdateEnabledIdFilter

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

public class UpdateEnabledIdFilter extends Object implements org.springframework.jdbc.core.PreparedStatementCreator, org.springframework.jdbc.core.SqlProvider
Update the enabled status based on a primary key filter.
  • Constructor Details

    • UpdateEnabledIdFilter

      public UpdateEnabledIdFilter(String tableName, String[] idColumnNames, CompositeKey filter, boolean enabled)
      Constructor.
      Parameters:
      tableName - the table name to update
      idColumnNames - the ID column names
      enabled - the desired enabled state
      Throws:
      IllegalArgumentException - if any argument other than filter 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