public abstract class GeoSqlQueryer extends Object
GeoSqlRewriterFunction| 限定符和类型 | 类和说明 |
|---|---|
static class |
GeoSqlQueryer.ColumnDefinition
结果集列定义
|
| 构造器和说明 |
|---|
GeoSqlQueryer(String tableName,
HashMap<String,GeoSqlQueryer.ColumnDefinition> columnInfo,
org.json.JSONObject initParam)
若需要使用buildSimpleResultSetByColumns方法来构造一个SimpleResultSet对象作为返回,
需要通过此构造方法,显式地指定可能会查询到的字段及其类型
|
GeoSqlQueryer(String tableName,
org.json.JSONObject initParam)
若query方法的实现中不使用buildSimpleResultSetByColumns方法来构造一个SimpleResultSet对象作为返回,
则无需指定可能会查询到的字段及其类型,使用此构造方法即可
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected org.h2.tools.SimpleResultSet |
buildSimpleResultSetByColumns(String[] columns)
根据需要查询的列名,构造一个SimpleResultSet对象
|
protected String[] |
columnPart2columnArr(String columnPart)
将columnPart解析为数组
|
HashMap<String,GeoSqlQueryer.ColumnDefinition> |
getColumnInfo() |
String |
getTableName() |
protected com.vividsolutions.jts.geom.Geometry |
pg2Extent(String pg)
将输入的范围wkt转为Geometry对象
|
protected double[] |
pg2ExtentCoord(com.vividsolutions.jts.geom.Geometry geo)
将输入的范围wkt转为[xmin,ymin,xmax,ymax]
|
protected double[] |
pg2ExtentCoord(String pg)
将输入的范围wkt转为[xmin,ymin,xmax,ymax]
|
abstract ResultSet |
query(Connection conn,
String columnPart,
String fun,
String pg)
依据查询条件,返回查询结果
|
public GeoSqlQueryer(String tableName, HashMap<String,GeoSqlQueryer.ColumnDefinition> columnInfo, org.json.JSONObject initParam)
tableName - 表名columnInfo - 列信息map,key为列名,value为java.sql.Types中所定义的列类型initParam - 初始化时的需要的自定义参数public GeoSqlQueryer(String tableName, org.json.JSONObject initParam)
tableName - 表名initParam - 初始化时的需要的自定义参数public abstract ResultSet query(Connection conn, String columnPart, String fun, String pg) throws SQLException
conn - h2数据库连接columnPart - 实际查询的列片段,形如"fid","SHAPE" as "SHAPE"fun - TCODE带过来的查询函数pg - 查询范围多边形SQLException - h2内部执行错误时抛出protected String[] columnPart2columnArr(String columnPart)
columnPart - 实际查询的列片段,形如"fid","SHAPE" as "SHAPE"protected org.h2.tools.SimpleResultSet buildSimpleResultSetByColumns(String[] columns) throws SQLException
columns - 列名SQLException - 构造SimpleResultSet异常时抛出protected com.vividsolutions.jts.geom.Geometry pg2Extent(String pg)
pg - 将输入的范围wktprotected double[] pg2ExtentCoord(com.vividsolutions.jts.geom.Geometry geo)
pg - 将输入的范围wktprotected double[] pg2ExtentCoord(String pg)
pg - 将输入的范围wktpublic String getTableName()
public HashMap<String,GeoSqlQueryer.ColumnDefinition> getColumnInfo()
Copyright © 2017. All rights reserved.