public Item loadItem(long id) {
return dao.loadItem(id);
}
public Item loadItemByRefId(String refId) {
ItemRefId itemRefId = new ItemRefId(refId); // throws runtime exception if invalid id
List<Item> items = dao.findItems(itemRefId.getSequenceNum(), itemRefId.getPrefixCode());
if (items.size() == 0) {
return null;
}
return items.get(0);
}