es.cesar.quitesleep.syncData
Class SyncContactsRefresh

java.lang.Object
  extended by java.lang.Thread
      extended by es.cesar.quitesleep.syncData.SyncContactsRefresh
All Implemented Interfaces:
java.lang.Runnable

public class SyncContactsRefresh
extends java.lang.Thread

Author:
Cesar Valiente Gordo

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SyncContactsRefresh(Context context, SyncContactsDialog syncDialog)
          Constructor with all the three obligatory params for run the synchronization use for the first time running the application (empty db4o database contacts data) or for any other synchronization.
 
Method Summary
 boolean deleteAll()
          Delete all objects associated to Contacts, Mail, Phones, and Banned.
 int getInsertContact()
           
 SyncContactsDialog getSyncDialog()
           
 void run()
          Synchronize the SQLite data contacts, with at least one phone number, with the DB4O database.
 void setInsertContact(int insertContact)
           
 void setSyncDialog(SyncContactsDialog syncDialog)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SyncContactsRefresh

public SyncContactsRefresh(Context context,
                           SyncContactsDialog syncDialog)
Constructor with all the three obligatory params for run the synchronization use for the first time running the application (empty db4o database contacts data) or for any other synchronization.

Parameters:
context -
syncDialog -
Method Detail

getInsertContact

public int getInsertContact()

setInsertContact

public void setInsertContact(int insertContact)

getSyncDialog

public SyncContactsDialog getSyncDialog()

setSyncDialog

public void setSyncDialog(SyncContactsDialog syncDialog)

deleteAll

public boolean deleteAll()
Delete all objects associated to Contacts, Mail, Phones, and Banned.

Returns:

run

public void run()
Synchronize the SQLite data contacts, with at least one phone number, with the DB4O database.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
Parameters:
context -
See Also:
after run and finish this function for check how many contacts are synchronized.