org.openmobileis.synchro.algo.replication
Interface SynchroAtomicObject

All Superinterfaces:
OpenMISSerializable, java.io.Serializable
All Known Implementing Classes:
DefaultSynchroAtomicObject

public interface SynchroAtomicObject
extends OpenMISSerializable

Title: OpenMobileIS project source
Description: Base interface to identify Atomic Object. All object managed by the synchronisation procesus are Atomic Object. To be synchronised Object must implements this interface..

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

Field Summary
static short ADD
           
static short DELETE
           
static short REPLACE
           
static long serialVersionUID
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getCheckSum()
          return the checksum of the atomic Object.
 long getCreationDate()
          return the atomic Object creation date.
 short getModificationType()
          return the last modification type (ADD, REPLACE, DELETE).
 long getModifSyncNumber()
          return the sync number of the last modification.
 java.lang.String getUID()
          return the Atomic Object UID.
 int hashCode()
           
 void setCheckSum(java.lang.String sum)
          set the checksum of the atomic Object.
 void setModificationType(short type)
          Update the sync number with last synchro number.
 void setModifSyncNumber(long ts)
          set the synchro number of the last modification.
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

ADD

public static final short ADD
See Also:
Constant Field Values

REPLACE

public static final short REPLACE
See Also:
Constant Field Values

DELETE

public static final short DELETE
See Also:
Constant Field Values
Method Detail

getUID

public java.lang.String getUID()
return the Atomic Object UID. All synchronizeb object must have an unique UID.


getCheckSum

public java.lang.String getCheckSum()
return the checksum of the atomic Object. If checksum has changed, the object is synchronized.


setCheckSum

public void setCheckSum(java.lang.String sum)
set the checksum of the atomic Object. If checksum has changed, the object is synchronized.


getCreationDate

public long getCreationDate()
return the atomic Object creation date.


getModifSyncNumber

public long getModifSyncNumber()
return the sync number of the last modification. sync number can be anything that identifie the modification to manage synchronization. It can be a timestamp or any incremental number.


setModifSyncNumber

public void setModifSyncNumber(long ts)
set the synchro number of the last modification. sync number can be anything that identifie the modification to manage synchronization. It can be a timestamp or any incremental number.


getModificationType

public short getModificationType()
return the last modification type (ADD, REPLACE, DELETE).


setModificationType

public void setModificationType(short type)
                         throws DatabaseException
Update the sync number with last synchro number. Update modification type. set the modification type (ADD, REPLACE, DELETE).

Throws:
DatabaseException

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()


Copyright 2006 OpenMobileIS. All Rights Reserved.