Returns the value belonging to the given field as long

@param index
the index of the requested field
@return the requested value
@throws IOException
481426
public double getValueAsDouble(int index) throws IOException {
        if (index >= structure.valueSizes.size()) {
            throw new IOException("Index " + index + " is out of range.");
        }
        return Bytes.toDouble(value, structure.valueByteOffsets.get(index));
    }
166223
public ByteBuffer getValue(int index) throws IOException {
        if (index >= structure.valueSizes.size()) {
            throw new IOException("Index " + index + " is out of range.");
        }
        int length = structure.valueSizes.get(index);
        return ByteBuffer.wrap(value, structure.valueByteOffsets.get(index), length).asReadOnlyBuffer();
    }
598509
public int getInt(int index)
    {
        checkIndexLength(index, SizeOf.SIZE_OF_INT);
        return unsafe.getInt(base, address + index);
    }
663529
public FieldDefinition getField(int index) {
        if (index >= fields.size() || index < 0) {
            return null;
        }
        Iterator<FieldDefinition> iter = fields.values().iterator();
        for (int j = 0; j < index ; j++) {
            iter.next();
        }
        return iter.next();
    }
446388
@Override
    public byte[] get(int index) {
        rangeCheck(index);
        
        try {
            long address = getAddress(index);
            int segPos = _addressFormat.getOffset(address);
            int segInd = _addressFormat.getSegment(address);
            
            // no data found
            if(segPos < Segment.dataStartPosition) return null;
            
            // get data segment
            Segment seg = _segmentManager.getSegment(segInd);
            if(seg == null) return null;
            
            // read data length
            int size = _addressFormat.getDataSize(address);
            int len = (size == 0) ? seg.readInt(segPos) : size;
            
            // read data into byte array
            byte[] data = new byte[len];
            if (len > 0) {
                seg.read(segPos + 4, data);
            }
            
            return data;
        } catch(Exception e) {
            _log.warn(e.getMessage());
            return null;
        }
    }
153280
public long getLong(final int index, final ByteOrder byteOrder)
    {
        boundsCheck0(index, SIZE_OF_LONG);

        long bits = UNSAFE.getLong(byteArray, ARRAY_BASE_OFFSET + index);
        if (NATIVE_BYTE_ORDER != byteOrder)
        {
            bits = Long.reverseBytes(bits);
        }

        return bits;
    }
734913
public long getKeyAsLong(int index) throws IOException {
        if (index >= structure.keySizes.size()) {
            throw new IOException("Index " + index + " is out of range.");
        }
        return Bytes.toLong(key, structure.keyByteOffsets.get(index));
    }
1174574
private LongConstant parseLongConstant(int index)
    throws IOException
  {
    long value = readLong();

    return new LongConstant(_class.getConstantPool(), index, value);
  }
41779
public static long getLong(final DirectBuffer buffer, final int index, final Encoding encoding)
    {
        switch (encoding.primitiveType())
        {
            case CHAR:
                return buffer.getByte(index);

            case INT8:
                return buffer.getByte(index);

            case INT16:
                return buffer.getShort(index, encoding.byteOrder());

            case INT32:
                return buffer.getInt(index, encoding.byteOrder());

            case INT64:
                return buffer.getLong(index, encoding.byteOrder());

            case UINT8:
                return (short)(buffer.getByte(index) & 0xFF);

            case UINT16:
                return buffer.getShort(index, encoding.byteOrder()) & 0xFFFF;

            case UINT32:
                return buffer.getInt(index, encoding.byteOrder()) & 0xFFFF_FFFFL;

            case UINT64:
                return buffer.getLong(index, encoding.byteOrder());

            default:
                throw new IllegalArgumentException("Unsupported type for long: " + encoding.primitiveType());
        }
    }
760899
public E get(long index) {
        // @@@ can further optimize by caching last seen spineIndex,
        // which is going to be right most of the time

        // Casts to int are safe since the spine array index is the index minus
        // the prior element count from the current spine
        if (spineIndex == 0) {
            if (index < elementIndex)
                return curChunk[((int) index)];
            else
                throw new IndexOutOfBoundsException(Long.toString(index));
        }

        if (index >= count())
            throw new IndexOutOfBoundsException(Long.toString(index));

        for (int j=0; j <= spineIndex; j++)
            if (index < priorElementCount[j] + spine[j].length)
                return spine[j][((int) (index - priorElementCount[j]))];

        throw new IndexOutOfBoundsException(Long.toString(index));
    }
493510
@SuppressWarnings("unchecked")
    public V getValue(int index)
    {
        if ((index < 0) || (index >= size()))
        {
            throw new IndexOutOfBoundsException();
        }
        return (V) _array[index * 2 + 1];
    }
584555
public byte getKeyAsByte(int index) throws IOException {
        if (index >= structure.keySizes.size()) {
            throw new IOException("Index " + index + " is out of range.");
        }
        return key[structure.keyByteOffsets.get(index)];
    }
1047017
public <T> T get(int index) {
        if (size() <= index) {
            return null;
        }
        return (T) args.get(index);
    }
821809
@Override
    public long getLong(int columnIndex) throws SQLException {
        checkColumnBounds(columnIndex);
        try {
            Long longValue = getPrivateInteger(columnIndex);
            return longValue;
        } catch (Exception x) {
            throw SQLError.get(x);
        }
    }
978057
public long get(int idx) {
    Preconditions.checkElementIndex(idx, this.values.size());
    return this.values.get(idx);
  }
668299
public Object getListFieldValue(String fieldName, int index) {
		Object ret = null;
		Object val = getFieldValue(fieldName, true); // internal
		if (val instanceof List<?>) {
			List<?> list = (List<?>)val;
			Object cval = list.get(index);
			DomainObject gdo = getForRawObject(cval);
			if (gdo != null)
				ret = gdo;
			else
				ret = cval;
		} else if (val != null && val.getClass().isArray()) {
			Object aval = Array.get(val, index);
			DomainObject gdo = getForRawObject(aval);
			if (gdo != null)
				ret = gdo;
			else
				ret = aval;
		} else {
			if (!getDomainObjectType().getFieldByName(fieldName).isListOrArray())
				throw new RuntimeException("field: [" + fieldName + "] is neither list nor array");
			if (val == null)
				throw new RuntimeException("list or array field: [" + fieldName + "] is null");
		}
		return ret;
	}
210146
public long getLong(int index, long otherwise) {
        Long l = getLong(index);
        return l == null ? otherwise : l;
    }