org.formaria.data.sql
Interface ReplicationEngine


public interface ReplicationEngine

Implementator of this interface are used by the DataConnection class to perform database synchronization.


Method Summary
 long getNextId(java.lang.String tableName)
          Get the next ID for the named table, assuming one of the table's fields is a managed field.
 long getNextPseudoId(java.lang.String tableName)
          Get the next PSUEDOID for the names table
 java.sql.ResultSet synchronizeTable(java.lang.String tableName, int updateStrategy)
          Synchronizes the specified local database table.
 

Method Detail

synchronizeTable

java.sql.ResultSet synchronizeTable(java.lang.String tableName,
                                    int updateStrategy)
Synchronizes the specified local database table.

Parameters:
tableName - the name of the table
connName - the connection name
updateStrategy - the strategory used to udpate the database.
Returns:
a result set for a non cachable query or if the data has been cached and the result set contains the subset of data matches the query. Null is returned if the the server returns the full dataset and the query needs to be run against the local copy.

getNextPseudoId

long getNextPseudoId(java.lang.String tableName)
Get the next PSUEDOID for the names table

Parameters:
tableName - the table name whose ID is to be inspected
Returns:
the next ID or a negative value if invalid

getNextId

long getNextId(java.lang.String tableName)
Get the next ID for the named table, assuming one of the table's fields is a managed field.

Parameters:
tableName - the table name whose ID is to be inspected
Returns:
the next ID or a negative value if invalid