All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.tarantool.driver.api.tuple.TarantoolField Maven / Gradle / Ivy

Go to download

Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework

There is a newer version: 0.14.0
Show newest version
package io.tarantool.driver.api.tuple;

import io.tarantool.driver.mappers.MessagePackValueMapper;
import io.tarantool.driver.protocol.Packable;

/**
 * Represents individual field in a tuple
 *
 * @author Alexey Kuzin
 */
public interface TarantoolField extends Packable {
    /**
     * Get the field value converted to the target type
     *
     * @param targetClass the target type class
     * @param mapper      mapper for converting MessagePack entity to Java object
     * @param          the target type
     * @return value
     */
     O getValue(Class targetClass, MessagePackValueMapper mapper);

    /**
     * Get the field value, possibly converted to some Java type
     *
     * @param mapper mapper for converting MessagePack entity to Java object
     * @return value
     */
    Object getValue(MessagePackValueMapper mapper);

    /**
     * Check whether the underlying field value can be converted to an object using the given MessagePack-to-object
     * mapper
     *
     * @param targetClass the target type class
     * @param mapper      mapper for converting MessagePack entity to Java object
     * @return value
     */
    boolean canConvertValue(Class targetClass, MessagePackValueMapper mapper);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy