void removeRecord ( ) { checkIfAttached ( ) ; final OrientBaseGraph graph = getGraph ( ) ; graph . setCurrentGraphInThreadLocal ( ) ; graph . autoStartTransaction ( ) ; if ( checkDeletedInTx ( ) ) graph . throwRecordNotFoundException ( getIdentity ( ) , "The graph element with id " + getIdentity ( ) + " not found" ) ; try { getRecord ( ) . load ( ) ; } catch ( ORecordNotFoundException e ) { graph . throwRecordNotFoundException ( getIdentity ( ) , e . getMessage ( ) ) ; } getRecord ( ) . delete ( ) ; }
Removes the Element from the Graph . In case the element is a Vertex all the incoming and outgoing edges are automatically removed too .