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

org.simpleflatmapper.jdbc.impl.setter.LongPreparedStatementSetter Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

There is a newer version: 9.0.2
Show newest version
package org.simpleflatmapper.jdbc.impl.setter;

import org.simpleflatmapper.reflect.Setter;
import org.simpleflatmapper.reflect.primitive.LongSetter;

import java.sql.PreparedStatement;

public class LongPreparedStatementSetter implements Setter, LongSetter {

    private final int columnIndex;
    private final LongPreparedStatementIndexSetter setter = new LongPreparedStatementIndexSetter();

    public LongPreparedStatementSetter(int columnIndex) {
        this.columnIndex = columnIndex;
    }

    @Override
    public void setLong(PreparedStatement target, long value) throws Exception {
        setter.setLong(target, value, columnIndex);
    }

    @Override
    public void set(PreparedStatement target, Long value) throws Exception {
        setter.set(target, value, columnIndex);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy