com.vodafone360.people.engine.contactsync
Class ContactSyncUtils

java.lang.Object
  extended by com.vodafone360.people.engine.contactsync.ContactSyncUtils

public class ContactSyncUtils
extends java.lang.Object


Constructor Summary
ContactSyncUtils()
           
 
Method Summary
static int findIdInOrderedList(int nativeContactId, java.util.List<NativeChangeLogTable.ContactChangeInfo> list)
          Utility function to search the given ContactChangeInfo list for an item with the specified Native Contact ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContactSyncUtils

public ContactSyncUtils()
Method Detail

findIdInOrderedList

public static int findIdInOrderedList(int nativeContactId,
                                      java.util.List<NativeChangeLogTable.ContactChangeInfo> list)
Utility function to search the given ContactChangeInfo list for an item with the specified Native Contact ID. This is an optimised binary search which assumes that the list is already sorted by Native contact ID in the Database query.

Parameters:
nativeContactId - Native contact ID to search for in given list.
list - List of deleted contacts taken from the NativeChangeLog table.
Returns:
Index of the change in the list, if the nativeContactId is found, -1 if not.


JavaDoc