public Iterable<Edge> getEdges(final String iKey, Object iValue) {
    makeActive();

    if (iKey.equals("@class"))
      return getEdgesOfClass(iValue.toString());

    final String indexName;
    final String key;
    int pos = iKey.indexOf('.');
    if (pos > -1) {
      indexName = iKey;
      key = iKey.substring(iKey.indexOf('.') + 1);
    } else {
      indexName = OrientEdgeType.CLASS_NAME + "." + iKey;
      key = iKey;
    }

    final OIndex<?> idx = getDatabase().getMetadata().getIndexManager().getIndex(indexName);
    if (idx != null) {
      iValue = convertKey(idx, iValue);

      Object indexValue = idx.get(iValue);
      if (indexValue != null && !(indexValue instanceof Iterable<?>))
        indexValue = Arrays.asList(indexValue);

      return new OrientElementIterable<Edge>(this, (Iterable<?>) indexValue);
    }

    // NO INDEX: EXECUTE A QUERY
    return query().has(key, iValue).edges();
  }
public Iterable<Edge> getEdges(final String iKey, Object iValue) {
    makeActive();

    if (iKey.equals("@class"))
      return getEdgesOfClass(iValue.toString());

    final String indexName;
    final String key;
    int pos = iKey.indexOf('.');
    if (pos > -1) {
      indexName = iKey;
      key = iKey.substring(iKey.indexOf('.') + 1);
    } else {
      indexName = OrientEdgeType.CLASS_NAME + "." + iKey;
      key = iKey;
    }

    final OIndex<?> idx = getDatabase().getMetadata().getIndexManager().getIndex(indexName);
    if (idx != null) {
      iValue = convertKey(idx, iValue);

      Object indexValue = idx.get(iValue);
      if (indexValue != null && !(indexValue instanceof Iterable<?>))
        indexValue = Arrays.asList(indexValue);

      return new OrientElementIterable<Edge>(this, (Iterable<?>) indexValue);
    }

    
    return query().has(key, iValue).edges();
  }
public Iterable < Edge > getEdges ( final String iKey , Object iValue ) { makeActive ( ) ; if ( iKey . equals ( "@class" ) ) return getEdgesOfClass ( iValue . toString ( ) ) ; final String indexName ; final String key ; int pos = iKey . indexOf ( ' ' ) ; if ( pos > - 1 ) { indexName = iKey ; key = iKey . substring ( iKey . indexOf ( ' ' ) + 1 ) ; } else { indexName = OrientEdgeType . CLASS_NAME + "." + iKey ; key = iKey ; } final OIndex < ? > idx = getDatabase ( ) . getMetadata ( ) . getIndexManager ( ) . getIndex ( indexName ) ; if ( idx != null ) { iValue = convertKey ( idx , iValue ) ; Object indexValue = idx . get ( iValue ) ; if ( indexValue != null && ! ( indexValue instanceof Iterable < ? > ) ) indexValue = Arrays . asList ( indexValue ) ; return new OrientElementIterable < Edge > ( this , ( Iterable < ? > ) indexValue ) ; } // NO INDEX: EXECUTE A QUERY return query ( ) . has ( key , iValue ) . edges ( ) ; }
Get all the Edges in Graph filtering by field name and value. Example:<code>
Iterable<Edges> resultset = getEdges("name", "Jay");
</code>

@param iKey   Field name
@param iValue Field value

@return Edges as Iterable
Get all the Edges in Graph filtering by field name and value . Example : <code > Iterable<Edges > resultset = getEdges ( name Jay ) ; < / code >