Package net.sf.basedb.core
Enum ItemList.SynchronizeOption
- java.lang.Object
-
- java.lang.Enum<ItemList.SynchronizeOption>
-
- net.sf.basedb.core.ItemList.SynchronizeOption
-
- All Implemented Interfaces:
Serializable
,Comparable<ItemList.SynchronizeOption>
- Enclosing class:
- ItemList
public static enum ItemList.SynchronizeOption extends Enum<ItemList.SynchronizeOption>
Options for synchronizing an existing item list with a current settings in anItemContext
. SeeItemList.resyncFilter(DbControl, SynchronizeOption, boolean, ProgressReporter)
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD_ONLY
Synchronize the members by adding new items matching the filter.FULL
Synchronize the members so that it contains all of the items matching the filter and no items not matching the filter.REMOVE_ONLY
Synchronize the members by removing items that doesn't match the filter.
-
Constructor Summary
Constructors Modifier Constructor Description private
SynchronizeOption()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract void
synchronize(Set<Integer> existing, Set<Integer> matching)
Synchronize the existing members with the items matching the current filter context.static ItemList.SynchronizeOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static ItemList.SynchronizeOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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.
-
-
Method Detail
-
values
public static ItemList.SynchronizeOption[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ItemList.SynchronizeOption c : ItemList.SynchronizeOption.values()) System.out.println(c);
- 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 nameNullPointerException
- 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 listmatching
- A set containing the items matching the sync filter
-
-