private void storeShare(final InterMineBag bag, final UserProfile sharedWith) throws UserAlreadyShareBagException { final String userName = sharedWith.getUsername(); try { uosw.performUnsafeOperation(STORE_SHARE_SQL, new SQLOperation<Integer>() { @Override public Integer run(PreparedStatement stm) throws SQLException { stm.setInt(1, bag.getSavedBagId()); stm.setInt(2, sharedWith.getId()); return stm.executeUpdate(); } }); } catch (SQLException e) { throw new UserAlreadyShareBagException("Error sharing the " + " the bag : " + bag.getSavedBagId() + " with the user " + sharedWith.getId(), e); } informProfileOfChange(userName, new CreationEvent(bag)); }
throw new UserAlreadyShareBagException(bag, sharedWith);
private void storeShare(final InterMineBag bag, final UserProfile sharedWith) throws UserAlreadyShareBagException { final String userName = sharedWith.getUsername(); try { uosw.performUnsafeOperation(STORE_SHARE_SQL, new SQLOperation<Integer>() { @Override public Integer run(PreparedStatement stm) throws SQLException { stm.setInt(1, bag.getSavedBagId()); stm.setInt(2, sharedWith.getId()); return stm.executeUpdate(); } }); } catch (SQLException e) { throw new UserAlreadyShareBagException("Error sharing the " + " the bag : " + bag.getSavedBagId() + " with the user " + sharedWith.getId(), e); } informProfileOfChange(userName, new CreationEvent(bag)); }
throw new UserAlreadyShareBagException(bag, sharedWith);