Package org.uengine.util.dao

Examples of org.uengine.util.dao.DefaultConnectionFactory


    Connection conn = null;
    PreparedStatement stmt = null;
    DAOFactory df = null;
   
    try {
      DefaultConnectionFactory dcf = DefaultConnectionFactory.create();
      df = DAOFactory.getInstance(null);
     
      String strSeq = df.getSequenceSql("ACLTABLE");
      String seqColun = "";
      if (UEngineUtil.isNotEmpty(strSeq)) {
        strSeq = ", " + strSeq;
        seqColun = ", acltableid";
      }
     
      conn = dcf.getConnection();
      StringBuffer sql = new StringBuffer();
      sql.append(" INSERT INTO bpm_acltable (defid, ");
      sql.append(userType);
//      sql.append(", permission) VALUES (").append(df.getSequenceSql("ACLTABLE")).append(", ?, ?, ?) ");
      sql.append(", permission").append(seqColun).append(") VALUES (?, ?, ?").append(strSeq).append(") ");
View Full Code Here


    PreparedStatement stmt = null;
    DAOFactory df = null;
    StringBuffer sql = new StringBuffer();
   
    try {
      DefaultConnectionFactory dcf = DefaultConnectionFactory.create();
      df = DAOFactory.getInstance(null);
     
      conn = dcf.getConnection();
      sql.append(" DELETE FROM bpm_acltable WHERE defid = ? AND defaultuser IS NOT NULL ");
      stmt = conn.prepareStatement(sql.toString());
      stmt.setInt(1, defId);
      stmt.execute();
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      if (stmt != null) try { stmt.close(); } catch (Exception e2) {}
      if (conn != null) try { conn.close(); } catch (Exception e2) {}
    }
   

    try {
      DefaultConnectionFactory dcf = DefaultConnectionFactory.create();
      df = DAOFactory.getInstance(null);
     
      String strSeq = df.getSequenceSql("ACLTABLE");
      String seqColun = "";
      if (UEngineUtil.isNotEmpty(strSeq)) {
        strSeq = ", " + strSeq;
        seqColun = ", acltableid";
      }
      sql.setLength(0);
      sql.append(" INSERT INTO bpm_acltable (defid, defaultuser, permission").append(seqColun).append(") VALUES (?, ?, ?").append(strSeq).append(") ");
     
      conn = dcf.getConnection();
     
      if (permissionA != null) {
        for (String s : permissionA) {
//          KeyGeneratorDAO kg = df.createKeyGenerator("ACLTABLE", new HashMap());
//          kg.select();
View Full Code Here

   
    public ProcessInstanceDAO getEventHandler() {
        ProcessInstanceDAO eventHandlerSPs = null;
       
        try {
            DefaultConnectionFactory defaultConnectionFactory = DefaultConnectionFactory.create();
           
            eventHandlerSPs = (ProcessInstanceDAO)GenericDAO.createDAOImpl(
                    defaultConnectionFactory,
                    "select * from bpm_procinst where maininstid=?maininstid and isDeleted=0",
                    ProcessInstanceDAO.class
View Full Code Here

    }
   
    public WorkListDAO getWorkList() {
        WorkListDAO wl = null;
        try {
            DefaultConnectionFactory defaultConnectionFactory = DefaultConnectionFactory.create();
           
            wl = (WorkListDAO) GenericDAO.createDAOImpl(
                    defaultConnectionFactory,
                    "select * from bpm_worklist where rootinstid=?rootinstid",
                    WorkListDAO.class
View Full Code Here

TOP

Related Classes of org.uengine.util.dao.DefaultConnectionFactory

Copyright © 2018 www.massapicom. 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.