org.jgrasstools.dbs.spatialite.jgt.JGTPreparedStatement Maven / Gradle / Ivy
The newest version!
/*
* This file is part of JGrasstools (http://www.jgrasstools.org)
* (C) HydroloGIS - www.hydrologis.com
*
* JGrasstools is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package org.jgrasstools.dbs.spatialite.jgt;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import org.jgrasstools.dbs.compat.IJGTPreparedStatement;
/**
* Prepared Statement wrapper for standard jdbc java.
*
* @author Andrea Antonello (www.hydrologis.com)
*
*/
public class JGTPreparedStatement implements IJGTPreparedStatement {
private PreparedStatement preparedStatement;
public JGTPreparedStatement( PreparedStatement preparedStatement ) {
this.preparedStatement = preparedStatement;
}
@Override
public void close() throws Exception {
preparedStatement.close();
}
@Override
public void setString( int index, String text ) throws Exception {
preparedStatement.setString(index, text);
}
@Override
public void executeUpdate() throws Exception {
preparedStatement.executeUpdate();
}
@Override
public void setDouble( int index, double value ) throws Exception {
preparedStatement.setDouble(index, value);
}
@Override
public void setFloat( int index, float value ) throws Exception {
preparedStatement.setFloat(index, value);
}
@Override
public void setInt( int index, int value ) throws Exception {
preparedStatement.setInt(index, value);
}
@Override
public void addBatch() throws Exception {
preparedStatement.addBatch();
}
@Override
public int[] executeBatch() throws Exception {
return preparedStatement.executeBatch();
}
@Override
public void setLong( int index, long value ) throws Exception {
preparedStatement.setLong(index, value);
}
@Override
public void setBytes( int index, byte[] value ) throws Exception {
preparedStatement.setBytes(index, value);
}
@Override
public void setShort( int index, short value ) throws Exception {
preparedStatement.setShort(index, value);
}
@Override
public void setBoolean( int index, boolean value ) throws Exception {
preparedStatement.setBoolean(index, value);
}
@Override
public ResultSet getGeneratedKeys() throws Exception {
return preparedStatement.getGeneratedKeys();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy