@ Override public CommerceDiscountUsageEntry remove ( Serializable primaryKey ) throws NoSuchDiscountUsageEntryException { Session session = null ; try { session = openSession ( ) ; CommerceDiscountUsageEntry commerceDiscountUsageEntry = ( CommerceDiscountUsageEntry ) session . get ( CommerceDiscountUsageEntryImpl . class , primaryKey ) ; if ( commerceDiscountUsageEntry == null ) { if ( _log . isDebugEnabled ( ) ) { _log . debug ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } throw new NoSuchDiscountUsageEntryException ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } return remove ( commerceDiscountUsageEntry ) ; } catch ( NoSuchDiscountUsageEntryException nsee ) { throw nsee ; } catch ( Exception e ) { throw processException ( e ) ; } finally { closeSession ( session ) ; } }
Removes the commerce discount usage entry with the primary key from the database . Also notifies the appropriate model listeners .