Examples of OIndexTxAwareOneValue


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

    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

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

      }

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

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

      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

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

        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

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

            } 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
Copyright © 2018 www.massapi.com. 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.