Refactoring and add semantic cache

This commit is contained in:
shahondin1624
2026-02-15 17:09:55 +01:00
parent c678a96635
commit 19168877ab

View File

@@ -10,7 +10,7 @@ public class DbHelper {
private static final Logger logger = LoggerFactory.getLogger(DbHelper.class);
private final GraphDatabaseService graphDb;
public DbHelper(GraphDatabaseService graphDb) {
public DbHelper(final GraphDatabaseService graphDb) {
this.graphDb = graphDb;
}
@@ -19,7 +19,7 @@ public class DbHelper {
}
@SuppressWarnings("unchecked")
public <E, T extends Throwable> Result<E, T> wrapInTx(TransactionContextWithReturn<E> action) {
public <E, T extends Throwable> Result<E, T> wrapInTx(final TransactionContextWithReturn<E> action) {
try (final TransactionWrapper tx = new TransactionWrapper(beginTx())) {
final E result = action.execute(tx);
tx.commit();
@@ -31,7 +31,7 @@ public class DbHelper {
}
@SuppressWarnings("unchecked")
public <T extends Throwable> Result<Void, T> wrapInTx(TransactionContextWithoutReturn action) {
public <T extends Throwable> Result<Void, T> wrapInTx(final TransactionContextWithoutReturn action) {
try (final TransactionWrapper tx = new TransactionWrapper(beginTx())) {
action.execute(tx);
tx.commit();