public class TarantoolTupleImpl extends Object implements TarantoolTuple
| Constructor and Description |
|---|
TarantoolTupleImpl(org.msgpack.value.ArrayValue value,
MessagePackMapper mapper)
Construct an instance of
TarantoolTuple |
TarantoolTupleImpl(org.msgpack.value.ArrayValue value,
MessagePackMapper mapper,
TarantoolSpaceMetadata spaceMetadata)
Basic constructor.
|
TarantoolTupleImpl(Collection<?> values,
MessagePackMapper mapper)
Construct an instance of
TarantoolTuple from a list of objects |
TarantoolTupleImpl(Collection<?> values,
MessagePackMapper mapper,
TarantoolSpaceMetadata metadata)
Construct an instance of
TarantoolTuple from a list of objects. |
TarantoolTupleImpl(MessagePackMapper mapper)
Constructor for empty tuple
|
TarantoolTupleImpl(MessagePackMapper mapper,
TarantoolSpaceMetadata metadata)
Constructor for empty tuple with metadata
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canGetObject(int fieldPosition,
Class<?> objectClass)
Check if a tuple field exists and can be converted to the target value type
|
boolean |
canGetObject(String fieldName,
Class<?> objectClass)
Check if a tuple field exists and can be converted to the target value type
|
boolean |
equals(Object o) |
void |
forEach(Consumer<? super TarantoolField> action) |
Boolean |
getBoolean(int fieldPosition)
Get the field value converted to
Boolean |
Boolean |
getBoolean(String fieldName)
Get the field value converted to
Boolean |
byte[] |
getByteArray(int fieldPosition)
Get the field value converted to
byte[] |
byte[] |
getByteArray(String fieldName)
Get the field value converted to
byte[] |
Character |
getCharacter(int fieldPosition)
Get the field value converted to
Character |
Character |
getCharacter(String fieldName)
Get the field value converted to
Character |
BigDecimal |
getDecimal(int fieldPosition)
Get the field value converted to
BigDecimal |
BigDecimal |
getDecimal(String fieldName)
Get the field value converted to
BigDecimal |
Double |
getDouble(int fieldPosition)
Get the field value converted to
Double |
Double |
getDouble(String fieldName)
Get the field value converted to
Double |
Optional<TarantoolField> |
getField(int fieldPosition)
Get a tuple field by its position
|
Optional<TarantoolField> |
getField(String fieldName)
Get a tuple field by its name
|
protected int |
getFieldPositionByName(String fieldName) |
List<TarantoolField> |
getFields()
Get all tuple fields as list
|
Float |
getFloat(int fieldPosition)
Get the field value converted to
Float |
Float |
getFloat(String fieldName)
Get the field value converted to
Float |
Instant |
getInstant(int fieldPosition)
Get the field value converted to
Instant |
Instant |
getInstant(String fieldName)
Get the field value converted to
Instant |
Integer |
getInteger(int fieldPosition)
Get the field value converted to
Integer |
Integer |
getInteger(String fieldName)
Get the field value converted to
Integer |
Interval |
getInterval(int fieldPosition)
Get the field value converted to
Interval |
Interval |
getInterval(String fieldName)
Get the field value converted to
Interval |
List<?> |
getList(int fieldPosition)
Get the field value converted to
List |
List<?> |
getList(String fieldName)
Get the field value converted to
List |
Long |
getLong(int fieldPosition)
Get the field value converted to
Long |
Long |
getLong(String fieldName)
Get the field value converted to
Long |
Map<?,?> |
getMap(int fieldPosition)
Get the field value converted to
Map |
Map<?,?> |
getMap(String fieldName)
Get the field value converted to
Map |
Optional<?> |
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 type
|
Optional<?> |
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 type
|
String |
getString(int fieldPosition)
Get the field value converted to
String |
String |
getString(String fieldName)
Get the field value converted to
String |
UUID |
getUUID(int fieldPosition)
Get the field value converted to
UUID |
UUID |
getUUID(String fieldName)
Get the field value converted to
UUID |
int |
hashCode() |
boolean |
hasMetadata()
Check whether this tuple includes information about space format
|
Iterator<TarantoolField> |
iterator() |
void |
putObject(int fieldPosition,
Object value)
Set a tuple field value from an object by field position
|
void |
putObject(String fieldName,
Object value)
Set a tuple field value from an object by field name
|
void |
setField(int fieldPosition,
TarantoolField field)
Set a tuple field by field position
|
void |
setField(String fieldName,
TarantoolField field)
Set a tuple field by field name
|
int |
size()
Get the number of fields in this tuple
|
Spliterator<TarantoolField> |
spliterator() |
org.msgpack.value.Value |
toMessagePackValue(MessagePackObjectMapper mapper)
Convert this instance into a corresponding MessagePack
Value |
String |
toString() |
public TarantoolTupleImpl(MessagePackMapper mapper)
mapper - provides conversion between MessagePack values and Java objectspublic TarantoolTupleImpl(MessagePackMapper mapper, TarantoolSpaceMetadata metadata)
mapper - provides conversion between MessagePack values and Java objectsmetadata - provides information about the target spacepublic TarantoolTupleImpl(Collection<?> values, MessagePackMapper mapper)
TarantoolTuple from a list of objectsvalues - list of tuple fields datamapper - provides conversion between MessagePack values and Java objectspublic TarantoolTupleImpl(Collection<?> values, MessagePackMapper mapper, TarantoolSpaceMetadata metadata)
TarantoolTuple from a list of objects. Provides space metadata which adds
extra functionality for working with fields and indexes.values - list of tuple fields datamapper - provides conversion between MessagePack values and Java objectsmetadata - provides information about the target spacepublic TarantoolTupleImpl(org.msgpack.value.ArrayValue value,
MessagePackMapper mapper)
TarantoolTuplevalue - serialized Tarantool tuplemapper - provides conversion between MessagePack values and Java objectspublic TarantoolTupleImpl(org.msgpack.value.ArrayValue value,
MessagePackMapper mapper,
TarantoolSpaceMetadata spaceMetadata)
value - serialized Tarantool tuplemapper - provides conversion between MessagePack values and Java objectsspaceMetadata - provides field names and other metadatapublic boolean hasMetadata()
TarantoolTuplehasMetadata in interface TarantoolTuplepublic Optional<TarantoolField> getField(int fieldPosition)
TarantoolTuplegetField in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public Optional<TarantoolField> getField(String fieldName)
TarantoolTuplegetField in interface TarantoolTuplefieldName - the field name in spacepublic List<TarantoolField> getFields()
TarantoolTuplegetFields in interface TarantoolTuplepublic <O> Optional<O> getObject(int fieldPosition, Class<O> objectClass)
TarantoolTuplegetObject in interface TarantoolTupleO - target value typefieldPosition - field position from the tuple start, starting from 0objectClass - target value type classpublic boolean canGetObject(int fieldPosition,
Class<?> objectClass)
TarantoolTuplecanGetObject in interface TarantoolTuplefieldPosition - field position from the tuple start, starting from 0objectClass - target value type classpublic <O> Optional<O> getObject(String fieldName, Class<O> objectClass)
TarantoolTuplegetObject in interface TarantoolTupleO - target value typefieldName - field name, should not be nullobjectClass - target value type classpublic boolean canGetObject(String fieldName, Class<?> objectClass)
TarantoolTuplecanGetObject in interface TarantoolTuplefieldName - field name, should not be nullobjectClass - target value type classpublic Optional<?> getObject(int fieldPosition)
TarantoolTuplegetObject in interface TarantoolTuplefieldPosition - field position from the tuple start, starting from 0public Optional<?> getObject(String fieldName)
TarantoolTuplegetObject in interface TarantoolTuplefieldName - field name, should not be nullpublic Iterator<TarantoolField> iterator()
iterator in interface Iterable<TarantoolField>public void forEach(Consumer<? super TarantoolField> action)
forEach in interface Iterable<TarantoolField>public Spliterator<TarantoolField> spliterator()
spliterator in interface Iterable<TarantoolField>public org.msgpack.value.Value toMessagePackValue(MessagePackObjectMapper mapper)
PackableValuetoMessagePackValue in interface Packablemapper - configured Java objects to entities mapperpublic int size()
TarantoolTuplesize in interface TarantoolTuplepublic void setField(int fieldPosition,
TarantoolField field)
TarantoolTuplesetField in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0field - new fieldpublic void setField(String fieldName, TarantoolField field)
TarantoolTuplesetField in interface TarantoolTuplefieldName - the field name, must be not nullfield - new fieldpublic void putObject(int fieldPosition,
Object value)
TarantoolTupleputObject in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0value - new field valuepublic void putObject(String fieldName, Object value)
TarantoolTupleputObject in interface TarantoolTuplefieldName - the field name, must not be nullvalue - new field valuepublic byte[] getByteArray(int fieldPosition)
TarantoolTuplebyte[]getByteArray in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public byte[] getByteArray(String fieldName)
TarantoolTuplebyte[]getByteArray in interface TarantoolTuplefieldName - the field name, must not be nullpublic Boolean getBoolean(int fieldPosition)
TarantoolTupleBooleangetBoolean in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public Boolean getBoolean(String fieldName)
TarantoolTupleBooleangetBoolean in interface TarantoolTuplefieldName - the field name, must not be nullpublic Double getDouble(int fieldPosition)
TarantoolTupleDoublegetDouble in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public Double getDouble(String fieldName)
TarantoolTupleDoublegetDouble in interface TarantoolTuplefieldName - the field name, must not be nullpublic Float getFloat(int fieldPosition)
TarantoolTupleFloatgetFloat in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public Float getFloat(String fieldName)
TarantoolTupleFloatgetFloat in interface TarantoolTuplefieldName - the field name, must not be nullpublic Integer getInteger(int fieldPosition)
TarantoolTupleIntegergetInteger in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public Integer getInteger(String fieldName)
TarantoolTupleIntegergetInteger in interface TarantoolTuplefieldName - the field name, must not be nullpublic Long getLong(int fieldPosition)
TarantoolTupleLonggetLong in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public Long getLong(String fieldName)
TarantoolTupleLonggetLong in interface TarantoolTuplefieldName - the field name, must not be nullpublic String getString(int fieldPosition)
TarantoolTupleStringgetString in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public String getString(String fieldName)
TarantoolTupleStringgetString in interface TarantoolTuplefieldName - the field name, must not be nullpublic Character getCharacter(int fieldPosition)
TarantoolTupleCharactergetCharacter in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public Character getCharacter(String fieldName)
TarantoolTupleCharactergetCharacter in interface TarantoolTuplefieldName - the field name, must not be nullpublic UUID getUUID(int fieldPosition)
TarantoolTupleUUIDgetUUID in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public UUID getUUID(String fieldName)
TarantoolTupleUUIDgetUUID in interface TarantoolTuplefieldName - the field name, must not be nullpublic Instant getInstant(int fieldPosition)
TarantoolTupleInstantgetInstant in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public Instant getInstant(String fieldName)
TarantoolTupleInstantgetInstant in interface TarantoolTuplefieldName - the field name, must not be nullpublic Interval getInterval(int fieldPosition)
TarantoolTupleIntervalgetInterval in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public Interval getInterval(String fieldName)
TarantoolTupleIntervalgetInterval in interface TarantoolTuplefieldName - the field name, must not be nullpublic BigDecimal getDecimal(int fieldPosition)
TarantoolTupleBigDecimalgetDecimal in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public BigDecimal getDecimal(String fieldName)
TarantoolTupleBigDecimalgetDecimal in interface TarantoolTuplefieldName - the field name, must not be nullpublic List<?> getList(int fieldPosition)
TarantoolTupleListgetList in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public List<?> getList(String fieldName)
TarantoolTupleListgetList in interface TarantoolTuplefieldName - the field name, must not be nullpublic Map<?,?> getMap(int fieldPosition)
TarantoolTupleMapgetMap in interface TarantoolTuplefieldPosition - the field position from the tuple start, starting from 0public Map<?,?> getMap(String fieldName)
TarantoolTupleMapgetMap in interface TarantoolTuplefieldName - the field name, must not be nullprotected int getFieldPositionByName(String fieldName)
Copyright © 2025 Picodata. All rights reserved.