@ Override public CommerceUserSegmentCriterion remove ( Serializable primaryKey ) throws NoSuchUserSegmentCriterionException { Session session = null ; try { session = openSession ( ) ; CommerceUserSegmentCriterion commerceUserSegmentCriterion = ( CommerceUserSegmentCriterion ) session . get ( CommerceUserSegmentCriterionImpl . class , primaryKey ) ; if ( commerceUserSegmentCriterion == null ) { if ( _log . isDebugEnabled ( ) ) { _log . debug ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } throw new NoSuchUserSegmentCriterionException ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } return remove ( commerceUserSegmentCriterion ) ; } catch ( NoSuchUserSegmentCriterionException nsee ) { throw nsee ; } catch ( Exception e ) { throw processException ( e ) ; } finally { closeSession ( session ) ; } }
Removes the commerce user segment criterion with the primary key from the database . Also notifies the appropriate model listeners .