Class ChangeTableEntry

java.lang.Object
org.bedework.calfacade.util.ChangeTableEntry

public class ChangeTableEntry extends Object
Entry class used by ChangeTable
Author:
Mike Douglass
  • Constructor Details

    • ChangeTableEntry

      public ChangeTableEntry(ChangeTable chg, org.bedework.util.calendar.PropertyIndex.PropertyInfoIndex index)
      Parameters:
      chg -
      index -
  • Method Details

    • addValue

      public void addValue(Object val)
      Add a value and mark as present.
      Parameters:
      val -
    • addValues

      public void addValues(Collection val)
      Add a value and mark as present.
      Parameters:
      val -
    • getIndex

      public org.bedework.util.calendar.PropertyIndex.PropertyInfoIndex getIndex()
      Returns:
      true for a multi-valued property
    • getOldVal

      public Object getOldVal()
      Returns:
      old value
    • getNewVal

      public Object getNewVal()
      Returns:
      new value
    • getEventProperty

      public boolean getEventProperty()
      Returns:
      true if it's an event property
    • getTodoProperty

      public boolean getTodoProperty()
      Returns:
      true if it's a todo property
    • getFreebusyProperty

      public boolean getFreebusyProperty()
      Returns:
      true if it's a freebusy property
    • getVcalendarProperty

      public boolean getVcalendarProperty()
      True if it's a vcalendar property
      Returns:
      boolean
    • getJournalProperty

      public boolean getJournalProperty()
      True if it's a journal property
      Returns:
      boolean
    • getFreeBusyProperty

      public boolean getFreeBusyProperty()
      True if it's a freebusy property
      Returns:
      boolean
    • getTimezoneProperty

      public boolean getTimezoneProperty()
      True if it's a timezone property
      Returns:
      boolean
    • getAlarmProperty

      public boolean getAlarmProperty()
      True if it's an alarm property
      Returns:
      boolean
    • getVavailabilityProperty

      public boolean getVavailabilityProperty()
      True if it's a vavailability property
      Returns:
      boolean
    • getAvailableProperty

      public boolean getAvailableProperty()
      True if it's an available property
      Returns:
      boolean
    • getVpollProperty

      public boolean getVpollProperty()
      True if it's a vpoll property
      Returns:
      boolean
    • setChanged

      public boolean setChanged(Object oldVal, Object newVal)
      Mark a property as changed if old != new and save old and new values
      Parameters:
      oldVal -
      newVal -
      Returns:
      true if it's a changed property
    • getChanged

      public boolean getChanged()
      Returns:
      true if it's a changed property
    • setAdded

      public void setAdded(Object newVal)
      Mark a property as added and provide new value
      Parameters:
      newVal -
    • setPresent

      public void setPresent(boolean val)
      Parameters:
      val - true if it's a present property
    • getPresent

      public boolean getPresent()
      Returns:
      true if it's a present property
    • getAdded

      public boolean getAdded()
      Returns:
      true if it's a added property
    • setDeleted

      public void setDeleted(Object oldVal)
      Mark a property as deleted and provide old value
      Parameters:
      oldVal -
    • getDeleted

      public boolean getDeleted()
      Returns:
      true if it's a deleted property
    • getNewValues

      public Collection getNewValues()
      Returns:
      The collection of new values for this property
    • setAddedValues

      public void setAddedValues(Collection val)
      Parameters:
      val - values added to entity property
    • getAddedValues

      public Collection getAddedValues()
      Returns:
      values added to entity property
    • addAddedValue

      public void addAddedValue(Object o)
      Add a value to the collection of added values and mark as changed.
      Parameters:
      o -
    • setRemovedValues

      public void setRemovedValues(Collection val)
      Parameters:
      val - Values removed from entity property
    • getRemovedValues

      public Collection getRemovedValues()
      Returns:
      Values removed from entity property
    • addRemovedValue

      public void addRemovedValue(Object o)
      Add a value to the collection of removed values and mark as changed.
      Parameters:
      o -
    • setChangedValues

      public void setChangedValues(Collection val)
      Parameters:
      val - Values changed in entity property
    • getChangedValues

      public Collection getChangedValues()
      Returns:
      Values changed in entity property
    • addChangedValue

      public void addChangedValue(Object o)
      Add a value to the collection of changed values and mark as changed.
      Parameters:
      o -
    • diff

      public boolean diff(Collection<?> originalVals)
      Compare the original and new collections. Update the removed and added collections to reflect the changes that need to be made.

      Alarms are the only per user class we have to deal with.

      Parameters:
      originalVals - the original contents
      Returns:
      true if collection set changed - that is, members were added or removed.
    • toString

      public String toString()
      Overrides:
      toString in class Object