Package com.orientechnologies.orient.core.id

Examples of com.orientechnologies.orient.core.id.ORecordId


    return result;
  }

  public ORecordId readRID() throws IOException {
    return new ORecordId(readShort(), readLong());
  }
View Full Code Here


    while (iChannel.readByte() == 1) {
      try {
        OTransactionEntryProxy entry = new OTransactionEntryProxy();

        final ORecordId rid = (ORecordId) entry.getRecord().getIdentity();

        entry.status = iChannel.readByte();
        rid.clusterId = iChannel.readShort();
        rid.clusterPosition = iChannel.readLong();
        ((OTransactionRecordProxy) entry.getRecord()).setRecordType(iChannel.readByte());
View Full Code Here

            if (ioResult != null) {

              ODocument record;
              if (ioResult instanceof String) {
                try {
                  record = new ODocument(iDatabase, new ORecordId((String) ioResult));
                } catch (Exception e) {
                  OLogManager.instance().error(this, "Error on reading rid with value '%s'", null, ioResult);
                  record = null;
                }
              } else if (ioResult instanceof ORID)
View Full Code Here

    if (!word.toString().contains(":"))
      throw new OCommandSQLParsingException(
          "Range must contains record id in the form of <cluster-id>:<cluster-pos>. Example: RANGE 10:50, 10:100", text, currentPos);

    try {
      rangeFrom = new ORecordId(word.toString());
    } catch (Exception e) {
      throw new OCommandSQLParsingException("Invalid record id setted as RANGE from. Value setted is '" + word
          + "' but it should be a valid record id in the form of <cluster-id>:<cluster-pos>. Example: RANGE 10:50", text,
          currentPos);
    }

    if (newPos == -1)
      return;

    currentPos = newPos;

    newPos = OSQLHelper.nextWord(text, textUpperCase, currentPos, word, true);

    if (newPos == -1)
      return;

    if (!word.toString().equalsIgnoreCase("LIMIT")) {
      if (!word.toString().contains(":"))
        throw new OCommandSQLParsingException(
            "Range must contains record id in the form of <cluster-id>:<cluster-pos>. Example: RANGE 10:50, 10:100", text,
            currentPos);

      try {
        rangeTo = new ORecordId(word.toString());
      } catch (Exception e) {
        throw new OCommandSQLParsingException("Invalid record id setted as RANGE to. Value setted is '" + word
            + "' but it should be a valid record id in the form of <cluster-id>:<cluster-pos>. Example: RANGE 10:50, 10:100", text,
            currentPos);
      }
View Full Code Here

    scanEntireClusters(clusterIds);
  }

  private void searchInRecords() {
    ORecordId rid = new ORecordId();
    ORecordInternal<?> record;
    for (String rec : compiledFilter.getTargetRecords()) {
      rid.fromString(rec);
      record = database.load(rid);
      foreach(record);
    }
  }
View Full Code Here

      }
      fieldValue = coll;

    } else if (iValue.indexOf(':') > 0)
      // RID
      fieldValue = new ORecordId(iValue.trim());
    else {

      final String upperCase = iValue.toUpperCase();
      if (upperCase.equals("NULL"))
        // NULL
View Full Code Here

    try {
      final int dataSegment = getDataSegmentForRecord(iClusterSegment, iContent);
      final ODataLocal data = getDataSegment(dataSegment);

      final ORecordId rid = new ORecordId(iClusterSegment.getId());
      rid.clusterPosition = iClusterSegment.addPhysicalPosition(-1, -1, iRecordType);

      final long dataOffset = data.addRecord(rid, iContent);

      // UPDATE THE POSITION IN CLUSTER WITH THE POSITION OF RECORD IN
View Full Code Here

  public int size() {
    return tree.size();
  }

  public void load() {
    tree = new OMVRBTreeDatabaseLazySave<String, T>(underlyingDatabase, new ORecordId(
        database.getStorage().getConfiguration().dictionaryRecordId));
    tree.load();
  }
View Full Code Here

    while (iChannel.readByte() == 1) {
      try {
        OTransactionEntryProxy entry = new OTransactionEntryProxy();

        final ORecordId rid = (ORecordId) entry.getRecord().getIdentity();

        entry.status = iChannel.readByte();
        rid.clusterId = iChannel.readShort();
        rid.clusterPosition = iChannel.readLong();
        ((OTransactionRecordProxy) entry.getRecord()).setRecordType(iChannel.readByte());
View Full Code Here

          fieldValue = fields[i + 1].trim();
          fieldValueAsString = fieldValue.length() >= 2 ? fieldValue.substring(1, fieldValue.length() - 1) : fieldValue;

          // RECORD ATTRIBUTES
          if (fieldName.equals(ATTRIBUTE_ID))
            iRecord.setIdentity(new ORecordId(fieldValueAsString));

          else if (fieldName.equals(ATTRIBUTE_VERSION))
            iRecord.setVersion(Integer.parseInt(fieldValue));

          else if (fieldName.equals(ATTRIBUTE_TYPE)) {
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.id.ORecordId

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.