Package net.sf.chellow.monad

Examples of net.sf.chellow.monad.NotFoundException


  public Report getReport() {
    return report;
  }

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


public abstract class Party extends PersistentEntity {
  static public Party getParty(Long id) throws HttpException {
    Party party = (Party) Hiber.session().get(Party.class, id);
    if (party == null) {
      throw new NotFoundException("The Party with id " + id
          + " could not be found.");
    }
    return party;
  }
View Full Code Here

        .createQuery(
            "from Party party where party.participant = :participant and party.role = :role")
        .setEntity("participant", participant).setEntity("role", role)
        .uniqueResult();
    if (party == null) {
      throw new NotFoundException();
    }
    return party;
  }
View Full Code Here

   * public abstract Service getService(String name) throws HttpException,
   * InternalException;
   */
  @Override
  public Urlable getChild(UriPathElement uriId) throws HttpException {
    throw new NotFoundException();
  }
View Full Code Here

  public MonadUri getEditUri() {
    return null;
  }

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

  public static HhdcContract getHhdcContract(String name)
      throws HttpException {
    HhdcContract contract = findHhdcContract(name);
    if (contract == null) {
      throw new NotFoundException("There isn't an HHDC contract called '"
          + name + "'");
    }
    return contract;
  }
View Full Code Here

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

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

      InternalException {
    Source source = (Source) Hiber.session().createQuery(
        "from Source source where source.id = :sourceId").setLong(
        "sourceId", Long.parseLong(urlId.toString())).uniqueResult();
    if (source == null) {
      throw new NotFoundException();
    }
    return source;
  }
View Full Code Here

  }

  static public GeneratorType getGeneratorType(String code) throws HttpException {
    GeneratorType type = findGeneratorType(code);
    if (type == null) {
      throw new NotFoundException("There's no generator type with the code '"
          + code + "'");
    }
    return type;
  }
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.