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

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

package org.simpleflatmapper.jdbc.impl.setter;

import org.simpleflatmapper.converter.Context;
import org.simpleflatmapper.map.setter.ContextualSetter;
import org.simpleflatmapper.map.setter.LongContextualSetter;

import java.sql.PreparedStatement;

public class LongPreparedStatementSetter implements ContextualSetter, LongContextualSetter {

    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, Context context) throws Exception {
        setter.setLong(target, value, columnIndex, context);
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy