656667686970717273
} 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; }
255256257258259260261262263
"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; }
378379380381382383384385
public Urlable getChild(UriPathElement uriId) throws HttpException { if (RateScripts.URI_ID.equals(uriId)) { return rateScriptsInstance(); } else { throw new NotFoundException(); } }
99100101102103104105106107108
} 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; }
114115116117118119120121122123
} 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; }
665666667668669670671
} } } public Urlable getChild(UriPathElement urlId) throws HttpException { throw new NotFoundException(); }
55565758596061626364
} 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; }
133134135136137138139
sourceElement.appendChild(toXml(doc)); inv.sendOk(doc); } public Urlable getChild(UriPathElement uriId) throws HttpException { throw new NotFoundException(); }
81828384858687
public void httpPost(Invocation inv) throws HttpException { throw new MethodNotAllowedException(); } public Urlable getChild(UriPathElement uriId) throws HttpException { throw new NotFoundException(); }
271272273274275276277278
if (BillImports.URI_ID.equals(uriId)) { return billImportsInstance(); } else if (Bills.URI_ID.equals(uriId)) { return billsInstance(); } else { throw new NotFoundException(); } }