modules/liferay-travel/liferay-travel-service/src/main/java/com/liferay/travel/service/persistence/impl/StagePersistenceImpl.java
/**
	 * Removes the stage with the primary key from the database. Also notifies the appropriate model listeners.
	 *
	 * @param primaryKey the primary key of the stage
	 * @return the stage that was removed
	 * @throws NoSuchStageException if a stage with the primary key could not be found
	 */
Removes the stage with the primary key from the database. Also notifies the appropriate model listeners.
@param primaryKey the primary key of the stage
@return the stage that was removed
@throws NoSuchStageException if a stage with the primary key could not be found
Removes the stage with the primary key from the database . Also notifies the appropriate model listeners . @param primaryKey the primary key of the stage @return the stage that was removed @throws NoSuchStageException if a stage with the primary key could not be found
@Override
	public Stage remove(Serializable primaryKey) throws NoSuchStageException {
		Session session = null;
		try {
			session = openSession();
			Stage stage = (Stage)session.get(StageImpl.class, primaryKey);
			if (stage == null) {
				if (_log.isDebugEnabled()) {
					_log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
				}
				throw new NoSuchStageException(
					_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
			}
			return remove(stage);
		}
		catch (NoSuchStageException noSuchEntityException) {
			throw noSuchEntityException;
		}
		catch (Exception exception) {
			throw processException(exception);
		}
		finally {
			closeSession(session);
		}
	}
@ Override public Stage remove ( Serializable primaryKey ) throws NoSuchStageException { Session session = null ; try { session = openSession ( ) ; Stage stage = ( Stage ) session . get ( StageImpl . class , primaryKey ) ; if ( stage == null ) { if ( _log . isDebugEnabled ( ) ) { _log . debug ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } throw new NoSuchStageException ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } return remove ( stage ) ; } catch ( NoSuchStageException noSuchEntityException ) { throw noSuchEntityException ; } catch ( Exception exception ) { throw processException ( exception ) ; } finally { closeSession ( session ) ; } }
Removes the stage with the primary key from the database.
Removes the stage with the primary key from the database .