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