Package io.tarantool.driver.api.tuple
Interface TarantoolTuple
- 
- All Superinterfaces:
 Iterable<TarantoolField>,Packable,Serializable
- All Known Implementing Classes:
 TarantoolTupleImpl
public interface TarantoolTuple extends Iterable<TarantoolField>, Packable
Basic Tarantool atom of data 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanGetObject(int fieldPosition, Class<?> objectClass)Check if a tuple field exists and can be converted to the target value typebooleancanGetObject(String fieldName, Class<?> objectClass)Check if a tuple field exists and can be converted to the target value typeBooleangetBoolean(int fieldPosition)Get the field value converted toBooleanBooleangetBoolean(String fieldName)Get the field value converted toBooleanbyte[]getByteArray(int fieldPosition)Get the field value converted tobyte[]byte[]getByteArray(String fieldName)Get the field value converted tobyte[]CharactergetCharacter(int fieldPosition)Get the field value converted toCharacterCharactergetCharacter(String fieldName)Get the field value converted toCharacterBigDecimalgetDecimal(int fieldPosition)Get the field value converted toBigDecimalBigDecimalgetDecimal(String fieldName)Get the field value converted toBigDecimalDoublegetDouble(int fieldPosition)Get the field value converted toDoubleDoublegetDouble(String fieldName)Get the field value converted toDoubleOptional<TarantoolField>getField(int fieldPosition)Get a tuple field by its positionOptional<TarantoolField>getField(String fieldName)Get a tuple field by its nameList<TarantoolField>getFields()Get all tuple fields as listFloatgetFloat(int fieldPosition)Get the field value converted toFloatFloatgetFloat(String fieldName)Get the field value converted toFloatIntegergetInteger(int fieldPosition)Get the field value converted toIntegerIntegergetInteger(String fieldName)Get the field value converted toIntegerList<?>getList(int fieldPosition)Get the field value converted toListList<?>getList(String fieldName)Get the field value converted toListLonggetLong(int fieldPosition)Get the field value converted toLongLonggetLong(String fieldName)Get the field value converted toLongMap<?,?>getMap(int fieldPosition)Get the field value converted toMapMap<?,?>getMap(String fieldName)Get the field value converted toMapOptional<?>getObject(int fieldPosition)Get a tuple field value as a raw object<O> Optional<O>getObject(int fieldPosition, Class<O> objectClass)Get a tuple field value by its position specifying the target value typeOptional<?>getObject(String fieldName)Get a tuple field value as a raw object<O> Optional<O>getObject(String fieldName, Class<O> objectClass)Get a tuple field value by its name specifying the target value typeStringgetString(int fieldPosition)Get the field value converted toStringStringgetString(String fieldName)Get the field value converted toStringUUIDgetUUID(int fieldPosition)Get the field value converted toUUIDUUIDgetUUID(String fieldName)Get the field value converted toUUIDvoidputObject(int fieldPosition, Object value)Set a tuple field value from an object by field positionvoidputObject(String fieldName, Object value)Set a tuple field value from an object by field namevoidsetField(int fieldPosition, TarantoolField field)Set a tuple field by field positionvoidsetField(String fieldName, TarantoolField field)Set a tuple field by field nameintsize()Get the number of fields in this tuple- 
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator 
- 
Methods inherited from interface io.tarantool.driver.protocol.Packable
toMessagePackValue 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getField
Optional<TarantoolField> getField(int fieldPosition)
Get a tuple field by its position- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - field or empty optional if the field position is out of tuple length
 
 
- 
getField
Optional<TarantoolField> getField(String fieldName)
Get a tuple field by its name- Parameters:
 fieldName- the field name in space- Returns:
 - field or empty optional if the field not exist in space
 
 
- 
getFields
List<TarantoolField> getFields()
Get all tuple fields as list- Returns:
 - all tuple fields as list
 
 
- 
getObject
<O> Optional<O> getObject(int fieldPosition, Class<O> objectClass)
Get a tuple field value by its position specifying the target value type- Type Parameters:
 O- target value type- Parameters:
 fieldPosition- field position from the the tuple start, starting from 0objectClass- target value type class- Returns:
 - nullable value of a field wrapped in Optional, possibly converted to a Java type
 
 
