| | |
| | | import java.sql.SQLException; |
| | | import java.sql.Statement; |
| | | import java.sql.Types; |
| | | import java.sql.Connection; |
| | | import java.util.Date; |
| | | |
| | | import org.apache.commons.collections.OrderedMap; |
| | |
| | | final static Log logger = LogFactory.getLog(OracleConvertDgn2ShpJob.class); |
| | | |
| | | private static final int FETCHSIZE = 30; |
| | | private static final int BATCHSIZE = 25; |
| | | private static final int COMMITSIZE = 20; |
| | | |
| | | class Pair |
| | |
| | | { |
| | | logger.info("-- step:clearOutputDirectory --"); |
| | | clearOutputDirectory(); |
| | | boolean bFirst = true; |
| | | boolean bFirst = isCopyConnectivityMode(); |
| | | if (checkConvertDB()) |
| | | { |
| | | logger.info("-- step:convertOracleDB --"); |
| | |
| | | jobContext.setExecutionContext(context); |
| | | |
| | | if (bFirst) |
| | | { |
| | | copyConnectivity(jobContext); |
| | | else |
| | | bFirst = false; |
| | | } |
| | | |
| | | logger.info("----- start schema:" + orgSchema + " -----"); |
| | | exetcuteConvert(jobContext, orgSchema, _dataPath); |
| | |
| | | */ |
| | | private void copyConnectivity(OracleConvertShapefilesJobContext jobContext) throws SQLException |
| | | { |
| | | OracleConnection connection = jobContext.getOracleConnection(); |
| | | Connection connection = jobContext.getOracleConnection(); |
| | | Statement stmt = connection.createStatement(); |
| | | stmt.execute(OracleConvertShapefilesJobContext.TRUNCATE_CONNECTIVITY_WEBCHECK); |
| | | stmt.execute(OracleConvertShapefilesJobContext.COPY_CONNECTIVITY_TO_WEBCHECK); |
| | |
| | | System.gc(); |
| | | } |
| | | |
| | | protected OrderedMap getBlobStorageList(OracleConnection connection, String schemaSrc, String tableSrc, |
| | | protected OrderedMap getBlobStorageList(Connection connection, String schemaSrc, String tableSrc, |
| | | OrderedMap orderedMap) throws SQLException |
| | | { |
| | | if (orderedMap == null) |
| | |
| | | protected void queryIgsetElement(OracleConvertShapefilesJobContext jobContext, |
| | | String srcschema, String srctable) throws SQLException |
| | | { |
| | | OracleConnection connection = jobContext.getOracleConnection(); |
| | | Connection connection = jobContext.getOracleConnection(); |
| | | String fetchSrcStmtFmt = "SELECT IGDSELM FROM \"%s\".\"%s\" ORDER BY ROWID"; |
| | | PrintfFormat spf = new PrintfFormat(fetchSrcStmtFmt); |
| | | String fetchSrcStmt = spf.sprintf(new Object[]{srcschema, srctable}); |
| | |
| | | protected void queryRawElement(OracleConvertShapefilesJobContext jobContext, |
| | | String srcschema, String srctable) throws SQLException |
| | | { |
| | | OracleConnection connection = jobContext.getOracleConnection(); |
| | | Connection connection = jobContext.getOracleConnection(); |
| | | String fetchDestStmtFmt = "SELECT ELEMENT FROM \"%s\".\"%s\" ORDER BY ROWID"; |
| | | PrintfFormat spf = new PrintfFormat(fetchDestStmtFmt); |
| | | String fetchDestStmt = spf.sprintf(new Object[]{srcschema, srctable}); |