Added wrapper methods for auto commit and commit
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
@ -23,6 +23,22 @@ public class ORM {
|
||||
_connection = _dbManager.getConnection();
|
||||
}
|
||||
|
||||
public void setAutoCommit(boolean autoCommit) {
|
||||
try {
|
||||
_connection.setAutoCommit(autoCommit);
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void commit() {
|
||||
try {
|
||||
_connection.commit();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public List<Article> getArticles()
|
||||
{
|
||||
List<Article> articles = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user