134135136137138139140141
} public void insertItem(Origin<T> origin) throws ItemException, UnableToSaveException { if (origin.canBeInserted()) { strategy.insertItem(origin); }else { throw new ItemException(ItemException.ErrorType.CANT_SAVE_ITEM); } }
141142143144145146147148
} public void updateItem(Origin<T> origin) throws ItemException, UnableToSaveException { if (origin.canBeUpdated()) { strategy.updateItem(origin); }else { throw new ItemException(ItemException.ErrorType.CANT_SAVE_ITEM); } }