graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientGraph.java
public void removeEdgeInternal(final OrientEdge edge) {
    // OUT VERTEX
    final OIdentifiable inVertexEdge = edge.vIn != null ? edge.vIn : edge.rawElement;

    final String edgeClassName = OrientBaseGraph.encodeClassName(edge.getLabel());

    final boolean useVertexFieldsForEdgeLabels = settings.isUseVertexFieldsForEdgeLabels();

    final OIdentifiable outVertex = edge.getOutVertex();
    ODocument outVertexRecord = null;
    boolean outVertexChanged = false;

    if (outVertex != null) {
      outVertexRecord = outVertex.getRecord();
      if (outVertexRecord != null) {
        final String outFieldName = OrientVertex.getConnectionFieldName(Direction.OUT, edgeClassName, useVertexFieldsForEdgeLabels);
        outVertexChanged = edge.dropEdgeFromVertex(inVertexEdge, outVertexRecord, outFieldName,
            outVertexRecord.field(outFieldName));
      }
    }

    // IN VERTEX
    final OIdentifiable outVertexEdge = edge.vOut != null ? edge.vOut : edge.rawElement;

    final OIdentifiable inVertex = edge.getInVertex();
    ODocument inVertexRecord = null;
    boolean inVertexChanged = false;

    if (inVertex != null) {
      inVertexRecord = inVertex.getRecord();
      if (inVertexRecord != null) {
        final String inFieldName = OrientVertex.getConnectionFieldName(Direction.IN, edgeClassName, useVertexFieldsForEdgeLabels);
        inVertexChanged = edge.dropEdgeFromVertex(outVertexEdge, inVertexRecord, inFieldName, inVertexRecord.field(inFieldName));
      }
    }

    if (outVertexChanged)
      outVertexRecord.save();
    if (inVertexChanged)
      inVertexRecord.save();

    if (edge.rawElement != null)
      // NON-LIGHTWEIGHT EDGE
      edge.removeRecord();
  }
public void removeEdgeInternal(final OrientEdge edge) {
    // OUT VERTEX
    final OIdentifiable inVertexEdge = edge.vIn != null ? edge.vIn : edge.rawElement;

    final String edgeClassName = OrientBaseGraph.encodeClassName(edge.getLabel());

    final boolean useVertexFieldsForEdgeLabels = settings.isUseVertexFieldsForEdgeLabels();

    final OIdentifiable outVertex = edge.getOutVertex();
    ODocument outVertexRecord = null;
    boolean outVertexChanged = false;

    if (outVertex != null) {
      outVertexRecord = outVertex.getRecord();
      if (outVertexRecord != null) {
        final String outFieldName = OrientVertex.getConnectionFieldName(Direction.OUT, edgeClassName, useVertexFieldsForEdgeLabels);
        outVertexChanged = edge.dropEdgeFromVertex(inVertexEdge, outVertexRecord, outFieldName,
            outVertexRecord.field(outFieldName));
      }
    }

    // IN VERTEX
    final OIdentifiable outVertexEdge = edge.vOut != null ? edge.vOut : edge.rawElement;

    final OIdentifiable inVertex = edge.getInVertex();
    ODocument inVertexRecord = null;
    boolean inVertexChanged = false;

    if (inVertex != null) {
      inVertexRecord = inVertex.getRecord();
      if (inVertexRecord != null) {
        final String inFieldName = OrientVertex.getConnectionFieldName(Direction.IN, edgeClassName, useVertexFieldsForEdgeLabels);
        inVertexChanged = edge.dropEdgeFromVertex(outVertexEdge, inVertexRecord, inFieldName, inVertexRecord.field(inFieldName));
      }
    }

    if (outVertexChanged)
      outVertexRecord.save();
    if (inVertexChanged)
      inVertexRecord.save();

    if (edge.rawElement != null)
      // NON-LIGHTWEIGHT EDGE
      edge.removeRecord();
  }
public void removeEdgeInternal ( final OrientEdge edge ) { // OUT VERTEX final OIdentifiable inVertexEdge = edge . vIn != null ? edge . vIn : edge . rawElement ; final String edgeClassName = OrientBaseGraph . encodeClassName ( edge . getLabel ( ) ) ; final boolean useVertexFieldsForEdgeLabels = settings . isUseVertexFieldsForEdgeLabels ( ) ; final OIdentifiable outVertex = edge . getOutVertex ( ) ; ODocument outVertexRecord = null ; boolean outVertexChanged = false ; if ( outVertex != null ) { outVertexRecord = outVertex . getRecord ( ) ; if ( outVertexRecord != null ) { final String outFieldName = OrientVertex . getConnectionFieldName ( Direction . OUT , edgeClassName , useVertexFieldsForEdgeLabels ) ; outVertexChanged = edge . dropEdgeFromVertex ( inVertexEdge , outVertexRecord , outFieldName , outVertexRecord . field ( outFieldName ) ) ; } } // IN VERTEX final OIdentifiable outVertexEdge = edge . vOut != null ? edge . vOut : edge . rawElement ; final OIdentifiable inVertex = edge . getInVertex ( ) ; ODocument inVertexRecord = null ; boolean inVertexChanged = false ; if ( inVertex != null ) { inVertexRecord = inVertex . getRecord ( ) ; if ( inVertexRecord != null ) { final String inFieldName = OrientVertex . getConnectionFieldName ( Direction . IN , edgeClassName , useVertexFieldsForEdgeLabels ) ; inVertexChanged = edge . dropEdgeFromVertex ( outVertexEdge , inVertexRecord , inFieldName , inVertexRecord . field ( inFieldName ) ) ; } } if ( outVertexChanged ) outVertexRecord . save ( ) ; if ( inVertexChanged ) inVertexRecord . save ( ) ; if ( edge . rawElement != null ) // NON-LIGHTWEIGHT EDGE edge . removeRecord ( ) ; }
Removes the Edge from the Graph. Connected vertices aren't removed.
Removes the Edge from the Graph . Connected vertices aren t removed .