Package net.sf.basedb.core
Enum 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)
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
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
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 Details
-
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
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
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
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
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
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
-