Package net.sf.chellow.monad

Examples of net.sf.chellow.monad.NotFoundException


  }

  public Urlable getChild(UriPathElement uriId) throws HttpException {
    Map<Long, BillImport> batchImports = imports.get(batch.getId());
    if (batchImports == null) {
      throw new NotFoundException();
    }
    BillImport billImport = batchImports.get(Long.parseLong(uriId
        .toString()));
    if (billImport == null) {
      throw new NotFoundException();
    }
    return billImport;
  }
View Full Code Here


    return Chellow.USERS_INSTANCE.getEditUri().resolve(getUriId())
        .append("/");
  }

  public Urlable getChild(UriPathElement uriId) throws HttpException {
    throw new NotFoundException();
  }
View Full Code Here

  public static final String TYPE_WITHDRAWN = "W";

  static public BillType getBillType(Long id) throws HttpException {
    BillType type = (BillType) Hiber.session().get(BillType.class, id);
    if (type == null) {
      throw new NotFoundException("The bill type with id " + id + " can't be found.");
    }
    return type;
  }
View Full Code Here

    code = code.trim();
    BillType type = (BillType) Hiber.session().createQuery(
        "from BillType type where type.code = :code").setString(
        "code", code).uniqueResult();
    if (type == null) {
      throw new NotFoundException("The bill type with code " + code + " can't be found.");
    }
    return type;
  }
View Full Code Here

        .createQuery(
            "from HhDatum datum where datum.channel = :channel and datum.id = :datumId")
        .setEntity("channel", channel).setLong("datumId",
            Long.parseLong(uriId.getString())).uniqueResult();
    if (hhDatum == null) {
      throw new NotFoundException();
    }
    return hhDatum;
  }
View Full Code Here

  public ReadType getChild(UriPathElement uriId) throws HttpException {
    try {
      return ReadType.getReadType(Long.parseLong(uriId.toString()));
    } catch (NumberFormatException e) {
      throw new NotFoundException();
    }
  }
View Full Code Here

        .createQuery(
            "from RegisterRead read where read.bill = :bill and read.id = :readId")
        .setEntity("bill", bill).setLong("readId",
            Long.parseLong(uriId.getString())).uniqueResult();
    if (read == null) {
      throw new NotFoundException();
    }
    return read;
  }
View Full Code Here

  public Dno getChild(UriPathElement uriId) throws HttpException {
    try {
      return Dno.getDno(Long.parseLong(uriId.toString()));
    } catch (NumberFormatException e) {
      throw new NotFoundException();
    }
  }
View Full Code Here

    if (Llfcs.URI_ID.equals(uriId)) {
      return new Llfcs(this);
    } else if (DnoContracts.URI_ID.equals(uriId)) {
      return new DnoContracts(this);
    } else {
      throw new NotFoundException();
    }
  }
View Full Code Here

        .createQuery(
            "from DnoContract contract where contract.party.id = :dnoId and contract.name = :name")
        .setLong("dnoId", getId()).setString("name", name)
        .uniqueResult();
    if (contract == null) {
      throw new NotFoundException("DNO contract not found.");
    }
    return contract;
  }
View Full Code Here

TOP

Related Classes of net.sf.chellow.monad.NotFoundException

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.