- 
canGetObject
boolean canGetObject(int fieldPosition, Class<?> objectClass)Check if a tuple field exists and can be converted to the target value type- Parameters:
 fieldPosition- field position from the the tuple start, starting from 0objectClass- target value type class- Returns:
 - true, if the field exists and can be converted to the given type, false otherwise
 
 
- 
getObject
<O> Optional<O> getObject(String fieldName, Class<O> objectClass)
Get a tuple field value by its name specifying the target value type- Type Parameters:
 O- target value type- Parameters:
 fieldName- field name, should not be nullobjectClass- target value type class- Returns:
 - nullable value of a field wrapped in Optional, possibly converted to a Java type
 
 
- 
canGetObject
boolean canGetObject(String fieldName, Class<?> objectClass)
Check if a tuple field exists and can be converted to the target value type- Parameters:
 fieldName- field name, should not be nullobjectClass- target value type class- Returns:
 - true, if the field exists and can be converted to the given type, false otherwise
 
 
- 
getObject
Optional<?> getObject(int fieldPosition)
Get a tuple field value as a raw object- Parameters:
 fieldPosition- field position from the the tuple start, starting from 0- Returns:
 - nullable value of a field wrapped in Optional
 
 
- 
getObject
Optional<?> getObject(String fieldName)
Get a tuple field value as a raw object- Parameters:
 fieldName- field name, should not be null- Returns:
 - nullable value of a field wrapped in Optional
 
 
- 
size
int size()
Get the number of fields in this tuple- Returns:
 - the number of fields in this tuple
 
 
- 
setField
void setField(int fieldPosition, TarantoolField field)Set a tuple field by field position- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0field- new field
 
- 
setField
void setField(String fieldName, TarantoolField field)
Set a tuple field by field name- Parameters:
 fieldName- the field name, must be not nullfield- new field
 
- 
putObject
void putObject(int fieldPosition, Object value)Set a tuple field value from an object by field position- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0value- new field value
 
- 
putObject
void putObject(String fieldName, Object value)
Set a tuple field value from an object by field name- Parameters:
 fieldName- the field name, must not be nullvalue- new field value
 
- 
getByteArray
byte[] getByteArray(int fieldPosition)
Get the field value converted tobyte[]- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getByteArray
byte[] getByteArray(String fieldName)
Get the field value converted tobyte[]- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getBoolean
Boolean getBoolean(int fieldPosition)
Get the field value converted toBoolean- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getBoolean
Boolean getBoolean(String fieldName)
Get the field value converted toBoolean- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getDouble
Double getDouble(int fieldPosition)
Get the field value converted toDouble- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getDouble
Double getDouble(String fieldName)
Get the field value converted toDouble- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getFloat
Float getFloat(int fieldPosition)
Get the field value converted toFloat- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getFloat
Float getFloat(String fieldName)
Get the field value converted toFloat- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getInteger
Integer getInteger(int fieldPosition)
Get the field value converted toInteger- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getInteger
Integer getInteger(String fieldName)
Get the field value converted toInteger- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getLong
Long getLong(int fieldPosition)
Get the field value converted toLong- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getLong
Long getLong(String fieldName)
Get the field value converted toLong- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getString
String getString(int fieldPosition)
Get the field value converted toString- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getString
String getString(String fieldName)
Get the field value converted toString- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getCharacter
Character getCharacter(int fieldPosition)
Get the field value converted toCharacter- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getCharacter
Character getCharacter(String fieldName)
Get the field value converted toCharacter- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getUUID
UUID getUUID(int fieldPosition)
Get the field value converted toUUID- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getUUID
UUID getUUID(String fieldName)
Get the field value converted toUUID- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getDecimal
BigDecimal getDecimal(int fieldPosition)
Get the field value converted toBigDecimal- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getDecimal
BigDecimal getDecimal(String fieldName)
Get the field value converted toBigDecimal- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getList
List<?> getList(int fieldPosition)
Get the field value converted toList- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
- 
getList
List<?> getList(String fieldName)
Get the field value converted toList- Parameters:
 fieldName- the field name, must not be null- Returns:
 - value
 
 
- 
getMap
Map<?,?> getMap(int fieldPosition)
Get the field value converted toMap- Parameters:
 fieldPosition- the field position from the the tuple start, starting from 0- Returns:
 - value
 
 
 - 
 
 -