graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java
public Iterable<Vertex> getVertices(final String label, final String[] iKey, Object[] iValue) {
    if (iKey.length != iValue.length) {
      throw new IllegalArgumentException("key names and values must be arrays of the same size");
    }
    makeActive();
    final OClass clazz = getDatabase().getMetadata().getImmutableSchemaSnapshot().getClass(label);
    if (clazz != null) {
      Set<OIndex<?>> indexes = clazz.getInvolvedIndexes(Arrays.asList(iKey));
      Iterator<OIndex<?>> iterator = indexes.iterator();
      while (iterator.hasNext()) {
        final OIndex<?> idx = iterator.next();
        if (idx != null) {
          if ("lucene".equalsIgnoreCase(idx.getAlgorithm())) {
            continue;
          }
          Object[] sortedParams = new Object[iValue.length];
          List<String> indexFields = idx.getDefinition().getFields();
          for (int i = 0; i < iKey.length; i++) {
            sortedParams[indexFields.indexOf(iKey[i])] = iValue[i];
          }
          List<Object> keys = Arrays.asList(convertKeys(idx, sortedParams));
          Object key;
          if (indexFields.size() == 1) {
            key = keys.get(0);
          } else {
            key = new OCompositeKey(keys);
          }
          Object indexValue = idx.get(key);
          if (indexValue != null && !(indexValue instanceof Iterable<?>))
            indexValue = Arrays.asList(indexValue);
          return new OrientClassVertexIterable(this, (Iterable<?>) indexValue, label);
        }
      }
    }
    // NO INDEX: EXECUTE A QUERY
    OrientGraphQuery query = (OrientGraphQuery) query();
    query.labels(label);
    for (int i = 0; i < iKey.length; i++) {
      query.has(iKey[i], iValue[i]);
    }
    return query.vertices();
  }
public Iterable<Vertex> getVertices(final String label, final String[] iKey, Object[] iValue) {
    if (iKey.length != iValue.length) {
      throw new IllegalArgumentException("key names and values must be arrays of the same size");
    }
    makeActive();
    final OClass clazz = getDatabase().getMetadata().getImmutableSchemaSnapshot().getClass(label);
    if (clazz != null) {
      Set<OIndex<?>> indexes = clazz.getInvolvedIndexes(Arrays.asList(iKey));
      Iterator<OIndex<?>> iterator = indexes.iterator();
      while (iterator.hasNext()) {
        final OIndex<?> idx = iterator.next();
        if (idx != null) {
          if ("lucene".equalsIgnoreCase(idx.getAlgorithm())) {
            continue;
          }
          Object[] sortedParams = new Object[iValue.length];
          List<String> indexFields = idx.getDefinition().getFields();
          for (int i = 0; i < iKey.length; i++) {
            sortedParams[indexFields.indexOf(iKey[i])] = iValue[i];
          }
          List<Object> keys = Arrays.asList(convertKeys(idx, sortedParams));
          Object key;
          if (indexFields.size() == 1) {
            key = keys.get(0);
          } else {
            key = new OCompositeKey(keys);
          }
          Object indexValue = idx.get(key);
          if (indexValue != null && !(indexValue instanceof Iterable<?>))
            indexValue = Arrays.asList(indexValue);
          return new OrientClassVertexIterable(this, (Iterable<?>) indexValue, label);
        }
      }
    }
    // NO INDEX: EXECUTE A QUERY
    OrientGraphQuery query = (OrientGraphQuery) query();
    query.labels(label);
    for (int i = 0; i < iKey.length; i++) {
      query.has(iKey[i], iValue[i]);
    }
    return query.vertices();
  }
public Iterable < Vertex > getVertices ( final String label , final String [ ] iKey , Object [ ] iValue ) { if ( iKey . length != iValue . length ) { throw new IllegalArgumentException ( "key names and values must be arrays of the same size" ) ; } makeActive ( ) ; final OClass clazz = getDatabase ( ) . getMetadata ( ) . getImmutableSchemaSnapshot ( ) . getClass ( label ) ; if ( clazz != null ) { Set < OIndex < ? > > indexes = clazz . getInvolvedIndexes ( Arrays . asList ( iKey ) ) ; Iterator < OIndex < ? > > iterator = indexes . iterator ( ) ; while ( iterator . hasNext ( ) ) { final OIndex < ? > idx = iterator . next ( ) ; if ( idx != null ) { if ( "lucene" . equalsIgnoreCase ( idx . getAlgorithm ( ) ) ) { continue ; } Object [ ] sortedParams = new Object [ iValue . length ] ; List < String > indexFields = idx . getDefinition ( ) . getFields ( ) ; for ( int i = 0 ; i < iKey . length ; i ++ ) { sortedParams [ indexFields . indexOf ( iKey [ i ] ) ] = iValue [ i ] ; } List < Object > keys = Arrays . asList ( convertKeys ( idx , sortedParams ) ) ; Object key ; if ( indexFields . size ( ) == 1 ) { key = keys . get ( 0 ) ; } else { key = new OCompositeKey ( keys ) ; } Object indexValue = idx . get ( key ) ; if ( indexValue != null && ! ( indexValue instanceof Iterable < ? > ) ) indexValue = Arrays . asList ( indexValue ) ; return new OrientClassVertexIterable ( this , ( Iterable < ? > ) indexValue , label ) ; } } } // NO INDEX: EXECUTE A QUERY OrientGraphQuery query = ( OrientGraphQuery ) query ( ) ; query . labels ( label ) ; for ( int i = 0 ; i < iKey . length ; i ++ ) { query . has ( iKey [ i ] , iValue [ i ] ) ; } return query . vertices ( ) ; }
Get all the Vertices in Graph filtering by field name and value. Example:<code>
Iterable<Vertex> resultset = getVertices("Person",new String[] {"name","surname"},new Object[] { "Sherlock" ,"Holmes"});
</code>

@param iKey   Fields name
@param iValue Fields value

@return Vertices as Iterable
Get all the Vertices in Graph filtering by field name and value . Example : <code > Iterable<Vertex > resultset = getVertices ( Person new String [] { name surname } new Object [] { Sherlock Holmes } ) ; < / code >