corny.addressbook.JNIHandler
Class AddressBookNotification.MutableAddressBookNotification

java.lang.Object
  extended by corny.addressbook.JNIHandler.AddressBookNotification
      extended by corny.addressbook.JNIHandler.AddressBookNotification.MutableAddressBookNotification
Enclosing class:
AddressBookNotification

public static class AddressBookNotification.MutableAddressBookNotification
extends AddressBookNotification

Mutable subclass of the AddressBookNotification class. Contains methods to add data to the Notification, to clear the Notification and to merge the Notification with the data of another Notification.

Author:
Corny

Nested Class Summary
 
Nested classes/interfaces inherited from class corny.addressbook.JNIHandler.AddressBookNotification
AddressBookNotification.MutableAddressBookNotification
 
Constructor Summary
AddressBookNotification.MutableAddressBookNotification()
          Creates a new, empty MutableAddressBookNotification.
AddressBookNotification.MutableAddressBookNotification(java.lang.String inserted, java.lang.String updated, java.lang.String deleted)
          Creates a new MutableAddressBookNotification.
 
Method Summary
 void addData(java.util.Collection<java.lang.String> inserted, java.util.Collection<java.lang.String> updated, java.util.Collection<java.lang.String> deleted)
          Adds the given change information to this Notification.
 void addData(java.lang.String inserted, java.lang.String updated, java.lang.String deleted)
          Adds the given change information to this Notification.
 void addDataFrom(AddressBookNotification additionalNotification)
          Merges this Notification with the data of a newer Notification.
 void clear()
          Clears this Notification
 AddressBookNotification getImmutableNotification()
           
 
Methods inherited from class corny.addressbook.JNIHandler.AddressBookNotification
getDeletedRecords, getInsertedRecords, getUpdatedRecords, hasChangedGroups, hasChanges, hasDeletedRecords, hasInsertedRecords, hasUpdatedRecords
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddressBookNotification.MutableAddressBookNotification

public AddressBookNotification.MutableAddressBookNotification()
Creates a new, empty MutableAddressBookNotification.


AddressBookNotification.MutableAddressBookNotification

public AddressBookNotification.MutableAddressBookNotification(java.lang.String inserted,
                                                              java.lang.String updated,
                                                              java.lang.String deleted)
Creates a new MutableAddressBookNotification.

Parameters:
inserted - UID of an inserted Record or null if none was inserted
updated - UID of an updated Record or null if none was updated
deleted - UID of a deleted Record or null if none was deleted
Method Detail

addDataFrom

public void addDataFrom(AddressBookNotification additionalNotification)
Merges this Notification with the data of a newer Notification.

Parameters:
additionalNotification - Newer Notification

clear

public void clear()
Clears this Notification


addData

public void addData(java.lang.String inserted,
                    java.lang.String updated,
                    java.lang.String deleted)
Adds the given change information to this Notification.

Parameters:
inserted - UID of an inserted Record or null if none was inserted
updated - UID of an updated Record or null if none was updated
deleted - UID of a deleted Record or null if none was deleted

addData

public void addData(java.util.Collection<java.lang.String> inserted,
                    java.util.Collection<java.lang.String> updated,
                    java.util.Collection<java.lang.String> deleted)
Adds the given change information to this Notification.

Parameters:
inserted - Collection of UIDs of a inserted Records or null if none was inserted
updated - Collection of UIDs of a updaedt Records or null if none was updated
deleted - Collection of UIDs of a deleted Records or null if none was deleted

getImmutableNotification

public AddressBookNotification getImmutableNotification()
Returns:
Immutable clone of this Notification