Class InsertAppSetting

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

public class InsertAppSetting extends Object implements org.springframework.jdbc.core.PreparedStatementCreator, org.springframework.jdbc.core.SqlProvider
Insert an AppSetting instance.
Since:
2.0
  • Constructor Details

    • InsertAppSetting

      public InsertAppSetting(AppSetting setting, boolean upsert)
      Constructor.
      Parameters:
      setting - the setting to insert
      upsert - use an "upsert" style query
      Throws:
      IllegalArgumentException - if setting 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