Enum ItemList.SynchronizeOption

java.lang.Object
java.lang.Enum<ItemList.SynchronizeOption>
net.sf.basedb.core.ItemList.SynchronizeOption
All Implemented Interfaces:
Serializable, Comparable<ItemList.SynchronizeOption>, java.lang.constant.Constable
Enclosing class:
ItemList

public static enum ItemList.SynchronizeOption
extends Enum<ItemList.SynchronizeOption>
Options for synchronizing an existing item list with a current settings in an ItemContext. See ItemList.resyncFilter(DbControl, SynchronizeOption, boolean, ProgressReporter).
  • Enum Constant Details

    • FULL

      public static final ItemList.SynchronizeOption FULL
      Synchronize the members so that it contains all of the items matching the filter and no items not matching the filter. This options can both remove and add members.
    • ADD_ONLY

      public static final ItemList.SynchronizeOption ADD_ONLY
      Synchronize the members by adding new items matching the filter. This option will not remove existing members that doesn't match the filter.
    • REMOVE_ONLY

      public static final ItemList.SynchronizeOption REMOVE_ONLY
      Synchronize the members by removing items that doesn't match the filter. This option will not add items that matches the filter but are not found in the list.
  • Constructor Details

    • SynchronizeOption

      private SynchronizeOption()
  • Method Details

    • values

      public static ItemList.SynchronizeOption[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ItemList.SynchronizeOption valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • synchronize

      abstract void synchronize​(Set<Integer> existing, Set<Integer> matching)
      Synchronize the existing members with the items matching the current filter context. The synchonrization should modify the 'existing' set.
      Parameters:
      existing - A set containing the existing members of the item list
      matching - A set containing the items matching the sync filter