Examples of indexTo()


Examples of com.persistit.Key.indexTo()

      if (exchange.getValue().isDefined()) {
        T value = (T) exchange.getValue().get();
        Key key = exchange.getKey();
        Object[] array = new Object[key.getDepth()];
        for (int i = 0; i < key.getDepth(); i++) {
          array[i] = key.indexTo(i - key.getDepth()).decode();
        }
        return new Entry<T>(array, value);
      }
      throw new NoSuchElementException();
    }
View Full Code Here

Examples of com.persistit.Key.indexTo()

            int[] keyDepth = table.hKey().keyDepth();
            index = keyDepth[keyDepth.length - 1];
            if (index >= hkey.getDepth()) {
                return table.rowDef();
            }
            hkey.indexTo(index);
            ordinal = hkey.decodeInt();
            boolean found = false;
            for (Join join : table.getChildJoins()) {
                table = join.getChild();
                if (table.getOrdinal() == ordinal) {
View Full Code Here

Examples of com.persistit.Key.indexTo()

            checkValueUsage();
            thatKey = that.pValue;
            thatStartIndex -= that.pKeyFields;
        }
        int thisPosition = thisKey.indexTo(thisStartIndex).getIndex();
        int thatPosition = thatKey.indexTo(thatStartIndex).getIndex();
        byte[] thisBytes = thisKey.getEncodedBytes();
        byte[] thatBytes = thatKey.getEncodedBytes();
        int c = 0;
        int eqSegments = 0;
        while (eqSegments < fieldCount) {
View Full Code Here

Examples of com.persistit.Key.indexTo()

        customerKey.valueAt(0).putInt32(42);

        Key key = new Key (null, 2047);
        customerKey.copyTo(key);
       
        key.indexTo(0);
        assertEquals (key.decodeInt(), ordinal("customer"));
        assertEquals (key.decodeLong(), 42);
    }
   
    @Test
View Full Code Here

Examples of com.persistit.Key.indexTo()

        key.valueAt(1).putInt32(51);

        Key target = new Key (null, 2047);
        key.copyTo(target);
       
        target.indexTo(0);
        assertEquals(target.decodeInt(), ordinal("customer"));
        assertEquals(target.decodeLong(), 42);
        assertEquals(target.decodeInt(), ordinal("order"));
        assertEquals(target.decodeLong(), 51);
        assertEquals(target.decodeInt(), ordinal("item"));
View Full Code Here

Examples of com.persistit.Key.indexTo()

    public int compare(byte[] bytes)
    {
        Key thatKey = new Key(key);
        thatKey.clear();
        thatKey.append(bytes);
        thatKey.indexTo(0);
        int thatPosition = thatKey.getIndex();
        thatKey.indexTo(1);
        int thatEnd = thatKey.getIndex();
        return compareOneKeySegment(thatKey.getEncodedBytes(), thatPosition, thatEnd);
    }
View Full Code Here

Examples of com.persistit.Key.indexTo()

        Key thatKey = new Key(key);
        thatKey.clear();
        thatKey.append(bytes);
        thatKey.indexTo(0);
        int thatPosition = thatKey.getIndex();
        thatKey.indexTo(1);
        int thatEnd = thatKey.getIndex();
        return compareOneKeySegment(thatKey.getEncodedBytes(), thatPosition, thatEnd);
    }

    // for use by this class
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.