Package net.sf.basedb.core
Enum Class ItemList.SynchronizeOption
- All Implemented Interfaces:
Serializable
,Comparable<ItemList.SynchronizeOption>
,Constable
- Enclosing class:
- ItemList
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 ConstantDescriptionSynchronize the members by adding new items matching the filter.Synchronize the members so that it contains all of the items matching the filter and no items not matching the filter.Synchronize the members by removing items that doesn't match the filter. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(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
Returns the enum constant of this class with the specified name.static ItemList.SynchronizeOption[]
values()
Returns an array containing the constants of this enum class, 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 class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
-