public interface Tuple
Modifier and Type | Method and Description |
---|---|
Object |
get(String field)
Returns the value of a given field
|
Integer |
getBlob(String field)
Returns the blob id of a blob storage for a BLOB type field.
|
Boolean |
getBoolean(String field)
Returns the value of a given field in the form of a boolean
|
byte[] |
getBytes(String field)
Returns the value of a given field in the form of a byte[]
|
Date |
getDate(String field)
Returns the value of a given field in the form of a date (with precision of YYYY/MM/DD)
|
Double |
getDouble(String field)
Returns the value of a given field in the form of a double
|
List<Field> |
getFields()
Return the collection of format fields for the tuple.
|
Float |
getFloat(String field)
Returns the value of a given field in the form of a float
|
Integer |
getInteger(String field)
Returns the value of a given field in the form of an integer
|
Long |
getLong(String field)
Returns the value of a given field in the form of a long
|
Map<String,Object> |
getMap(String field)
Returns the value of a given field in the form of a Map
|
Short |
getShort(String field)
Returns the value of a given field in the form of a short
|
String |
getString(String field)
Returns the value of a given field in the form of a String
|
Time |
getTime(String field)
Returns the value of a given field in the form of a time
|
Timestamp |
getTimestamp(String field)
Returns the value of a given field in the form of a Date (with milliseconds precision)
|
TupleKey |
getTupleKey()
Returns the key of this tuple
|
boolean |
isMax()
Indicates whether this tuple is the maximum tuple for the table or not.
|
boolean |
isMin()
Indicates whether this tuple is the minimum tuple for the table or not.
|
Tuple |
put(String field,
Object value)
Sets the value for a given field in this tuple.
|
Tuple |
putBlob(String field,
int blobId)
Sets a blob id value for a blob field in this tuple.
|
Tuple |
putBoolean(String field,
Boolean value)
Sets a boolean value for a given field in this tuple.
|
Tuple |
putBytes(String field,
byte[] value)
Sets a Byte[] value for a given field in this tuple.
|
Tuple |
putDate(String field,
Date value)
Sets a Date value for a given field in this tuple.
|
Tuple |
putDouble(String field,
Double value)
Sets a double value for a given field in this tuple.
|
Tuple |
putFloat(String field,
Float value)
Sets a float value for a given field in this tuple.
|
Tuple |
putIgnore(String field)
Marks a field as an ignore field.
|
Tuple |
putInteger(String field,
Integer value)
Sets an Integer value for a given field in this tuple.
|
Tuple |
putLong(String field,
Long value)
Sets a Long value for a given field in this tuple.
|
Tuple |
putMap(String field,
Map<String,Object> value)
Sets a map value for a given field in this tuple.
|
Tuple |
putShort(String field,
Short value)
Sets a short value for a given field in this tuple.
|
Tuple |
putString(String field,
String value)
Sets a String value for a given field in this tuple.
|
Tuple |
putTime(String field,
Time value)
Sets a time value for a given field in this tuple.
|
Tuple |
putTimestamp(String field,
Timestamp value)
Sets a Date value for a given field in this tuple.
|
String |
toString()
Get a printable line for the tuple
|
Object get(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleBoolean getBoolean(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a boolean fieldString getString(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a String fieldbyte[] getBytes(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a Byte[] fieldInteger getInteger(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not an integer fieldShort getShort(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a short fieldLong getLong(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a long fieldFloat getFloat(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a float fieldDouble getDouble(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a double fieldDate getDate(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a DATE fieldTime getTime(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a TIME fieldTimestamp getTimestamp(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a TIMESTAMP fieldMap<String,Object> getMap(String field)
field
- Field nameNotCompatibleTableModelException
- If the field doesn't exist for this tupleClassCastException
- In case of the field is not a MAP fieldList<Field> getFields()
Tuple put(String field, Object value)
field
- Field namevalue
- Raw objectNotCompatibleTableModelException
- If the field does not exist in this tupleTuple putBoolean(String field, Boolean value)
field
- Field namevalue
- Boolean value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a boolean.Tuple putString(String field, String value)
field
- Field namevalue
- String value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a String.Tuple putBytes(String field, byte[] value)
field
- Field namevalue
- Byte[] value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a Byte[].Tuple putInteger(String field, Integer value)
field
- Field namevalue
- Integer value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not an Integer.Tuple putShort(String field, Short value)
field
- Field namevalue
- Short value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a short.Tuple putLong(String field, Long value)
field
- Field namevalue
- Long value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a Long.Tuple putFloat(String field, Float value)
field
- Field namevalue
- Float value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a Float.Tuple putDouble(String field, Double value)
field
- Field namevalue
- Double value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a Double.Tuple putTimestamp(String field, Timestamp value)
field
- Field namevalue
- Date value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a TIMESTAMP.Tuple putDate(String field, Date value)
field
- Field namevalue
- Date value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a DATE.Tuple putTime(String field, Time value)
field
- Field namevalue
- Time value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a TIME.Tuple putMap(String field, Map<String,Object> value)
field
- Field namevalue
- Map value.NotCompatibleTableModelException
- If the field does not exist in this tuple.ClassCastException
- If the field is not a MAP.TupleKey getTupleKey()
Integer getBlob(String field)
field
- Name of the field to be recovered.NotCompatibleTableModelException
- If the field doesn't exist.ClassCastException
- If the field is not a blob field.Tuple putBlob(String field, int blobId)
field
- Name of the blob fieldblobId
- Blob storage id (can be retrieved with getBlobId from another tuple).NotCompatibleTableModelException
- If the field doesn't exist on this tuple.ClassCastException
- If the field is not a blob field.Tuple putIgnore(String field)
field
- Name of the field to be ignored in this tuple.NotCompatibleTableModelException
- If the field does not exist or represents a key field.String toString()
boolean isMin()
boolean isMax()
Copyright © 2020. All rights reserved.