@Override public int hash() { return getShort(); }
@Override public IPointable createPointable() { return new ShortPointable(); }
public void setShort(short value) { setShort(bytes, start, value); }
public void convertShort(ShortPointable shortp, DataOutput dOut) throws SystemException, IOException { abvsInner.reset(); FunctionHelper.writeNumberWithPadding(shortp.longValue(), 1, dOutInner); sendStringDataOutput(dOut); }
@Override public int compareTo(IPointable pointer) { return compareTo(pointer.getByteArray(), pointer.getStartOffset(), pointer.getLength()); }
case ValueTag.XS_UNSIGNED_BYTE_TAG: tvp.getValue(tp.shortp); value = tp.shortp.doubleValue(); break;
public void setNumTokensBoundsInSearchKeys(short numTokensLowerBound, short numTokensUpperBound) { ShortPointable.setShort(lowerBoundTuple.getFieldData(0), lowerBoundTuple.getFieldStart(0), numTokensLowerBound); ShortPointable.setShort(upperBoundTuple.getFieldData(0), upperBoundTuple.getFieldStart(0), numTokensUpperBound); }
public void convertUnsignedByte(ShortPointable shortp, DataOutput dOut) throws SystemException, IOException { abvsInner.reset(); FunctionHelper.writeNumberWithPadding(shortp.longValue(), 1, dOutInner); sendStringDataOutput(dOut); }
@Override public int intValue() { return getShort(); }
public static void setDate(byte[] bytes, int start, long year, long month, long day, long timezoneHour, long timezoneMinute) { ShortPointable.setShort(bytes, start + YEAR_OFFSET, (short) year); BytePointable.setByte(bytes, start + MONTH_OFFSET, (byte) month); BytePointable.setByte(bytes, start + DAY_OFFSET, (byte) day); BytePointable.setByte(bytes, start + TIMEZONE_HOUR_OFFSET, (byte) timezoneHour); BytePointable.setByte(bytes, start + TIMEZONE_MINUTE_OFFSET, (byte) timezoneMinute); }
case ValueTag.XS_UNSIGNED_BYTE_TAG: tvp.getValue(tp.shortp); value = tp.shortp.longValue(); break;
@Override public long longValue() { return getShort(); }
public static void setDateTime(byte[] bytes, int start, long year, long month, long day, long hour, long minute, long milliSecond, long timezoneHour, long timezoneMinute) { ShortPointable.setShort(bytes, start + YEAR_OFFSET, (short) year); BytePointable.setByte(bytes, start + MONTH_OFFSET, (byte) month); BytePointable.setByte(bytes, start + DAY_OFFSET, (byte) day); BytePointable.setByte(bytes, start + HOUR_OFFSET, (byte) hour); BytePointable.setByte(bytes, start + MINUTE_OFFSET, (byte) minute); IntegerPointable.setInteger(bytes, start + MILLISECOND_OFFSET, (int) milliSecond); BytePointable.setByte(bytes, start + TIMEZONE_HOUR_OFFSET, (byte) timezoneHour); BytePointable.setByte(bytes, start + TIMEZONE_MINUTE_OFFSET, (byte) timezoneMinute); }
case ValueTag.XS_UNSIGNED_BYTE_TAG: tvp.getValue(tp.shortp); value = tp.shortp.longValue(); break;
@Override public double doubleValue() { return getShort(); } }
@Override public int getFieldLength(int fIdx) { if (fIdx == 0) { return ShortPointable.getShort(buf, tupleStartOff + nullFlagsBytes); } else { return ShortPointable.getShort(buf, tupleStartOff + nullFlagsBytes + fIdx * 2) - ShortPointable.getShort(buf, tupleStartOff + nullFlagsBytes + ((fIdx - 1) * 2)); } }
@Override public int getFieldStart(int fIdx) { if (fIdx == 0) { return tupleStartOff + nullFlagsBytes + fieldSlotsBytes; } else { return tupleStartOff + nullFlagsBytes + fieldSlotsBytes + ShortPointable.getShort(buf, tupleStartOff + nullFlagsBytes + ((fIdx - 1) * 2)); } }
@Override public int getTupleSize() { return nullFlagsBytes + fieldSlotsBytes + ShortPointable.getShort(buf, tupleStartOff + nullFlagsBytes + (fieldCount - 1) * 2); } }