Package org.springframework.jdbc

Examples of org.springframework.jdbc.JdbcUpdateAffectedIncorrectNumberOfRowsException


   * @see #setMaxRowsAffected
   * @see #setRequiredRowsAffected
   */
  protected void checkRowsAffected(int rowsAffected) throws JdbcUpdateAffectedIncorrectNumberOfRowsException {
    if (this.maxRowsAffected > 0 && rowsAffected > this.maxRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(getSql(), this.maxRowsAffected, rowsAffected);
    }
    if (this.requiredRowsAffected > 0 && rowsAffected != this.requiredRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(getSql(), this.requiredRowsAffected, rowsAffected);
    }
  }
View Full Code Here


   * @see #setMaxRowsAffected
   * @see #setRequiredRowsAffected
   */
  protected void checkRowsAffected(int rowsAffected) throws JdbcUpdateAffectedIncorrectNumberOfRowsException {
    if (this.maxRowsAffected > 0 && rowsAffected > this.maxRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(getSql(), this.maxRowsAffected, rowsAffected);
    }
    if (this.requiredRowsAffected > 0 && rowsAffected != this.requiredRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(getSql(), this.requiredRowsAffected, rowsAffected);
    }
  }
View Full Code Here

  public void update(String statementName, Object parameterObject, int requiredRowsAffected)
      throws DataAccessException {

    int actualRowsAffected = update(statementName, parameterObject);
    if (actualRowsAffected != requiredRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(
          statementName, requiredRowsAffected, actualRowsAffected);
    }
  }
View Full Code Here

  public void delete(String statementName, Object parameterObject, int requiredRowsAffected)
      throws DataAccessException {

    int actualRowsAffected = delete(statementName, parameterObject);
    if (actualRowsAffected != requiredRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(
          statementName, requiredRowsAffected, actualRowsAffected);
    }
  }
View Full Code Here

  public void update(String statementName, Object parameterObject, int requiredRowsAffected)
      throws DataAccessException {

    int actualRowsAffected = update(statementName, parameterObject);
    if (actualRowsAffected != requiredRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(
          statementName, requiredRowsAffected, actualRowsAffected);
    }
  }
View Full Code Here

  public void delete(String statementName, Object parameterObject, int requiredRowsAffected)
      throws DataAccessException {

    int actualRowsAffected = delete(statementName, parameterObject);
    if (actualRowsAffected != requiredRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(
          statementName, requiredRowsAffected, actualRowsAffected);
    }
  }
View Full Code Here

   * @see #setMaxRowsAffected
   * @see #setRequiredRowsAffected
   */
  protected void checkRowsAffected(int rowsAffected) throws JdbcUpdateAffectedIncorrectNumberOfRowsException {
    if (this.maxRowsAffected > 0 && rowsAffected > this.maxRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(getSql(), this.maxRowsAffected, rowsAffected);
    }
    if (this.requiredRowsAffected > 0 && rowsAffected != this.requiredRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(getSql(), this.requiredRowsAffected, rowsAffected);
    }
  }
View Full Code Here

  public void update(String statementName, Object parameterObject, int requiredRowsAffected)
      throws DataAccessException {

    int actualRowsAffected = update(statementName, parameterObject);
    if (actualRowsAffected != requiredRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(statementName, requiredRowsAffected,
          actualRowsAffected);
    }
  }
View Full Code Here

  public void delete(String statementName, Object parameterObject, int requiredRowsAffected)
      throws DataAccessException {

    int actualRowsAffected = delete(statementName, parameterObject);
    if (actualRowsAffected != requiredRowsAffected) {
      throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(statementName, requiredRowsAffected,
          actualRowsAffected);
    }
  }
View Full Code Here

    @Override
    public void delete(final String statementName, final Object parameterObject,
                       int requiredRowsAffected) throws DataAccessException {
        Integer rowAffected = this.delete(statementName, parameterObject);
        if (rowAffected != requiredRowsAffected) {
            throw new JdbcUpdateAffectedIncorrectNumberOfRowsException(statementName,
                    requiredRowsAffected, rowAffected);
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.JdbcUpdateAffectedIncorrectNumberOfRowsException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.