private static KeyObject getKey2(final IItem inItem, final int inType) throws VException { final KeyObject outKey = new KeyObjectImpl(); outKey.setValue(RelationHome.KEY_ITEM1, new Long(inItem.getID())); outKey.setValue(RelationHome.KEY_TYPE1, new Integer(inItem.getItemType())); outKey.setValue(RelationHome.KEY_TYPE2, new Integer(inType)); return outKey; }
public AbstractPerson getPerson(final long inItemID) throws BOMException { try { final KeyObject lKey = new KeyObjectImpl(); lKey.setValue(KEY_ID, new Long(inItemID)); return (AbstractPerson) findByKey(lKey); } catch (final VException exc) { throw new BOMException(exc.getMessage()); } }
@Override public void deleteItem(final long inItemID) throws BOMException { try { final KeyObject lKey = new KeyObjectImpl(); lKey.setValue(KEY_ID, new Long(inItemID)); delete(lKey, true); } catch (final VException exc) { throw new BOMException(exc.getMessage()); } catch (final SQLException exc) { throw new BOMException(exc.getMessage()); } }