Search in sources :

Example 1 with TransactionCurrentSqlBuilder

use of org.lastaflute.db.jta.romanticist.TransactionCurrentSqlBuilder in project lastaflute by lastaflute.

the class RomanticTraceableSqlFireHook method saveCommandToRomanticTransaction.

protected void saveCommandToRomanticTransaction(BehaviorCommandMeta meta, SqlFireReadyInfo fireReadyInfo) {
    final RomanticTransaction tx = TransactionRomanticContext.getRomanticTransaction();
    if (tx != null) {
        final String tableName = meta.getDBMeta().getTableDispName();
        final String commandName = meta.getCommandName();
        // cannot get from ready info...
        final Long beginMillis = InternalMapContext.getSqlBeforeTimeMillis();
        final TransactionCurrentSqlBuilder currentSqlBuilder = createCurrentSqlBuilder(fireReadyInfo.getSqlLogInfo());
        tx.registerTableCommand(tableName, commandName, beginMillis, currentSqlBuilder);
    }
}
Also used : RomanticTransaction(org.lastaflute.db.jta.RomanticTransaction) TransactionCurrentSqlBuilder(org.lastaflute.db.jta.romanticist.TransactionCurrentSqlBuilder)

Aggregations

RomanticTransaction (org.lastaflute.db.jta.RomanticTransaction)1 TransactionCurrentSqlBuilder (org.lastaflute.db.jta.romanticist.TransactionCurrentSqlBuilder)1