return modelDao.getTableName().getObjectType();
private void updateHistoryAndAudit(final String entityId, final Map<String, M> entities, final Map<String, Long> entityRecordIds, final ChangeType changeType, final InternalCallContext context) { // Make sure to re-hydrate the object (especially needed for create calls) final M reHydratedEntity = sqlDao.getById(entityId, context); final Long reHydratedEntityRecordId = sqlDao.getRecordId(entityId, context); final M entity = Objects.firstNonNull(reHydratedEntity, entities.get(entityId)); final Long entityRecordId = Objects.firstNonNull(reHydratedEntityRecordId, entityRecordIds.get(entityId)); final TableName tableName = entity.getTableName(); // Note: audit entries point to the history record id final Long historyRecordId; if (tableName.getHistoryTableName() != null) { historyRecordId = insertHistory(entityRecordId, entity, changeType, context); } else { historyRecordId = entityRecordId; } insertAudits(tableName, entityRecordId, historyRecordId, changeType, context); }