Package net.sf.chellow.monad

Examples of net.sf.chellow.monad.NotFoundException


    sourceElement.appendChild(toXml(doc));
    inv.sendOk(doc);
  }

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


  public Urlable getChild(UriPathElement uriId) throws HttpException {
    if (RegisterReads.URI_ID.equals(uriId)) {
      return registerReadsInstance();
    } else {
      throw new NotFoundException();
    }
  }
View Full Code Here

        .createQuery(
            "from SupplierContract contract where contract.id = :contractId")
        .setLong("contractId", Long.parseLong(uriId.getString()))
        .uniqueResult();
    if (contract == null) {
      throw new NotFoundException();
    }
    return contract;
  }
View Full Code Here

  public Urlable getChild(UriPathElement uriId) throws HttpException {
    if (SupplyGenerations.URI_ID.equals(uriId)) {
      return getSupplyGenerationsInstance();
    } else {
      throw new NotFoundException();
    }
  }
View Full Code Here

        .createQuery(
            "from HhdcContract contract where contract.id = :contractId")
        .setLong("contractId", Long.parseLong(uriId.getString()))
        .uniqueResult();
    if (contract == null) {
      throw new NotFoundException();
    }
    return contract;
  }
View Full Code Here

            "from Batch batch where batch.contract = :contract and batch.id = :batchId")
        .setEntity("contract", contract)
        .setLong("batchId", Long.parseLong(uriId.getString()))
        .uniqueResult();
    if (batch == null) {
      throw new NotFoundException("Can't find the batch " + uriId + ".");
    }
    return batch;
  }
View Full Code Here

  public Urlable getChild(UriPathElement uriId) throws HttpException {
    if (RateScripts.URI_ID.equals(uriId)) {
      return new RateScripts(this);
    } else {
      throw new NotFoundException();
    }
  }
View Full Code Here

  }

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

  public static Report getReport(String name) throws HttpException {
    Report report = (Report) Hiber.session()
        .createQuery("from Report report where report.name = :name")
        .setString("name", name).uniqueResult();
    if (report == null) {
      throw new NotFoundException("Can't find the report '" + name + "'.");
    }
    return report;
  }
View Full Code Here

    if (ReportOutput.URI_ID.equals(uriId)) {
      return new ReportOutput(this);
    } else if (ReportXmlOutput.URI_ID.equals(uriId)) {
      return new ReportXmlOutput(this);
    } else {
      throw new NotFoundException();
    }
  }
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.