コード例 #1
0
 /** {@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.");
   }
 }
コード例 #2
0
 /** {@inheritDoc} */
 @Override
 public void create(final WlanAuthorizationProvider wlanAuthorizationProvider) {
   wlanAuthorizationProvider.setId(null);
   em.persist(wlanAuthorizationProvider);
 }