com.infomaximum.database.Transaction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdao Show documentation
Show all versions of rdao Show documentation
Library for creating a light cluster
The newest version!
package com.infomaximum.database;
import com.infomaximum.database.exception.DatabaseException;
import com.infomaximum.database.provider.DBTransaction;
import com.infomaximum.database.schema.dbstruct.DBSchema;
public class Transaction implements AutoCloseable {
private final DBTransaction dbTransaction;
private final DataCommand dataCommand;
Transaction(DBTransaction dbTransaction, DBSchema schema) {
this.dbTransaction = dbTransaction;
this.dataCommand = new DataCommand(dbTransaction, schema);
}
public DataCommand getCommand() {
return dataCommand;
}
public void commit() throws DatabaseException {
dbTransaction.commit();
}
public void rollback() throws DatabaseException {
dbTransaction.rollback();
}
@Override
public void close() throws DatabaseException {
dbTransaction.close();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy