public class FeaturePagingHelperImpl extends DefaultDynObjectPagingHelper implements FeaturePagingHelper
PagingCalculator.Sizeable
DEFAULT_PAGE_SIZE
Constructor and Description |
---|
FeaturePagingHelperImpl(FeatureStore featureStore)
Constructs a FeaturePagingHelperImpl from data of a FeatureStore.
|
FeaturePagingHelperImpl(FeatureStore featureStore,
FeatureQuery featureQuery)
Constructs a FeaturePagingHelperImpl from data of a FeatureStore.
|
FeaturePagingHelperImpl(FeatureStore featureStore,
FeatureQuery featureQuery,
int pageSize)
Constructs a FeaturePagingHelperImpl from data of a FeatureStore.
|
FeaturePagingHelperImpl(FeatureStore featureStore,
int pageSize)
Constructs a FeaturePagingHelperImpl from data of a FeatureStore.
|
Modifier and Type | Method and Description |
---|---|
List |
asList()
Return a List of Fearures with the contents of this PagingHelper
|
List |
asListOfDynObjects()
Return a List of DynObjects with the contents of this PagingHelper
|
void |
delete(Feature feature)
Deletes a
Feature from current FeatureSet . |
protected void |
doDispose()
Internal implementation for the
AbstractDisposable.dispose() method, to be
implemented by child classes. |
DynObject[] |
getCurrentPageDynObjects()
Returns all the values of the current loaded page.
|
Feature[] |
getCurrentPageFeatures()
Returns all the values of the current loaded page.
|
DynObject |
getDynObjectAt(long index)
Returns the
DynObject located at the index position. |
DynObjectSet |
getDynObjectSet()
Returns the
DynObjectSet used to fetch the data. |
Feature |
getFeatureAt(long index)
Returns the Feature located at the index position.
|
FeatureQuery |
getFeatureQuery()
Returns the query used to load the Features.
|
FeatureStore |
getFeatureStore()
Returns the FeatureStore used to fetch the data.
|
FeatureType |
getFeatureType()
Returns the FeatureType used of the data.
|
FeatureSelection |
getSelection() |
void |
insert(EditableFeature feature)
Inserts a new feature in this
FeatureSet . |
boolean |
isSelectionUp() |
protected void |
loadCurrentPageData()
Loads all the Features of the current page.
|
void |
reload()
Reloads everything.
|
void |
reloadCurrentPage()
Reloads the current page of data from the set.
|
void |
setSelection(FeatureSelection selection) |
void |
setSelectionUp(boolean selectionUp)
Sets that the selected Features get returned first.
|
void |
update(EditableFeature feature)
|
getCalculator, getCurrentPage, getCurrentPageSize, getInitialIndex, getMaxPageSize, getNumPages, getTotalSize, setCalculator, setCurrentPage, setDefaultCalculator, setDynObjectSet, setMaxPageSize
dispose, dispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurrentPage, getCurrentPageSize, getInitialIndex, getMaxPageSize, getNumPages, getTotalSize, setCurrentPage, setMaxPageSize
public FeaturePagingHelperImpl(FeatureStore featureStore) throws BaseException
featureStore
- to extract data fromDataException
- if there is an error initializing the helperBaseException
public FeaturePagingHelperImpl(FeatureStore featureStore, int pageSize) throws BaseException
featureStore
- to extract data frompageSize
- the number of elements per page dataDataException
- if there is an error initializing the helperBaseException
public FeaturePagingHelperImpl(FeatureStore featureStore, FeatureQuery featureQuery) throws BaseException
featureStore
- to extract data fromDataException
- if there is an error initializing the helperBaseException
public FeaturePagingHelperImpl(FeatureStore featureStore, FeatureQuery featureQuery, int pageSize) throws BaseException
featureSet
- to extract data frompageSize
- the number of elements per page dataDataException
- if there is an error initializing the helperBaseException
public boolean isSelectionUp()
isSelectionUp
in interface FeaturePagingHelper
public FeatureSelection getSelection()
getSelection
in interface FeaturePagingHelper
public void setSelection(FeatureSelection selection)
setSelection
in interface FeaturePagingHelper
public void setSelectionUp(boolean selectionUp)
FeaturePagingHelper
setSelectionUp
in interface FeaturePagingHelper
public Feature getFeatureAt(long index) throws BaseException
FeaturePagingHelper
getFeatureAt
in interface FeaturePagingHelper
index
- to locate the Feature in the CollectionBaseException
- if there is an error getting the Featurepublic Feature[] getCurrentPageFeatures()
FeaturePagingHelper
getCurrentPageFeatures
in interface FeaturePagingHelper
public DynObjectSet getDynObjectSet()
DynObjectPagingHelper
DynObjectSet
used to fetch the data.getDynObjectSet
in interface DynObjectPagingHelper
getDynObjectSet
in class DefaultDynObjectPagingHelper
public void reloadCurrentPage() throws BaseException
DynObjectPagingHelper
reloadCurrentPage
in interface DynObjectPagingHelper
reloadCurrentPage
in class DefaultDynObjectPagingHelper
BaseException
- if there is an error reloading the current pagepublic void reload() throws BaseException
DynObjectPagingHelper
reload
in interface DynObjectPagingHelper
reload
in class DefaultDynObjectPagingHelper
BaseException
public FeatureStore getFeatureStore()
FeaturePagingHelper
getFeatureStore
in interface FeaturePagingHelper
public FeatureQuery getFeatureQuery()
FeaturePagingHelper
getFeatureQuery
in interface FeaturePagingHelper
protected void loadCurrentPageData() throws BaseException
loadCurrentPageData
in class DefaultDynObjectPagingHelper
BaseException
public void delete(Feature feature) throws BaseException
FeaturePagingHelper
delete
in interface FeaturePagingHelper
feature
- the Feature
to delete.BaseException
FeatureSet#delete(Feature)}
{@link FeaturePagingHelper#getFeatureSet()}
public void insert(EditableFeature feature) throws BaseException
FeaturePagingHelper
FeatureSet
. It needs to be an
instance of EditableFeature
as it has not been stored yet.Iterator
from this store that was still in use can will not
reflect this change.insert
in interface FeaturePagingHelper
feature
- the EditableFeature
to insert.BaseException
FeatureSet#insert(EditableFeature)}
{@link FeaturePagingHelper#getFeatureSet()}
public void update(EditableFeature feature) throws BaseException
FeaturePagingHelper
update
in interface FeaturePagingHelper
feature
- an instance of EditableFeature
with which to
update the associated Feature
.BaseException
FeatureSet#update(EditableFeature)}
{@link FeaturePagingHelper#getFeatureSet()}
public FeatureType getFeatureType()
FeaturePagingHelper
getFeatureType
in interface FeaturePagingHelper
protected void doDispose() throws BaseException
AbstractDisposable
AbstractDisposable.dispose()
method, to be
implemented by child classes.doDispose
in class DefaultDynObjectPagingHelper
BaseException
AbstractDisposable.dispose()
public DynObject[] getCurrentPageDynObjects()
DynObjectPagingHelper
getCurrentPageDynObjects
in interface DynObjectPagingHelper
getCurrentPageDynObjects
in class DefaultDynObjectPagingHelper
public DynObject getDynObjectAt(long index) throws BaseException
DynObjectPagingHelper
DynObject
located at the index position.getDynObjectAt
in interface DynObjectPagingHelper
getDynObjectAt
in class DefaultDynObjectPagingHelper
index
- to locate the DynObject in the setBaseException
- if there is an error getting the DynObjectpublic List asList()
FeaturePagingHelper
asList
in interface FeaturePagingHelper
public List asListOfDynObjects()
FeaturePagingHelper
asListOfDynObjects
in interface FeaturePagingHelper