org.sfm.datastax.impl.setter.SetSettableDataSetter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-datastax Show documentation
Show all versions of sfm-datastax Show documentation
Cassandra Datastax SFM supports.
package org.sfm.datastax.impl.setter;
import com.datastax.driver.core.SettableByIndexData;
import org.sfm.reflect.Setter;
import java.util.Set;
public class SetSettableDataSetter implements Setter> {
private final int index;
public SetSettableDataSetter(int index) {
this.index = index;
}
@Override
public void set(SettableByIndexData target, Set value) throws Exception {
if (value == null) {
target.setToNull(index);
} else {
target.setSet(index, value);
}
}
}