public class FeaturePagingHelperImpl extends DefaultDynObjectPagingHelper implements FeaturePagingHelper
PagingCalculator.SizeableDEFAULT_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, setMaxPageSizedispose, disposeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentPage, getCurrentPageSize, getInitialIndex, getMaxPageSize, getNumPages, getTotalSize, setCurrentPage, setMaxPageSizepublic FeaturePagingHelperImpl(FeatureStore featureStore) throws BaseException
featureStore - to extract data fromDataException - if there is an error initializing the helperBaseExceptionpublic 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 helperBaseExceptionpublic FeaturePagingHelperImpl(FeatureStore featureStore, FeatureQuery featureQuery) throws BaseException
featureStore - to extract data fromDataException - if there is an error initializing the helperBaseExceptionpublic 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 helperBaseExceptionpublic boolean isSelectionUp()
isSelectionUp in interface FeaturePagingHelperpublic FeatureSelection getSelection()
getSelection in interface FeaturePagingHelperpublic void setSelection(FeatureSelection selection)
setSelection in interface FeaturePagingHelperpublic void setSelectionUp(boolean selectionUp)
FeaturePagingHelpersetSelectionUp in interface FeaturePagingHelperpublic Feature getFeatureAt(long index) throws BaseException
FeaturePagingHelpergetFeatureAt in interface FeaturePagingHelperindex - to locate the Feature in the CollectionBaseException - if there is an error getting the Featurepublic Feature[] getCurrentPageFeatures()
FeaturePagingHelpergetCurrentPageFeatures in interface FeaturePagingHelperpublic DynObjectSet getDynObjectSet()
DynObjectPagingHelperDynObjectSet used to fetch the data.getDynObjectSet in interface DynObjectPagingHelpergetDynObjectSet in class DefaultDynObjectPagingHelperpublic void reloadCurrentPage()
throws BaseException
DynObjectPagingHelperreloadCurrentPage in interface DynObjectPagingHelperreloadCurrentPage in class DefaultDynObjectPagingHelperBaseException - if there is an error reloading the current pagepublic void reload()
throws BaseException
DynObjectPagingHelperreload in interface DynObjectPagingHelperreload in class DefaultDynObjectPagingHelperBaseExceptionpublic FeatureStore getFeatureStore()
FeaturePagingHelpergetFeatureStore in interface FeaturePagingHelperpublic FeatureQuery getFeatureQuery()
FeaturePagingHelpergetFeatureQuery in interface FeaturePagingHelperprotected void loadCurrentPageData()
throws BaseException
loadCurrentPageData in class DefaultDynObjectPagingHelperBaseExceptionpublic void delete(Feature feature) throws BaseException
FeaturePagingHelperdelete in interface FeaturePagingHelperfeature - the Feature to delete.BaseExceptionFeatureSet#delete(Feature)}
{@link FeaturePagingHelper#getFeatureSet()}public void insert(EditableFeature feature) throws BaseException
FeaturePagingHelperFeatureSet. 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 FeaturePagingHelperfeature - the EditableFeature to insert.BaseExceptionFeatureSet#insert(EditableFeature)}
{@link FeaturePagingHelper#getFeatureSet()}public void update(EditableFeature feature) throws BaseException
FeaturePagingHelperupdate in interface FeaturePagingHelperfeature - an instance of EditableFeature with which to
update the associated Feature.BaseExceptionFeatureSet#update(EditableFeature)}
{@link FeaturePagingHelper#getFeatureSet()}public FeatureType getFeatureType()
FeaturePagingHelpergetFeatureType in interface FeaturePagingHelperprotected void doDispose()
throws BaseException
AbstractDisposableAbstractDisposable.dispose() method, to be
implemented by child classes.doDispose in class DefaultDynObjectPagingHelperBaseExceptionAbstractDisposable.dispose()public DynObject[] getCurrentPageDynObjects()
DynObjectPagingHelpergetCurrentPageDynObjects in interface DynObjectPagingHelpergetCurrentPageDynObjects in class DefaultDynObjectPagingHelperpublic DynObject getDynObjectAt(long index) throws BaseException
DynObjectPagingHelperDynObject located at the index position.getDynObjectAt in interface DynObjectPagingHelpergetDynObjectAt in class DefaultDynObjectPagingHelperindex - to locate the DynObject in the setBaseException - if there is an error getting the DynObjectpublic List asList()
FeaturePagingHelperasList in interface FeaturePagingHelperpublic List asListOfDynObjects()
FeaturePagingHelperasListOfDynObjects in interface FeaturePagingHelper