public class LargeFeatureReferenceSelection extends AbstractDisposable implements FeatureReferenceSelection
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DYNCLASS_PERSISTENT_NAME |
| Constructor and Description |
|---|
LargeFeatureReferenceSelection(DefaultFeatureStore featureStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor visitor)
Provides each value of this Store to the provided
Visitor. |
void |
addObserver(Observer observer) |
void |
beginComplexNotification()
Sets the Observable in complex notification mode.
|
protected void |
clearFeatureReferences() |
void |
deleteObserver(Observer observer) |
void |
deleteObservers() |
boolean |
deselect(FeatureReference reference)
Removes a feature from the selection.
|
void |
deselectAll()
Deselects all values.
|
void |
disableNotifications()
Disable the notification of events to registered Observers.
|
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
void |
enableNotifications()
Enable (default) the notification of events to registered Observers.
|
void |
endComplexNotification()
Ends the complex notification mode.
|
FeatureStore |
getFeatureStore() |
java.util.List<FeatureType> |
getFeatureTypes() |
long |
getSelectedCount()
Returns the number of selected values.
|
boolean |
inComplex() |
boolean |
isAvailable() |
boolean |
isEmpty() |
boolean |
isEnabledNotifications() |
boolean |
isFromStore(DataStore store)
Indicates whether this DataSet belongs to a specific store
|
boolean |
isSelected(FeatureReference reference)
Returns if a feature is selected.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
notifyObservers() |
void |
notifyObservers(java.lang.Object arg) |
java.lang.Iterable<FeatureReference> |
referenceIterable() |
java.util.Iterator<FeatureReference> |
referenceIterator()
Returns an unmodifiable Iterator of selected feature references.
|
static void |
registerPersistent() |
void |
reverse()
Reverses the selection.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
boolean |
select(FeatureReference reference)
Adds a feature to the selection.
|
void |
selectAll()
Selects all values.
|
void |
update(Observable observable,
java.lang.Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
dispose, disposeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisposepublic static final java.lang.String DYNCLASS_PERSISTENT_NAME
public LargeFeatureReferenceSelection(DefaultFeatureStore featureStore)
public FeatureStore getFeatureStore()
public boolean select(FeatureReference reference)
FeatureReferenceSelectionselect in interface FeatureReferenceSelectionreference - the selected feature referencepublic boolean deselect(FeatureReference reference)
FeatureReferenceSelectiondeselect in interface FeatureReferenceSelectionreference - the deselected feature referencepublic void selectAll()
throws DataException
FeatureReferenceSelectionselectAll in interface FeatureReferenceSelectionDataException - if there is an error selecting all valuespublic void deselectAll()
throws DataException
FeatureReferenceSelectiondeselectAll in interface FeatureReferenceSelectionDataException - if there is an error deselecting all valuespublic boolean isSelected(FeatureReference reference)
FeatureReferenceSelectionisSelected in interface FeatureReferenceSelectionreference - to checkpublic void reverse()
FeatureReferenceSelectionreverse in interface FeatureReferenceSelectionpublic boolean isEmpty()
public long getSelectedCount()
FeatureReferenceSelectiongetSelectedCount in interface FeatureReferenceSelectionpublic java.util.Iterator<FeatureReference> referenceIterator()
FeatureReferenceSelectionreferenceIterator in interface FeatureReferenceSelectionpublic java.lang.Iterable<FeatureReference> referenceIterable()
referenceIterable in interface FeatureReferenceSelectionpublic boolean isAvailable()
isAvailable in interface FeatureReferenceSelectionpublic boolean isFromStore(DataStore store)
DataSetisFromStore in interface DataSetstore - a DataStorepublic void accept(Visitor visitor) throws BaseException
DataSetVisitor.
The values received through the Visitor.visit(Object) method
may be transient, reused or externally modifiable, so they can't
be used to be stored in any external form out of the visit method.
If you need to store any of the values out of the
Visitor.visit(Object) method execution, create a copy or clone
the received value in order to be stored.accept in interface DataSetaccept in interface Visitablevisitor - the visitor to apply to each value.BaseException - if there is an error while performing the visitprotected void doDispose()
throws BaseException
AbstractDisposableAbstractDisposable.dispose() method, to be
implemented by child classes.doDispose in class AbstractDisposableBaseExceptionAbstractDisposable.dispose()public void addObserver(Observer observer)
addObserver in interface Observablepublic void beginComplexNotification()
ComplexObservablebeginComplexNotification in interface ComplexObservablepublic void deleteObserver(Observer observer)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observablepublic void disableNotifications()
ComplexObservabledisableNotifications in interface ComplexObservablepublic void enableNotifications()
ComplexObservableenableNotifications in interface ComplexObservablepublic void endComplexNotification()
ComplexObservable
If a observer is a ComplexObserver, it will be notified with a
single DefaultComplexNotification instead of each of the notifications.
Some important notes to take into account when calling this method.
Observer is processing a notification another Observer is
registered to the source Observable, it won't get any of the
notifications currently being notified, but future ones.endComplexNotification in interface ComplexObservablepublic boolean inComplex()
public boolean isEnabledNotifications()
public void notifyObservers()
public void notifyObservers(java.lang.Object arg)
public void update(Observable observable, java.lang.Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.
public void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionprotected void clearFeatureReferences()
public java.util.List<FeatureType> getFeatureTypes()
public static void registerPersistent()