package com.vci.server.bof.utils;
|
|
import java.sql.Connection;
|
import java.sql.PreparedStatement;
|
import java.sql.SQLException;
|
|
public class TempTableUtil {
|
|
public TempTableUtil() {
|
|
}
|
|
public static void insertTempOIDs(Connection connection, String[] oids) {
|
|
if (oids == null)
|
return;
|
|
try {
|
|
connection.createStatement().execute("truncate table PL_TEMPOID");
|
|
PreparedStatement p = connection.prepareStatement("insert into PL_TEMPOID (OID) values (?)");
|
for(String oid : oids) {
|
p.setString(1, oid);
|
p.addBatch();
|
}
|
p.executeBatch();
|
|
} catch (SQLException e) {
|
e.printStackTrace();
|
}
|
}
|
|
}
|