Package net.sf.chellow.monad

Examples of net.sf.chellow.monad.NotFoundException


  public MonadUri getEditUri() throws HttpException {
    return Chellow.USER_ROLES_INSTANCE.getEditUri().resolve(getUriId()).append("/");
  }

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


  public static GspGroup getGspGroup(String code) throws HttpException {
    GspGroup group = (GspGroup) Hiber.session().createQuery(
        "from GspGroup group where group.code = :code").setString(
        "code", code).uniqueResult();
    if (group == null) {
      throw new NotFoundException(
          "There isn't a GSP group with the code " + code + ".");
    }
    return group;
  }
View Full Code Here

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

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

    // TODO Auto-generated method stub

  }

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

  public static SiteSnag getSiteSnag(Long id) throws HttpException {
    SiteSnag snag = (SiteSnag) Hiber.session().get(SiteSnag.class, id);

    if (snag == null) {
      throw new NotFoundException();
    }
    return snag;
  }
View Full Code Here

  public static final String TYPE_INFORMATION = "IF";

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

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

    Site site = (Site) Hiber.session()
        .createQuery("from Site site where id = :siteId")
        .setLong("siteId", Long.parseLong(uriId.getString()))
        .uniqueResult();
    if (site == null) {
      throw new NotFoundException();
    }
    return site;
  }
View Full Code Here

public class Participant extends PersistentEntity {
  static public Participant getParticipant(Long id) throws HttpException {
    Participant participant = (Participant) Hiber.session().get(
        Participant.class, id);
    if (participant == null) {
      throw new NotFoundException("There isn't a participant with id "
          + id + ".");
    }
    return participant;
  }
View Full Code Here

  static public Participant getParticipant(String code) throws HttpException {
    Participant participant = (Participant) Hiber.session().createQuery(
        "from Participant participant where participant.code = :code")
        .setString("code", code).uniqueResult();
    if (participant == null) {
      throw new NotFoundException("There isn't a participant with code '"
          + code + "'.");
    }
    return participant;
  }
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.