Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Mapping SDO_GEOMETRY to Java Object
Hi,
I am having difficulties integrating Oracle Spatial with JDBC. I want
to map the SDO_GEOMETRY object to a Java Object.
Here's the object I want to map it to ...
public class SDO_GEOMETRY_OBJECT implements SQLData {
private String sql_type;
public BigDecimal gType;
public BigDecimal SRID;
public SDO_POINT_TYPE_OBJECT SDO_POINT_TYPE;
public java.sql.Array SDO_ELEM_INFO;
public java.sql.Array SDO_ORDINATE_ARRAY;
// the rest of the class
}
And here's the code to read it from the database
public void readSQL(SQLInput stream, String typeName)
throws SQLException {
sql_type = typeName;
gType = stream.readBigDecimal();
SRID = stream.readBigDecimal();
SDO_POINT_TYPE = (SDO_POINT_TYPE_OBJECT) stream.readObject(); SDO_ELEM_INFO = stream.readArray(); SDO_ORDINATE_ARRAY = stream.readArray();
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Mar 14 2000 - 08:08:11 CST
![]() |
![]() |