Exemple #1
0
  public IItemCollection getRespPermissions(int idpcd, String uid) throws ISPACException {
    CollectionDAO coldao = PermissionsDAO.getPermissions(mDbCnt, idpcd, uid);
    List list = new ArrayList();
    if (coldao.next()) {
      IResponsible resp = getResp(uid);
      list.add(resp);
    }

    return new ListCollection(list);
  }
Exemple #2
0
  public IItemCollection getRespPermissions(int idpcd, int codePermission) throws ISPACException {
    CollectionDAO coldao = PermissionsDAO.getPermissions(mDbCnt, idpcd, codePermission);
    List list = new ArrayList();
    while (coldao.next()) {
      ObjectDAO dao = coldao.value();
      String uid = dao.getString("UID_USR");
      IResponsible resp = getResp(uid);
      list.add(resp);
    }

    return new ListCollection(list);
  }
Exemple #3
0
  public void addPermissions(int idpcd, String uid, int type) throws ISPACException {
    PermissionsDAO objper = new PermissionsDAO(mDbCnt);
    objper.createNew(mDbCnt);

    objper.set("ID_PCD", idpcd);
    objper.set("UID_USR", uid);
    objper.set("PERMISO", type);
    objper.store(mDbCnt);
  }
Exemple #4
0
 public IItemCollection getPermissions(int idpcd, String uid) throws ISPACException {
   return PermissionsDAO.getPermissions(mDbCnt, idpcd, uid).disconnect();
 }
Exemple #5
0
 public IItemCollection getPermissionObjects(String uid, int codePermission)
     throws ISPACException {
   return PermissionsDAO.getPermissionObjects(mDbCnt, uid, codePermission).disconnect();
 }