Search in sources :

Example 1 with EntityHistoryModelDao

use of org.killbill.billing.util.dao.EntityHistoryModelDao in project killbill by killbill.

the class EntitySqlDaoWrapperInvocationHandler method insertHistory.

private Long insertHistory(final Long entityRecordId, final M entityModelDao, final ChangeType changeType, final InternalCallContext context) {
    final EntityHistoryModelDao<M, E> history = new EntityHistoryModelDao<M, E>(entityModelDao, entityRecordId, changeType, clock.getUTCNow());
    sqlDao.addHistoryFromTransaction(history, context);
    final NonEntitySqlDao transactional = SqlObjectBuilder.attach(handle, NonEntitySqlDao.class);
    /* return transactional.getLastHistoryRecordId(entityRecordId, entityModelDao.getHistoryTableName().getTableName()); */
    return nonEntityDao.retrieveLastHistoryRecordIdFromTransaction(entityRecordId, entityModelDao.getHistoryTableName(), transactional);
}
Also used : EntityHistoryModelDao(org.killbill.billing.util.dao.EntityHistoryModelDao) NonEntitySqlDao(org.killbill.billing.util.dao.NonEntitySqlDao)

Aggregations

EntityHistoryModelDao (org.killbill.billing.util.dao.EntityHistoryModelDao)1 NonEntitySqlDao (org.killbill.billing.util.dao.NonEntitySqlDao)1