public class Value extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Value.Type |
Modifier | Constructor and Description |
---|---|
|
Value() |
protected |
Value(Value.Type type) |
Modifier and Type | Method and Description |
---|---|
static Value |
createBlob(byte[] value)
Represents a blob value.
|
static Value |
createBlob(ByteBuffer value)
Represents blob value.
|
static Value |
createDouble(double value)
Represents a double value.
|
static Value |
createInt64(long value)
Represents a long integer
|
static Value |
createNull()
Create a null / empty value.
|
static Value |
createSafeBlob(byte[] value)
Represents a safe blob value that copies the byte array.
|
static Value |
createSafeBlob(ByteBuffer value)
Creates a copy of a ByteBuffer into this Value.
|
static Value |
createString(String value)
Create a new String value.
|
static Value |
createTimestamp(Timespec value)
Represents a timestamp
|
Value |
ensureByteBufferBackedString()
If this Value's type is a string, ensures that it creates a
directly allocated ByteBuffer with a copy of the UTF-8 string representation.
|
boolean |
equals(Object obj) |
ByteBuffer |
getBlob() |
double |
getDouble() |
long |
getInt64() |
String |
getString() |
Timespec |
getTimestamp() |
Value.Type |
getType() |
boolean |
isNull()
Returns true if this value is null.
|
void |
setBlob(byte[] value)
Updates value to take a certain blob value.
|
void |
setBlob(ByteBuffer value)
Updates value to take a certain blob value;
|
void |
setDouble(double value)
Updates value to take a certain double value;
|
void |
setInt64(long value)
Updates value to take a certain long integer value;
|
void |
setNative(long batchTable,
Value.Type columnType,
int offset) |
void |
setNull()
Updates value to represent an unintialised value.
|
void |
setSafeBlob(byte[] value)
Updates value to take a certain blob value.
|
void |
setSafeBlob(ByteBuffer value)
Updates value to take a certain blob value.
|
void |
setString(String value)
Update this value to be a String.
|
void |
setTimestamp(Timespec value)
Updates value to take a certain timestamp;
|
String |
toString() |
public Value()
protected Value(Value.Type type)
public static Value createNull()
public void setNative(long batchTable, Value.Type columnType, int offset)
public void setNull()
public boolean isNull()
public static Value createInt64(long value)
public void setInt64(long value)
public static Value createDouble(double value)
public void setDouble(double value)
public void setTimestamp(Timespec value)
public static Value createBlob(byte[] value)
public static Value createBlob(ByteBuffer value)
public void setBlob(byte[] value)
public void setBlob(ByteBuffer value)
public void setSafeBlob(byte[] value)
public void setSafeBlob(ByteBuffer value)
public static Value createSafeBlob(byte[] value)
public static Value createSafeBlob(ByteBuffer value)
public void setString(String value)
public static Value createString(String value)
value
- String representation of value.public Value ensureByteBufferBackedString()
public Value.Type getType()
public long getInt64()
public double getDouble()
public Timespec getTimestamp()
public ByteBuffer getBlob()
public String getString()
Copyright © 2021. All rights reserved.