private Long saveBusinessData(final Entity entity) throws SObjectCreationException { try { final Entity mergedBusinessData = businessDataRepository.merge(ServerProxyfier.unProxifyIfNeeded(entity)); if (mergedBusinessData == null) { return null; } return mergedBusinessData.getPersistenceId(); } catch (IllegalArgumentException e) { throw new SObjectCreationException("Unable to save the business data", e); } }
@Override public Entity execute(final Entity entity, final BusinessDataContext businessDataContext) throws SEntityActionExecutionException { if (entity == null) { throw new SEntityActionExecutionException("Unable to insert/update a null business object instance"); } try { return repository.merge(ServerProxyfier.unProxifyIfNeeded(entity)); } catch (final IllegalArgumentException iae) { throw new SEntityActionExecutionException(iae); } }
@Override public Entity execute(final Entity entity, final BusinessDataContext businessDataContext) throws SEntityActionExecutionException { if (entity == null) { throw new SEntityActionExecutionException("Unable to insert/update a null business object instance"); } try { return repository.merge(ServerProxyfier.unProxifyIfNeeded(entity)); } catch (final IllegalArgumentException iae) { throw new SEntityActionExecutionException(iae); } }
private Long saveBusinessData(final Entity entity) throws SObjectCreationException { try { final Entity mergedBusinessData = businessDataRepository.merge(ServerProxyfier.unProxifyIfNeeded(entity)); if (mergedBusinessData == null) { return null; } return mergedBusinessData.getPersistenceId(); } catch (IllegalArgumentException e) { throw new SObjectCreationException("Unable to save the business data", e); } }