org.openmobileis.synchro.algo.replication
Interface SynchroConflicResolver

All Known Implementing Classes:
AlwaysUpdateClientSynchroConflicResolver, AlwaysUpdateServerSynchroConflicResolver

public interface SynchroConflicResolver

Title: OpenMobileIS project source
Description: Base interface to implements to handle synchro conflicts. Interface implementation are use as a service, so instance member must be declared. If data has to be share betwin different method call use the SessionContext.

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

Field Summary
static int CREATE_NEW_OBJECT
           
static int DO_NOTHING
           
static int RETURN_ERROR_CONFLIC
           
static int UPDATE_PDA
           
static int UPDATE_SERVER
           
 
Method Summary
 ReplicationSAOEvent resolveAddandPresent(SynchroAtomicObject clientao)
          resolve the synchro conflic when an add command is send by the pda when the same object is already in database.
 ReplicationSAOEvent resolveDeleteandModified(SynchroAtomicObject ao)
          resolve the synchro conflic when a delete command is send by the pda when the same object has been modified in database.
 ReplicationSAOEvent resolveReplaceandDeleted(SynchroAtomicObject ao)
          resolve the synchro conflic when a replace command is send by the pda when the same object has been deleted in database.
 ReplicationSAOEvent resolveReplaceandModified(SynchroAtomicObject ao)
          resolve the synchro conflic when a replace command is send by the pda when the same object has been modified in database.
 

Field Detail

RETURN_ERROR_CONFLIC

public static final int RETURN_ERROR_CONFLIC
See Also:
Constant Field Values

UPDATE_SERVER

public static final int UPDATE_SERVER
See Also:
Constant Field Values

UPDATE_PDA

public static final int UPDATE_PDA
See Also:
Constant Field Values

CREATE_NEW_OBJECT

public static final int CREATE_NEW_OBJECT
See Also:
Constant Field Values

DO_NOTHING

public static final int DO_NOTHING
See Also:
Constant Field Values
Method Detail

resolveAddandPresent

public ReplicationSAOEvent resolveAddandPresent(SynchroAtomicObject clientao)
resolve the synchro conflic when an add command is send by the pda when the same object is already in database.

Returns:
the ReplicationSAOEvent that correspond to the action to be done.

resolveReplaceandModified

public ReplicationSAOEvent resolveReplaceandModified(SynchroAtomicObject ao)
resolve the synchro conflic when a replace command is send by the pda when the same object has been modified in database.

Returns:
the ReplicationSAOEvent that correspond to the action to be done.

resolveReplaceandDeleted

public ReplicationSAOEvent resolveReplaceandDeleted(SynchroAtomicObject ao)
resolve the synchro conflic when a replace command is send by the pda when the same object has been deleted in database.

Returns:
the ReplicationSAOEvent that correspond to the action to be done.

resolveDeleteandModified

public ReplicationSAOEvent resolveDeleteandModified(SynchroAtomicObject ao)
resolve the synchro conflic when a delete command is send by the pda when the same object has been modified in database.

Returns:
the ReplicationSAOEvent that correspond to the action to be done.


Copyright 2006 OpenMobileIS. All Rights Reserved.