Criterion crInventoryNo = Restrictions.eq("inventoryNo", inventoryNo);
result = findUniqueByCriteria(crInventoryNo);
if (result == null) {
throw new WrongInventoryNoException("Detail with inventoryNo \""
+ inventoryNo + "\" doesn't exist.");
}
return result;
}