Class UpdateStatementDefault

java.lang.Object
org.spincast.plugins.jdbc.statements.StatementBase
org.spincast.plugins.jdbc.statements.UpdateStatementDefault
All Implemented Interfaces:
Statement, UpdateStatement

public class UpdateStatementDefault extends StatementBase implements UpdateStatement
  • Constructor Details

    • UpdateStatementDefault

      public UpdateStatementDefault(Connection connection)
  • Method Details

    • getStatementWithParamsAdded

      protected PreparedStatement getStatementWithParamsAdded(Connection connection)
    • update

      public int update()
      Description copied from interface: UpdateStatement
      Execute the update and return the number of affected rows.
      Specified by:
      update in interface UpdateStatement
    • update

      public <T> List<T> update(ResultSetHandler<T> resultSetHandler)
      Description copied from interface: UpdateStatement
      Execute the update and return a result set.

      This can be used with a RETURNING clause.

      Specified by:
      update in interface UpdateStatement
    • setCase

      public void setCase(String paramName, String columnNameToCheck, Map<?,?> map)
      Description copied from interface: UpdateStatement
      Adds a CASE statement, using the key and values of the given map. For example : CASE WHEN mapKey1 = 1 then mapVal1 WHEN mapKey2 = 2 then mapVal2 END
      Specified by:
      setCase in interface UpdateStatement
    • createUniqueParamName

      protected String createUniqueParamName()