public Date getDate(int i) { metadata.checkType(i, DataType.Name.TIMESTAMP); ByteBuffer value = data.get(i); if (value == null || value.remaining() == 0) return null; return DateType.instance.compose(value); }
public int getInt(int i) { metadata.checkType(i, DataType.Name.INT); ByteBuffer value = data.get(i); if (value == null || value.remaining() == 0) return 0; return Int32Type.instance.compose(value); }
public long getLong(int i) { metadata.checkType(i, DataType.Name.BIGINT, DataType.Name.COUNTER); ByteBuffer value = data.get(i); if (value == null || value.remaining() == 0) return 0L; return LongType.instance.compose(value); }
public InetAddress getInet(int i) { metadata.checkType(i, DataType.Name.INET); ByteBuffer value = data.get(i); if (value == null || value.remaining() == 0) return null; return InetAddressType.instance.compose(value); }
public boolean getBool(int i) { metadata.checkType(i, DataType.Name.BOOLEAN); ByteBuffer value = data.get(i); if (value == null || value.remaining() == 0) return false; return BooleanType.instance.compose(value); }
public BigDecimal getDecimal(int i) { metadata.checkType(i, DataType.Name.DECIMAL); ByteBuffer value = data.get(i); if (value == null || value.remaining() == 0) return null; return DecimalType.instance.compose(value); }
public BigInteger getVarint(int i) { metadata.checkType(i, DataType.Name.VARINT); ByteBuffer value = data.get(i); if (value == null || value.remaining() == 0) return null; return IntegerType.instance.compose(value); }
public double getDouble(int i) { metadata.checkType(i, DataType.Name.DOUBLE); ByteBuffer value = data.get(i); if (value == null || value.remaining() == 0) return 0.0; return DoubleType.instance.compose(value); }
public float getFloat(int i) { metadata.checkType(i, DataType.Name.FLOAT); ByteBuffer value = data.get(i); if (value == null || value.remaining() == 0) return 0.0f; return FloatType.instance.compose(value); }
public UUID getUUID(int i) { DataType.Name type = metadata.checkType(i, DataType.Name.UUID, DataType.Name.TIMEUUID); ByteBuffer value = data.get(i); if (value == null || value.remaining() == 0) return null; return type == DataType.Name.UUID ? UUIDType.instance.compose(value) : TimeUUIDType.instance.compose(value); }
public String getString(int i) { DataType.Name type = metadata.checkType(i, DataType.Name.VARCHAR, DataType.Name.TEXT, DataType.Name.ASCII); ByteBuffer value = data.get(i); if (value == null) return null; return type == DataType.Name.ASCII ? AsciiType.instance.compose(value) : UTF8Type.instance.compose(value); }
public ByteBuffer getBytes(int i) { metadata.checkType(i, DataType.Name.BLOB); return getBytesUnsafe(i); }