Package org.uengine.persistence.rolemapping

Examples of org.uengine.persistence.rolemapping.RoleMappingDAO


      RoleMappingDAOType rmDAOFacade = RoleMappingDAOType.getInstance(ptc);

      if(modifiedRoleMappings.size() > 0)       
        rmDAOFacade.removeRoleMappings(getInstanceId(), modifiedRoleMappings.keySet().iterator());
               
      RoleMappingDAO roleMappingDAO = rmDAOFacade.createDAOForInsertRoleMappingBatch();
     
      for(Iterator iterator = modifiedRoleMappings.keySet().iterator(); iterator.hasNext();){
        String roleName = (String)iterator.next();
        RoleMapping rm = (RoleMapping)cachedRoleMappings.get(roleName);
       
//(new Exception("[EJBProcessInstance:putRoleMappingImpl] instanceId = " + instanceId + "; RoleName = " + roleName)).printStackTrace();

        putRoleMappingImpl(roleName, rm, true, roleMappingDAO);
      }
     
      roleMappingDAO.updateBatch();
    }
   
    mc.printElapsedTime(this);

  }
View Full Code Here


    }
   
    if(isCaching() && modifiedRoleMappings!=null && modifiedRoleMappings.containsKey(roleName)) return null;
   
    RoleMappingDAOType rmDAOFacade = RoleMappingDAOType.getInstance(ptc);
    RoleMappingDAO roleMappingDAO = rmDAOFacade.findByInstanceIdAndRoleName(new Long(getInstanceId()), roleName);
   
    if ( roleMappingDAO.size() < 1 ) return null;
   
    RoleMapping making;
   
    if(roleMappingDAO.size()==1){
      making = rmDAOFacade.createRoleMapping(roleMappingDAO); //(RoleMapping)GlobalContext.deserialize(roleMappingDAO.getValue(), RoleMapping.class);
    }else{
      making = RoleMapping.create();
      making.setName(roleName);
     
      int i = roleMappingDAO.size();
      do{
        //RoleMapping mapping = (RoleMapping)GlobalContext.deserialize(roleMappingDAO.getValue(), RoleMapping.class);
        RoleMapping mapping = rmDAOFacade.createRoleMapping(roleMappingDAO);
        making.replaceCurrentRoleMapping(mapping)
       
        if(making.getCursor() == 0){
          making.setDispatchingOption(mapping.getDispatchingOption());
          making.setDispatchingParameters(mapping.getDispatchingParameters());
        }
       
        if ((--i)>0) making.moveToAdd()
      }while(roleMappingDAO.next());
    }
   
    making.beforeFirst();
   
    if(isCaching()){
View Full Code Here

TOP

Related Classes of org.uengine.persistence.rolemapping.RoleMappingDAO

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.