org.openmobileis.synchro.algo.syncnumber.impl
Class HSQLSyncNumberQueryManager

java.lang.Object
  extended byorg.openmobileis.common.util.database.AbstractQueryManager
      extended byorg.openmobileis.synchro.algo.syncnumber.impl.HSQLSyncNumberQueryManager
All Implemented Interfaces:
SyncNumberQueryManager

public class HSQLSyncNumberQueryManager
extends AbstractQueryManager
implements SyncNumberQueryManager

Title: OpenMobileIS project source
Description: This class manages the synchronization number For each user, a number is associated with the synchronization to manage the incremental sync. Data mapping is made for InstantDB database

Since:
JDK 1.1
Version:
1.0.
Author:
Philippe Delrieu

Constructor Summary
HSQLSyncNumberQueryManager()
           
 
Method Summary
 void create(java.lang.String[] parameters)
          create() insert a new version number for a user ID.
 void createSyncTable()
          check if the sync table exists.
 void delete(java.lang.String[] parameters)
          delete() delete a synchronisation from the USERID
 java.sql.ResultSet getLastSyncNumber()
          getLastSyncNumber() get the last sync number
 java.sql.ResultSet getSyncNumberbysn(java.lang.String[] parameters)
          getLastSyncNumberbysn() get the sync number with specified ns
 java.sql.ResultSet getTimeStampForsn(java.lang.String[] parameters)
          getLastSyncNumberbysn() get the sync number with specified ns
 void update(java.lang.String[] parameters)
          update() update a synchronisation : Not used here (same as create)
 
Methods inherited from class org.openmobileis.common.util.database.AbstractQueryManager
buildDynamicQuery, buildQuery, close, executeBlobUpdate, executeDynamicQuery, executeDynamicUpdate, executeQuery, executeUpdate, getDbManager, makeSQLList, registerManagerDB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HSQLSyncNumberQueryManager

public HSQLSyncNumberQueryManager()
Method Detail

create

public void create(java.lang.String[] parameters)
            throws DatabaseException
create() insert a new version number for a user ID. Create the user Id if it does not exist.

Specified by:
create in interface SyncNumberQueryManager
Returns:
None
Throws:
None
DatabaseException

createSyncTable

public void createSyncTable()
                     throws DatabaseException,
                            java.sql.SQLException
Description copied from interface: SyncNumberQueryManager
check if the sync table exists. IF it does not exist, create it

Specified by:
createSyncTable in interface SyncNumberQueryManager
Throws:
DatabaseException
java.sql.SQLException

delete

public void delete(java.lang.String[] parameters)
            throws DatabaseException
delete() delete a synchronisation from the USERID

Specified by:
delete in interface SyncNumberQueryManager
Returns:
None
Throws:
None
DatabaseException

update

public void update(java.lang.String[] parameters)
            throws DatabaseException
update() update a synchronisation : Not used here (same as create)

Specified by:
update in interface SyncNumberQueryManager
Returns:
None
Throws:
None
DatabaseException

getTimeStampForsn

public java.sql.ResultSet getTimeStampForsn(java.lang.String[] parameters)
                                     throws DatabaseException
getLastSyncNumberbysn() get the sync number with specified ns

Returns:
ResultSet : A unique row containing the sunc num (int)
Throws:
None
DatabaseException

getLastSyncNumber

public java.sql.ResultSet getLastSyncNumber()
                                     throws DatabaseException
getLastSyncNumber() get the last sync number

Specified by:
getLastSyncNumber in interface SyncNumberQueryManager
Returns:
ResultSet : A unique row containing the sunc num (int)
Throws:
None
DatabaseException

getSyncNumberbysn

public java.sql.ResultSet getSyncNumberbysn(java.lang.String[] parameters)
                                     throws DatabaseException
getLastSyncNumberbysn() get the sync number with specified ns

Specified by:
getSyncNumberbysn in interface SyncNumberQueryManager
Returns:
ResultSet : A unique row containing the sunc num (int)
Throws:
None
DatabaseException


Copyright 2006 OpenMobileIS. All Rights Reserved.