ewe.database
Class DoubleSynchronizer

java.lang.Object
  extended byewe.database.Synchronizer
      extended byewe.database.DoubleSynchronizer

public class DoubleSynchronizer
extends Synchronizer

This Synchronizes two Databases where you have full local access to both.


Field Summary
protected  Database remote
           
 
Fields inherited from class ewe.database.Synchronizer
ALWAYS, CANCELLED, dontSynchronizeDeletedItems, dontSyncJustDebug, lastConflictCommand, LOCAL_TO_REMOTE, REMOTE_TO_LOCAL, remoteToLocalOnly, RESOLVE_LATER, syncTime
 
Constructor Summary
DoubleSynchronizer(Database local, Database remote)
           
 
Method Summary
 int countRemoteDeletedEntries()
           
 int countRemoteUnsynchronizedEntries()
           
 void eraseDeletedOnRemote(int index)
           
 void eraseEntryOnRemote(long OID)
           
 long getRemoteDeletedEntry(int index)
           
 byte[] getRemoteUnsynchronizedEntry(int index)
           
 void markRemoteAsSynchronized(int index)
           
 void sendEntryToRemote(DatabaseEntry de)
           
 
Methods inherited from class ewe.database.Synchronizer
addOrReplace, checkSort, close, erase, eraseDeleted, findByOID, getByOID, getByOID, getDisplayString, getMatchingEntry, getOID, getResolveString, getUnsynchronized, getUnsynchronized, isSynchronized, markAsSynchronized, markAsSynchronized, resolveConflict, synchronize, synchronize, synchronize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Field Detail

remote

protected Database remote
Constructor Detail

DoubleSynchronizer

public DoubleSynchronizer(Database local,
                          Database remote)
Method Detail

countRemoteUnsynchronizedEntries

public int countRemoteUnsynchronizedEntries()
                                     throws IOException
Overrides:
countRemoteUnsynchronizedEntries in class Synchronizer
Throws:
IOException

getRemoteUnsynchronizedEntry

public byte[] getRemoteUnsynchronizedEntry(int index)
                                    throws IOException
Overrides:
getRemoteUnsynchronizedEntry in class Synchronizer
Throws:
IOException

markRemoteAsSynchronized

public void markRemoteAsSynchronized(int index)
                              throws IOException
Overrides:
markRemoteAsSynchronized in class Synchronizer
Throws:
IOException

countRemoteDeletedEntries

public int countRemoteDeletedEntries()
                              throws IOException
Overrides:
countRemoteDeletedEntries in class Synchronizer
Throws:
IOException

getRemoteDeletedEntry

public long getRemoteDeletedEntry(int index)
                           throws IOException
Overrides:
getRemoteDeletedEntry in class Synchronizer
Throws:
IOException

eraseDeletedOnRemote

public void eraseDeletedOnRemote(int index)
                          throws IOException
Overrides:
eraseDeletedOnRemote in class Synchronizer
Throws:
IOException

eraseEntryOnRemote

public void eraseEntryOnRemote(long OID)
                        throws IOException
Overrides:
eraseEntryOnRemote in class Synchronizer
Throws:
IOException

sendEntryToRemote

public void sendEntryToRemote(DatabaseEntry de)
                       throws IOException
Overrides:
sendEntryToRemote in class Synchronizer
Throws:
IOException