HhStartDate to) throws HttpException {
MpanRaw raw = new MpanRaw(mpanStr);
MpanCore core = MpanCore.getMpanCore(raw.getCore());
List<SupplyGeneration> supplyGenerations = core.getSupply()
.getGenerations(from, to);
Dno dno = core.getDno();
return (List<Mpan>) Hiber
.session()
.createQuery(
"from Mpan mpan where mpan.core = :core and mpan.supplyGeneration in (:supplyGenerations) and mpan.supplyGeneration.pc = :pc and mpan.mtc = :mtc and mpan.llfc = :llfc")
.setEntity("core", core).setEntity("pc",
Pc.getPc(raw.getPcCode())).setEntity("mtc",
Mtc.getMtc(dno, raw.getMtcCode())).setEntity("llfc",
dno.getLlfc(raw.getLlfcCode())).setParameterList(
"supplyGenerations", supplyGenerations).list();
}