@Override
	public CommerceDiscount remove(Serializable primaryKey)
		throws NoSuchDiscountException {
		Session session = null;

		try {
			session = openSession();

			CommerceDiscount commerceDiscount = (CommerceDiscount)session.get(CommerceDiscountImpl.class,
					primaryKey);

			if (commerceDiscount == null) {
				if (_log.isDebugEnabled()) {
					_log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
				}

				throw new NoSuchDiscountException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
					primaryKey);
			}

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

@param primaryKey the primary key of the commerce discount
@return the commerce discount that was removed
@throws NoSuchDiscountException if a commerce discount with the primary key could not be found