The ESRI ArcSDE business object mappings

There is only one business object that the adapter for ESRI Spatial Database uses for translation. The adapter for ESRI Spatial Database provides application-specific business objects to create spatial queries and retrieve data values. Because the ESRI ArcSDE application wraps a spatial database, there are numerous business object formats possible. This object reflects the types of queries that would be made on a spatial database. The ESRI business objects represent a Result from a spatial query, allowing direct access to the functionality of the ESRI ArcSDE application. The verbs supported by this business object are as follows:

Table 4. The ESRI ArcSDE business object verb mappings

Verb (WBI) Operation (ESRI ArcSDE)
Retrieve Select
Create Insert
Update Update
Delete Delete

To use the adapter for ESRI Spatial Database, it is important to understand the functions each field represents. Because the database can represent any type of information, the adapter provides a functional interface to get data in and out of the database. Much like a Web service, the business object exposes the functional interface of the ESRI ArcSDE 8.2 Java API.

In Table 5, the table elements of the ESRISpatialQuery are provided. Associated with each tag is the corresponding ArcSDE 8.2 Java API function called. For example, by filling in the tableName field of the business object, the query calls SeLayer.setTable() of the ESRI ArcSDE API. This tells ArcSDE which table to perform the query. Additional comments are also associated with each tag to explain what the tag is used for. Refer to the ESRI ArcSDE Java API specification to understand how each API call works. Following Table 5, the section Business object examples presents several examples showing how to use the business object.

Table 5 shows the business object mapping and associated verbs.

Table 5. The ESRI ArcSDE business object verb mappings

ESRISpatialQuery





ArcSDE 8.2 JDK Comments
verb





SeInsert(Create), SeUpdate(Update), SeDelete(Delete), SeQuery(Retrieve) Determines the type of query to execute
query








tableName




SeLayer.setTableName() Single table name to query upon

values





Multiple values to insert, update, or retrieve


columnName



used for Column[] Name of table column


value




only 1 value can be specified



integer


row.setInteger(); integer type is supported



short


row.setShort(); short type are supported



float


row.setFloat(); float type is supported



double


row.setDouble(); double type is supported



string


row.setString(); string type is supported



date


row.setDate(); date type is supported (insert format w yyyy-MM-dd-hh.mm.ss.SSSS)



spatial


row.setShape(); shape type is supported




type

SeShape.generateRectangle(), SeShape.generateLine(); SeShape.generatePoint(), SeShape.Polygon() Only RECTANGLE, LINE, POINT, and POLYGON Supported




shape


only 1 value can be specified





partOffset

int array - See ESRI documentation






offSet offset array for shape





pointArray

point array to create a valid shape - See ESRI documentation






x x coordinate for point






y y coordinate for point

constraints





used to construct the SQL WHERE clause (only AND supported)


columnName



used for WHERE column name to check


comparison



logical evaluators for WHERE, or Spatial Filters if shape specified eq (=), ne(!=), lt(<), gt(>), lte(<=), METHOD_AI, METHOD_AI_NO_ET, METHOD_AI_OR_ET, METHOD_CBM, METHOD_COMMON, METHOD_CP, METHOD_CP_OR_LCROSS, METHOD_ENVP, METHOD_ENVP_BY_GRID, METHOD_ET_OR_AI, METHOD_ET_OR_II, METHOD_IDENTICAL, METHOD_II, METHOD_II_NO_ET, METHOD_II_OR_ET, METHOD_LCROSS, METHOD_LCROSS_OR_CP, METHOD_PC, METHOD_PC_NO_ET, METHOD_PIP, METHOD_SC, METHOD_SC_NO_ET (See ESRI documentation on SeFilters)


value




only 1 value can be specified



integer


WHERE columnName = integer



short


WHERE columnName = short



float


WHERE columnName = float



double


WHERE columnName = double



string


WHERE columnName = string



date


WHERE columnName = date



spatial


WHERE columnName = SeShape




type

SeShape.generateRectangle(), SeShape.generateLine(); SeShape.generatePoint(), SeShape.Polygon() Only RECTANGLE, LINE, POINT, and POLYGON Supported




shape


only 1 value can be specified





partOffset

int array - See ESRI documentation






offSet offset array for shape





pointArray

point array to create a valid shape - See ESRI documentation






x x coordinate for point






y y coordinate for point
results






Results of Select (Retrieve) query

row





An entire row of data

column





An individual column of the result


columnName



SeColumnDefinition.getName() column name for the value


value




only 1 value can be specified



integer


row.getInteger(); Integer value of column



short


row.getShort(); Short value of column



float


row.getFloat(); Float value of column



double


row.getDouble(); Double value of column



string


row.getString(); String value of column



date


row.getDate(); Date value of column



spatial


row.getShape(); Shape value of column




type

SeShape.getType() Only RECTANGLE, LINE, POINT, and POLYGON Supported




shape


only 1 value can be specified





partOffset
N/A int array - See ESRI documentation






offSet






pointArray
SeShape.getAllCoords() point array to create a valid shape - See ESRI documentation






x double[0][0]






y double[0][1]

Business object examples

This section presents several examples of using the business objects.

INSERT

The following business object is equivalent to INSERT INTO sde(INT_COL) VALUE (6).

verb: CREATE
 query
        tableName       SDE
        values
                columnName      INT_COL
                value
                        integer         6
  
 

UPDATE

The following business object is equivalent to UPDATE sde SET INT_COL = 5 WHERE INT_COL = 6

verb: UPDATE
 query
        tableName       SDE
        values
                columnName      INT_COL
                value
                        integer         5
        constraints
                columnName      INT_COL
                comparison      =
                value
                        integer         6
 

DELETE

The following business object is equivalent to DELETE FROM sde WHERE INT_COL = 6.

verb: DELETE
 query
        tableName       SDE
        constraints
                columnName      INT_COL
                comparison      =
                value
                        integer         6
 

SELECT

The following business object is equivalent to SELECT INT_COL, DOUBLE_COL FROM sde WHERE INT_COL = 6.

verb: RETRIEVE
 query
        tableName       SDE
        values
                columnName      INT_COL
                columnName      DOUBLE_CoL
        constraints
                columnName      INT_COL
                comparison      =
                value
                        integer         6
 

Copyright IBM Corp. 1997, 2003