All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vladmihalcea.sql.exception.SQLStatementCountMismatchException Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package com.vladmihalcea.sql.exception;

/**
 * SQLStatementCountMismatchException - Thrown whenever there is a mismatch between expected statements count and
 * the ones being executed.
 *
 * @author Vlad Mihalcea
 */
public abstract class SQLStatementCountMismatchException extends AssertionError {

    private final long expected;
    private final long recorded;

    protected SQLStatementCountMismatchException(long expected, long recorded) {
        super("Expected " + expected + " statements but recorded " + recorded + " instead!");
        this.expected = expected;
        this.recorded = recorded;
    }

    protected SQLStatementCountMismatchException(String message, long expected, long recorded) {
        super(message + ".\nExpected " + expected + " statements but recorded " + recorded + " instead!");
        this.expected = expected;
        this.recorded = recorded;
    }

    public long getExpected() {
        return expected;
    }

    public long getRecorded() {
        return recorded;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy