/** {@inheritDoc} */ @Override public void delete(final WlanAuthorizationProvider wlanAuthorizationProvider) { WlanAuthorizationProvider oldWLANAuthorizationProvider = em.find(WlanAuthorizationProvider.class, wlanAuthorizationProvider.getId()); if (oldWLANAuthorizationProvider != null) { em.remove(oldWLANAuthorizationProvider); } else { throw new PersistenceException("Deletion not possible. Entity does not exist."); } }
/** {@inheritDoc} */ @Override public void create(final WlanAuthorizationProvider wlanAuthorizationProvider) { wlanAuthorizationProvider.setId(null); em.persist(wlanAuthorizationProvider); }