Package com.starflow.test.util

Source Code of com.starflow.test.util.TestUtil

package com.starflow.test.util;

import org.junit.Ignore;
import org.springframework.context.ApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

@Ignore
public class TestUtil {
  public static void cleanData(ApplicationContext applicationContext) {
    JdbcTemplate jdbcTemplate = (JdbcTemplate)applicationContext.getBean(JdbcTemplate.class);
    jdbcTemplate.update("delete from WF_ACTIVITYINST");
    jdbcTemplate.update("delete from WF_PARTICIPANT");
    jdbcTemplate.update("delete from WF_PRIMARYKEY where name in ('processDefId', 'processInstId'," +
        "'activityInstId', 'workItemId', 'participantId', 'transCtrlId')");
    jdbcTemplate.update("delete from WF_PROCESSDEFINE");
    jdbcTemplate.update("delete from WF_PROCESSINST");
    jdbcTemplate.update("delete from WF_WORKITEM");
    jdbcTemplate.update("delete from WF_PROCESSDEFINE");
    jdbcTemplate.update("delete from WF_TRANSCTRL");
  }
}
TOP

Related Classes of com.starflow.test.util.TestUtil

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.