Package net.sf.chellow.monad

Examples of net.sf.chellow.monad.NotFoundException


public class NonCoreContract extends Contract {
  public static NonCoreContract getNonCoreContract(String name)
      throws HttpException {
    NonCoreContract contract = findNonCoreContract(name);
    if (contract == null) {
      throw new NotFoundException(
          "There isn't a non core contract called '" + name + "'");
    }
    return contract;
  }
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 Report getReport() {
    return report;
  }

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

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

public class ClockInterval extends PersistentEntity {
  static public ClockInterval getClockInterval(long id) throws HttpException {
    ClockInterval interval = (ClockInterval) Hiber.session().get(
        ClockInterval.class, id);
    if (interval == null) {
      throw new NotFoundException();
    }
    return interval;
  }
View Full Code Here

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

    element.setAttribute("script", script);
    return element;
  }

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

public class MeterType extends PersistentEntity {
  static public MeterType getMtcMeterType(String code) throws HttpException {
    MeterType type = findMeterType(code);
    if (type == null) {
      throw new NotFoundException();
    }
    return type;
  }
View Full Code Here

      throw new RuntimeException(e);
    }
  }

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

        .createQuery(
            "from MopContract contract where contract.id = :contractId")
        .setLong("contractId", Long.parseLong(uriId.getString()))
        .uniqueResult();
    if (contract == null) {
      throw new NotFoundException();
    }
    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.