@Override
	public CPDefinitionLink remove(Serializable primaryKey)
		throws NoSuchCPDefinitionLinkException {
		Session session = null;

		try {
			session = openSession();

			CPDefinitionLink cpDefinitionLink = (CPDefinitionLink)session.get(CPDefinitionLinkImpl.class,
					primaryKey);

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

				throw new NoSuchCPDefinitionLinkException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
					primaryKey);
			}

			return remove(cpDefinitionLink);
		}
		catch (NoSuchCPDefinitionLinkException nsee) {
			throw nsee;
		}
		catch (Exception e) {
			throw processException(e);
		}
		finally {
			closeSession(session);
		}
	}
@ Override public CPDefinitionLink remove ( Serializable primaryKey ) throws NoSuchCPDefinitionLinkException { Session session = null ; try { session = openSession ( ) ; CPDefinitionLink cpDefinitionLink = ( CPDefinitionLink ) session . get ( CPDefinitionLinkImpl . class , primaryKey ) ; if ( cpDefinitionLink == null ) { if ( _log . isDebugEnabled ( ) ) { _log . debug ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } throw new NoSuchCPDefinitionLinkException ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } return remove ( cpDefinitionLink ) ; } catch ( NoSuchCPDefinitionLinkException nsee ) { throw nsee ; } catch ( Exception e ) { throw processException ( e ) ; } finally { closeSession ( session ) ; } }
Removes the cp definition link with the primary key from the database. Also notifies the appropriate model listeners.

@param primaryKey the primary key of the cp definition link
@return the cp definition link that was removed
@throws NoSuchCPDefinitionLinkException if a cp definition link with the primary key could not be found