@Override public boolean equals(final Object object) { if (this == object) { return true; } if (this.getClass() != object.getClass()) { return false; } DbTransactionMode mode = (DbTransactionMode) object; return (mode.getIsolation() == this.isolation) && (mode.isReadOnly() == this.readOnlyMode); }
/** * Opens a transaction. */ protected void openTx() { if (connection == null) { connection = connectionProvider.getConnection(); } txActive = true; try { connection.setAutoCommit(false); if (txMode.getIsolation() != DbTransactionMode.ISOLATION_DEFAULT) { connection.setTransactionIsolation(txMode.getIsolation()); } connection.setReadOnly(txMode.isReadOnly()); } catch (SQLException sex) { throw new DbSqlException("Open TX failed", sex); } }
@Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof DbTransactionMode)) { return false; } DbTransactionMode mode = (DbTransactionMode) object; return (mode.getIsolation() == this.isolation) && (mode.isReadOnly() == this.readOnlyMode); }
@Override public boolean equals(final Object object) { if (this == object) { return true; } if (this.getClass() != object.getClass()) { return false; } DbTransactionMode mode = (DbTransactionMode) object; return (mode.getIsolation() == this.isolation) && (mode.isReadOnly() == this.readOnlyMode); }
/** * Opens a transaction. */ protected void openTx() { if (connection == null) { connection = connectionProvider.getConnection(); } txActive = true; try { connection.setAutoCommit(false); if (txMode.getIsolation() != DbTransactionMode.ISOLATION_DEFAULT) { connection.setTransactionIsolation(txMode.getIsolation()); } connection.setReadOnly(txMode.isReadOnly()); } catch (SQLException sex) { throw new DbSqlException("Unable to open and prepare transaction.", sex); } }
/** * Opens a transaction. */ protected void openTx() { if (connection == null) { connection = connectionProvider.getConnection(); } txActive = true; try { connection.setAutoCommit(false); if (txMode.getIsolation() != DbTransactionMode.ISOLATION_DEFAULT) { connection.setTransactionIsolation(txMode.getIsolation()); } connection.setReadOnly(txMode.isReadOnly()); } catch (SQLException sex) { throw new DbSqlException("Open TX failed", sex); } }