@Test public void testAduitInsertObject() throws Exception { ParameterGroup parameterGroup = new ParameterGroup(); parameterGroup.setParamGroup("TEST_AUDIT"); parameterGroup.setDescription("Audit Desc"); parameterGroupDao.persist(parameterGroup); parameterGroupDao.flush(); // oldObject will send null in case INSERT auditService.callAuditing(null, parameterGroup, "TEST_USER"); }
@Test public void testAuditPLInsertObject() throws SQLException { ParameterGroup parameterGroup = new ParameterGroup(); parameterGroup.setParamGroup("TEST_AUDIT_PL"); parameterGroup.setDescription("Audit Desc PL"); parameterGroupDao.persist(parameterGroup); parameterGroupDao.flush(); Long auditId = auditDetailDao.getNextSequence(); auditDetailDao.insertAuditDetailByPL( auditService.getTableName(parameterGroup), parameterGroup.getParamGroupId().toString(), "TEST_PL", auditId); }