[framework] TxCore → common-framework (ACM-FW-001)

This commit is contained in:
forge-bot 2026-07-18 10:10:42 +00:00
parent a31101b71a
commit a9be4bc4ef

View file

@ -0,0 +1,30 @@
package com.klaro.acquirecore.framework;
/**
* Transaction configuration DTO. Migrated from txcore.h tx_config_t.
*/
public class TxConfig {
private int timeoutSeconds = 30;
private int maxRetries = 3;
private boolean autoCommit = false;
private String isolationLevel = "READ_COMMITTED";
private boolean rollbackOnException = true;
public TxConfig() {}
public TxConfig(int timeoutSeconds, int maxRetries) {
this.timeoutSeconds = timeoutSeconds;
this.maxRetries = maxRetries;
}
public int getTimeoutSeconds() { return timeoutSeconds; }
public void setTimeoutSeconds(int timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; }
public int getMaxRetries() { return maxRetries; }
public void setMaxRetries(int maxRetries) { this.maxRetries = maxRetries; }
public boolean isAutoCommit() { return autoCommit; }
public void setAutoCommit(boolean autoCommit) { this.autoCommit = autoCommit; }
public String getIsolationLevel() { return isolationLevel; }
public void setIsolationLevel(String isolationLevel) { this.isolationLevel = isolationLevel; }
public boolean isRollbackOnException() { return rollbackOnException; }
public void setRollbackOnException(boolean rollbackOnException) { this.rollbackOnException = rollbackOnException; }
}