Package com.orientechnologies.orient.core.index

Examples of com.orientechnologies.orient.core.index.OIndexTxAwareOneValue$PureTxBetweenIndexForwardCursor


    this.indexClass = indexClass;

    if (iKeyType == null)
      iKeyType = OType.STRING;

    this.recordKeyValueIndex = new OIndexTxAwareOneValue(graph.getRawGraph(), (OIndex<OIdentifiable>) graph
        .getRawGraph()
        .getMetadata()
        .getIndexManager()
        .createIndex("__@recordmap@___" + indexName, OClass.INDEX_TYPE.DICTIONARY.toString(),
            new OSimpleKeyIndexDefinition(OType.LINK, OType.STRING), null, null, null));
View Full Code Here


      }

    if (recordKeyValueMap == null)
      recordKeyValueIndex = buildKeyValueIndex(metadata);
    else
      recordKeyValueIndex = new OIndexTxAwareOneValue(graph.getRawGraph(), (OIndex<OIdentifiable>) graph.getRawGraph()
          .getMetadata().getIndexManager().getIndex(recordKeyValueMap));
  }
View Full Code Here

      recordKeyValueIndex = new OIndexTxAwareOneValue(graph.getRawGraph(), (OIndex<OIdentifiable>) graph.getRawGraph()
          .getMetadata().getIndexManager().getIndex(recordKeyValueMap));
  }

  private OIndex<?> buildKeyValueIndex(ODocument metadata) {
    OIndex<?> recordKeyValueIndex = new OIndexTxAwareOneValue(graph.getRawGraph(), (OIndex<OIdentifiable>) graph
        .getRawGraph()
        .getMetadata()
        .getIndexManager()
        .createIndex("__@recordmap@___" + underlying.getName(), OClass.INDEX_TYPE.DICTIONARY.toString(),
            new OSimpleKeyIndexDefinition(OType.LINK, OType.STRING), null, null, null));

    final List<ODocument> entries = graph.getRawGraph().query(
        new OSQLSynchQuery<Object>("select  from index:" + underlying.getName()));

    for (ODocument entry : entries) {
      final OIdentifiable rid = entry.field("rid");
      if (rid != null)
        recordKeyValueIndex.put(new OCompositeKey(rid, entry.field("key")), rid);
    }

    metadata.field(CONFIG_RECORD_MAP_NAME, recordKeyValueIndex.getName());
    return recordKeyValueIndex;
  }
View Full Code Here

        this.indexClass = indexClass;

        if (iKeyType == null)
            iKeyType = OType.STRING;

        this.recordKeyValueIndex = new OIndexTxAwareOneValue(graph.getRawGraph(), (OIndex<OIdentifiable>) graph
                .getRawGraph()
                .getMetadata()
                .getIndexManager()
                .createIndex("__@recordmap@___" + indexName, OClass.INDEX_TYPE.DICTIONARY.toString(),
                        new OSimpleKeyIndexDefinition(OType.LINK, OType.STRING), null, null, null));
View Full Code Here

            } catch (ClassNotFoundException e) {
                throw new IllegalArgumentException("Index class '" + indexClassName
                        + "' is not registered. Supported ones: Vertex, Edge and custom class that extends them");
            }

        recordKeyValueIndex = new OIndexTxAwareOneValue(graph.getRawGraph(), (OIndex<OIdentifiable>) graph.getRawGraph().getMetadata()
                .getIndexManager().getIndex(recordKeyValueMap));
    }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.index.OIndexTxAwareOneValue$PureTxBetweenIndexForwardCursor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.