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

org.sfm.datastax.impl.setter.FloatSettableDataSetter Maven / Gradle / Ivy

There is a newer version: 8.2.3
Show newest version
package org.sfm.datastax.impl.setter;

import com.datastax.driver.core.SettableByIndexData;
import org.sfm.reflect.Setter;
import org.sfm.reflect.primitive.FloatSetter;

public class FloatSettableDataSetter implements Setter, FloatSetter {
    private final int index;

    public FloatSettableDataSetter(int index) {
        this.index = index;
    }

    @Override
    public void setFloat(SettableByIndexData target, float value) throws Exception {
        target.setFloat(index, value);
    }

    @Override
    public void set(SettableByIndexData target, Float value) throws Exception {
        if (value == null) {
            target.setToNull(index);
        } else {
            target.setFloat(index, value);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy