Package io.tarantool.driver.api.tuple
Class DefaultTarantoolTupleFactory
- java.lang.Object
 - 
- io.tarantool.driver.api.tuple.DefaultTarantoolTupleFactory
 
 
- 
- All Implemented Interfaces:
 TarantoolTupleFactory
public class DefaultTarantoolTupleFactory extends Object implements TarantoolTupleFactory
Default implementation forTarantoolTupleFactory 
- 
- 
Constructor Summary
Constructors Constructor Description DefaultTarantoolTupleFactory(MessagePackMapper mapper)Constructor.DefaultTarantoolTupleFactory(MessagePackMapper mapper, TarantoolSpaceMetadata metadata)Constructor with a space metadata. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TarantoolTuplecreate()Create an empty tupleTarantoolTuplecreate(Object... fields)Create a tuple from an array of field valuesTarantoolTuplecreate(Collection<?> fields)Create a tuple from a collection of field values 
 - 
 
- 
- 
Constructor Detail
- 
DefaultTarantoolTupleFactory
public DefaultTarantoolTupleFactory(MessagePackMapper mapper)
Constructor. Allows creating tuples without a space metadata. Created tuples will use the passed mapper for serialization into MessagePack arrays.- Parameters:
 mapper- mapper for conversion between Java objects and MessagePack entities
 
- 
DefaultTarantoolTupleFactory
public DefaultTarantoolTupleFactory(MessagePackMapper mapper, TarantoolSpaceMetadata metadata)
Constructor with a space metadata. Allows accessing the tuple fields by space fields' names. Created tuples will use the passed mapper for serialization into MessagePack arrays.- Parameters:
 mapper- mapper for conversion between Java objects and MessagePack entitiesmetadata- space metadata for mapping the tuple fields to space fields
 
 - 
 
- 
Method Detail
- 
create
public TarantoolTuple create()
Description copied from interface:TarantoolTupleFactoryCreate an empty tuple- Specified by:
 createin interfaceTarantoolTupleFactory- Returns:
 - new tuple instance
 
 
- 
create
public TarantoolTuple create(Object... fields)
Description copied from interface:TarantoolTupleFactoryCreate a tuple from an array of field values- Specified by:
 createin interfaceTarantoolTupleFactory- Parameters:
 fields- array of field values, may contain null values- Returns:
 - new tuple instance
 
 
- 
create
public TarantoolTuple create(Collection<?> fields)
Description copied from interface:TarantoolTupleFactoryCreate a tuple from a collection of field values- Specified by:
 createin interfaceTarantoolTupleFactory- Parameters:
 fields- collection of field values, may contain null values- Returns:
 - new tuple instance
 
 
 - 
 
 -