Package org.uengine.persistence.dao

Examples of org.uengine.persistence.dao.DAOFactory


  }
 
  public void setPermission(int defId, String userType, String userCodes, String[] permissions) {
    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";
      }
View Full Code Here


  }
 
  public void setDefaultPermission(int defId, String[] permissionA, String[] permissionM) {
    Connection conn  = null;
    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";
      }
View Full Code Here

  @Override
  public Object transform(ProcessInstance instance, Map parameterMap, Map options) {
    Object result = null;
    try {
      DAOFactory df = DAOFactory.getInstance(instance.getProcessTransactionContext());

      KeyGeneratorDAO kgd = df.createKeyGenerator(getSequence(), new HashMap());
      kgd.select();
      kgd.next();
      result = kgd.getKeyNumber();
     
    } catch (Exception e) {
View Full Code Here

   
  protected String addWorkItemImpl(String reservedTaskId, String userId, Map parameterMap, boolean isReservation, TransactionContext tc) throws RemoteException {
     
    try{

      DAOFactory daoFactory = DAOFactory.getInstance(tc);
      Calendar now = daoFactory.getNow();

      Calendar dueDate = null;
      try{     
        String dueDateInMSStr = ""+parameterMap.get(KeyedParameter.DUEDATE);
        long dueDateInMS = Long.parseLong(dueDateInMSStr);
View Full Code Here

  public void completeWorkItem(String taskID, KeyedParameter[] options, TransactionContext tc)
    throws RemoteException {

    try{
      DAOFactory daoFactory = DAOFactory.getInstance(tc);
      Calendar now = daoFactory.getNow();

      WorkListDAO wl = (WorkListDAO) tc.findSynchronizedDAO("BPM_WORKLIST", "taskId", new Long(taskID), WorkListDAO.class);
      wl.setStatus(DefaultWorkList.WORKITEM_STATUS_COMPLETED);
      wl.setEndDate(new Timestamp(now.getTimeInMillis()));
     
View Full Code Here

 
  public static Calendar getNow(TransactionContext tc) throws Exception{
   
    if(tc==null || tc instanceof SimulatorTransactionContext) return Calendar.getInstance();
   
    DAOFactory daoFactory = DAOFactory.getInstance(tc);
    return daoFactory.getNow();
  }
View Full Code Here

        }
      }
     
      conn = instance.getProcessTransactionContext().getConnection();

      DAOFactory daoFactory = DAOFactory.getInstance(instance.getProcessTransactionContext());
      Timestamp now = new Timestamp(daoFactory.getNow().getTimeInMillis());
      KeyGeneratorDAO kgd = daoFactory.createKeyGenerator("DOC_COMMENTS", new HashMap());
      kgd.select();
      kgd.next();
      Number seqresult = kgd.getKeyNumber();
     
      sql = (
View Full Code Here

TOP

Related Classes of org.uengine.persistence.dao.DAOFactory

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.