Package net.sf.chellow.monad

Examples of net.sf.chellow.monad.NotFoundException


  }

  static public Provider getProvider(long id) throws HttpException {
    Provider provider = (Provider) Hiber.session().get(Provider.class, id);
    if (provider == null) {
      throw new NotFoundException();
    }
    return provider;
  }
View Full Code Here


            "from Snag snag where snag.contract = :contract and snag.id = :snagId")
        .setEntity("contract", this)
        .setLong("snagId", Long.parseLong(uriId.getString()))
        .uniqueResult();
    if (snag == null) {
      throw new NotFoundException();
    }
    return snag;
  }
View Full Code Here

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

  }

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

  }

  static public Site getSite(String code) throws HttpException {
    Site site = findSite(code);
    if (site == null) {
      throw new NotFoundException("The site '" + code
          + "' cannot be found.");
    }
    return site;
  }
View Full Code Here

      }
    }
  }

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

  }

  static public Source getSource(String sourceCode) throws HttpException {
    Source source = findSource(sourceCode);
    if (source == null) {
      throw new NotFoundException("There's no source with the code '"
          + sourceCode + "'");
    }
    return source;
  }
View Full Code Here

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

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

  public void httpPost(Invocation inv) throws HttpException {
    throw new MethodNotAllowedException();
  }

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

    if (BillImports.URI_ID.equals(uriId)) {
      return billImportsInstance();
    } else if (Bills.URI_ID.equals(uriId)) {
      return billsInstance();
    } 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.