com.ontimize.util.gis.server.interfaces
Interface IDataAccess

All Superinterfaces:
IDataProvider
All Known Implementing Classes:
BasicOntimizeDataProvider, GeoImageDataProvider, OntimizePointProvider, ShapefileDataProvider

public interface IDataAccess
extends IDataProvider

Interface used for read-write operations on gis data providers.

The classes implementing this interface must have a constructor like
public DataProviderClass(Hashtable parameters)
where the parameters in the hashtable are passed by the Attribute
elements on the data provider xml definition.

Sample code:

<DataProvider
    class="com.test.server.SampleDataProvider"
    type="vectorial">
    <Attribute name="geoField" value="the_geom" />
    <Attribute name="parentKey" value="lineid" />
    <Attribute name="geometryType" value="line" />
</DataProvider>
in this situation the constructor will get a hashtable parameter with the data
{geoField=the_geom; parentKey=lineid; geometryType=line} 


Method Summary
 void delete(java.lang.Object keysValues, int sessionId)
          This method must implement a standard delete operation over the set of records defined by keysValues.
 java.lang.Object insert(java.lang.Object attributesValues, int sessionId)
          This method must implement a standard insert operation with the data contained in attributesValues parameter.
 void update(java.lang.Object keysValues, java.lang.Object attributesValues, int sessionId)
          This method must implement a standard update operation with the data specified in attributesValues over the set of records defined by keysValues.
 
Methods inherited from interface com.ontimize.util.gis.server.interfaces.IDataProvider
initProvider, query
 

Method Detail

insert

java.lang.Object insert(java.lang.Object attributesValues,
                        int sessionId)
                        throws java.lang.Exception
This method must implement a standard insert operation with the data contained in attributesValues parameter.

Parameters:
attributesValues - Data to store
sessionId - Session Id for this user
Throws:
java.lang.Exception

delete

void delete(java.lang.Object keysValues,
            int sessionId)
            throws java.lang.Exception
This method must implement a standard delete operation over the set of records defined by keysValues. So, only the records that comply with the conditions specified by keysValues will be deleted.

Parameters:
keysValues - The conditions that the records to be deleted must fulfill
sessionId - Session Id for this user
Throws:
java.lang.Exception

update

void update(java.lang.Object keysValues,
            java.lang.Object attributesValues,
            int sessionId)
            throws java.lang.Exception
This method must implement a standard update operation with the data specified in attributesValues over the set of records defined by keysValues. So, only the records that comply with the conditions specified by keysValues will be updated to the new values specified by attributesValues.

Parameters:
keysValues - The conditions that the records to be updated must fulfill
attributesValues - The data for updating the records to
sessionId - Session Id for this user
Throws:
java.lang.Exception