示例#1
0
  @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);
  }
示例#2
0
  @Transactional
  @Test
  public void testAuditPLUpdateObject() throws SQLException {
    ParameterGroup parameterGroup = parameterGroupDao.findOne(25L);
    parameterGroup.setParamGroup("TEST_AUDIT_PL_edit3");
    parameterGroup.setDescription("Audit Desc_PL_edit4");

    Long auditId = auditDetailDao.getNextSequence();
    auditDetailDao.beforeUpdateAuditDetailByPL(
        auditService.getTableName(parameterGroup), parameterGroup.getParamGroupId().toString());
    parameterGroupDao.merge(parameterGroup);
    parameterGroupDao.flush();
    auditDetailDao.afterUpdateAuditDetailByPL(
        auditService.getTableName(parameterGroup),
        parameterGroup.getParamGroupId().toString(),
        auditId,
        "TEST_PL2");
  }