com.clickntap.autoarchive.RowMover Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of click_framework Show documentation
Show all versions of click_framework Show documentation
Java Framework based on Spring Framework, Freemarker and Simplicity
package com.clickntap.autoarchive;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.PreparedStatementSetter;
import org.springframework.jdbc.core.RowMapper;
public class RowMover implements RowMapper {
private JdbcTemplate jdbc;
private String table;
private boolean archive;
public RowMover(JdbcTemplate jdbc, String table, boolean archive) {
this.jdbc = jdbc;
this.table = table;
this.archive = archive;
}
public Object mapRow(ResultSet rs, int row) throws SQLException {
String tablePre = "";
if (archive) {
tablePre = "autoarchive_";
}
Number id = null;
final List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy