@Override public PreparedFilterToSQL createPreparedFilterToSQL() { OracleFilterToSQL sql = new OracleFilterToSQL(this); sql.setLooseBBOXEnabled(looseBBOXEnabled); return sql; }
public GeomClasses() { super(); put(Point.class, "POINT"); put(LineString.class, "LINE"); put(LinearRing.class, "LINE"); put(Polygon.class, "POLYGON"); put(GeometryCollection.class, "COLLECTION"); put(MultiPoint.class, "MULTIPOINT"); put(MultiLineString.class, "MULTILINE"); put(MultiPolygon.class, "MULTIPOLYGON"); } }
public Geometry decodeGeometryValue( GeometryDescriptor descriptor, ResultSet rs, int column, GeometryFactory factory, Connection cx, Hints hints) throws IOException, SQLException { // read the geometry Geometry geom = readGeometry(rs, column, factory, cx); return convertGeometry(geom, descriptor, factory); };
Geometry readGeometry(Object struct, GeometryFactory factory, Connection cx) throws IOException, SQLException { if (struct == null) { return null; } // unwrap the connection and create a converter OracleConnection ocx = unwrapConnection(cx); GeometryConverter converter = factory != null ? new GeometryConverter(ocx, factory) : new GeometryConverter(ocx); return converter.asGeometry((STRUCT) struct); }
@Override public Integer getGeometrySRID( String schemaName, String tableName, String columnName, Connection cx) throws SQLException { Integer srid = lookupSRIDOnMetadataTable(schemaName, tableName, columnName, cx); if (srid == null) { srid = lookupSRIDFromUserViews(tableName, columnName, cx); } if (srid == null) { srid = lookupSRIDFromAllViews(schemaName, tableName, columnName, cx); } return srid; }
public OracleNGJNDIDataStoreFactory() { super(new OracleNGDataStoreFactory()); }
@Override public int getGeometryDimension( String schemaName, String tableName, String columnName, Connection cx) throws SQLException { Integer srid = lookupDimensionOnMetadataTable(schemaName, tableName, columnName, cx); if (srid == null) { srid = lookupDimensionFromUserViews(tableName, columnName, cx); } if (srid == null) { srid = lookupDimensionFromAllViews(schemaName, tableName, columnName, cx); } if (srid == null) { srid = 2; } return srid; }
static final class GeomClasses extends HashMap<Class, String> { private static final long serialVersionUID = -3359664692996608331L; public GeomClasses() { super(); put(Point.class, "POINT"); put(LineString.class, "LINE"); put(LinearRing.class, "LINE"); put(Polygon.class, "POLYGON"); put(GeometryCollection.class, "COLLECTION"); put(MultiPoint.class, "MULTIPOINT"); put(MultiLineString.class, "MULTILINE"); put(MultiPolygon.class, "MULTIPOLYGON"); } }
@Override public Object visit(PropertyIsEqualTo filter, Object extraData) { FilterFunction_sdonn sdoNnQuery = getSDO_NN_Query(filter); if (sdoNnQuery != null) { return visit(sdoNnQuery, extraData); } else { return super.visit(filter, extraData); } }
@Override Geometry readGeometry(ResultSet rs, int column, GeometryFactory factory, Connection cx) throws IOException, SQLException { return readGeometry(rs.getBytes(column), factory, cx); }
@Override Geometry readGeometry(ResultSet rs, int column, GeometryFactory factory, Connection cx) throws IOException, SQLException { return readGeometry(rs.getObject(column), factory, cx); }
Geometry readGeometry(ResultSet rs, int column, GeometryFactory factory, Connection cx) throws IOException, SQLException { return readGeometry(rs.getObject(column), factory, cx); }
@Override protected SQLDialect createSQLDialect(JDBCDataStore dataStore) { return new OracleDialect(dataStore); }
@Override protected Object visitBinarySpatialOperator( BinarySpatialOperator filter, PropertyName property, Literal geometry, boolean swapped, Object extraData) { return visitBinarySpatialOperator( filter, (Expression) property, (Expression) geometry, swapped, extraData); }
public OracleFilterToSQL(PreparedStatementSQLDialect dialect) { super(dialect); setSqlNameEscape("\""); }
@Override public void encodeTableAlias(String raw, StringBuffer sql) { sql.append(" "); encodeTableName(raw, sql); }
@Override public void encodeGeometryEnvelope(String tableName, String geometryColumn, StringBuffer sql) { sql.append("SDO_AGGR_MBR("); encodeColumnName(null, geometryColumn, sql); sql.append(")"); }
@Override Geometry readGeometry(ResultSet rs, String column, GeometryFactory factory, Connection cx) throws IOException, SQLException { return readGeometry(rs.getBytes(column), factory, cx); }
@Override Geometry readGeometry(ResultSet rs, String column, GeometryFactory factory, Connection cx) throws IOException, SQLException { return readGeometry(rs.getObject(column), factory, cx); }
Geometry readGeometry(ResultSet rs, String column, GeometryFactory factory, Connection cx) throws IOException, SQLException { return readGeometry(rs.getObject(column), factory, cx); }