Package es.ipsa.atril.exceptions

Examples of es.ipsa.atril.exceptions.ElementNotFoundException


    super("CustomerAccount");
    if (null==oUsr) throw new NullPointerException("User cannot be null");
    Dms oDms = oSes.getDms();   
    List<Document> oLst =  oDms.query("CustomerAccount$account_id='" + oUsr.getCustomerAccountId() + "'");
    if (oLst.isEmpty())
      throw new ElementNotFoundException("CustomerAccount for user not found");
    else
      load(oSes, oLst.get(0).id());
  }
View Full Code Here


      if (d.type().name().equals(t.getTypeName())) {
        t.setDocument(oSes.getDms().getDocument(d.id()));
        break;
      }
    } // next
    if (t.getDocument()==null) throw new ElementNotFoundException(t.getTypeName()+" document not found");
    return t;
   
View Full Code Here

  }

  public static CustomerAccount forUuid(AtrilSession oSes, String sUuidthrows ElementNotFoundException, NullPointerException, IllegalArgumentException {
    Dms oDms = oSes.getDms();
    SortableList<Document> oLst = oDms.query("CustomerAccount$account_id='"+sUuid+"'");
    if (oLst.isEmpty()) throw new ElementNotFoundException("Could not find any CustomerAccount with unique id "+sUuid);
    return new CustomerAccount(oDms.getDocument(oLst.get(0).id()));
  }
View Full Code Here

      if (d.type().name().equals(o.getTypeName())) {
      o.setDocument(oSes.getDms().getDocument(d.id()));
      break;
      }
    } // next
    if (o.getDocument()==null) throw new ElementNotFoundException(o.getTypeName()+" document not found");
    return o;     
  }
View Full Code Here

        if (d.type().name().equals(a.getTypeName())) {
          a.setDocument(oSes.getDms().getDocument(d.id()));
          break;
        }
      } // next
      if (a.getDocument()==null) throw new ElementNotFoundException(a.getTypeName()+" document not found");
      return a;
   
View Full Code Here

        if (d.type().name().equals(u.getTypeName())) {
          u.setDocument(oSes.getDms().getDocument(d.id()));
          break;
        }
      } // next
      if (u.getDocument()==null) throw new ElementNotFoundException(u.getTypeName()+" document not found");
      Log.out.debug("End com.zesped.model.Users.top() : " + u);
      return u;
   
View Full Code Here

  public Fields fields(AtrilSession oSes) {
    Dms oDms = oSes.getDms();
    for (Document d : getDocument().children())
      if (d.type().name().equals("Fields"))
        return new Fields(oDms.getDocument(d.id()));
    throw new ElementNotFoundException("Fields not found");
  }
View Full Code Here

        Scanner s = new Scanner(oDms.getDocument(d.id()));
        if (s.name().equals(sScannerName))
          return s;
      }
    }
    throw new ElementNotFoundException("Scanner "+sScannerName+" not found");
  }
View Full Code Here

    NullPointerException, NotYetConnectedException, DmsException, ElementNotFoundException, InstantiationException, IllegalAccessException {
    Iterator<AccountingAccount> oItr = taxPayer(oSes.getDms()).accounts(oSes).list(oSes).iterator();
    if (oItr.hasNext())
      return createTicket(oSes, oItr.next());
    else
      throw new ElementNotFoundException("No default accounting account found for ticket");
  }
View Full Code Here

      if (d.type().name().equals(z.getTypeName())) {
        z.setDocument(oSes.getDms().getDocument(d.id()));
        break;
      }
    } // next
    if (z.getDocument()==null) throw new ElementNotFoundException(z.getTypeName()+" document not found");
    Log.out.debug("End com.zesped.model.Zesped.top() : " + z);
    return z;     
  }
View Full Code Here

TOP

Related Classes of es.ipsa.atril.exceptions.ElementNotFoundException

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.