Package org.cyclos.model
Class QueryParameters
- java.lang.Object
-
- org.cyclos.model.Bean
-
- org.cyclos.model.QueryParameters
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbstractTransQuery,AbstractUserQuery,AccessClientQuery,AccessLogQuery,AccountFeeLogQuery,AccountFeeQuery,AccountLimitsOverviewQuery,AccountQuery,AccountTypeQuery,AdCategoryQuery,AdQuestionQuery,AlertQuery,ArchivedAccountHistoryQuery,BackgroundTaskQuery,BasicAdQuery,BasicGroupQuery,BasicVoucherQuery,BulkActionQuery,BulkActionUserQuery,CacheQuery,ConfigurationQuery,ConnectedUserQuery,ContactQuery,CustomFieldPossibleValueQuery,CustomRecurringTaskLogQuery,CustomScriptQuery,DatabaseUpgradeQuery,DocumentQuery,EntityPropertyLogQuery,ErrorLogQuery,ImportedFileQuery,ImportedLineQuery,IpAddressLogQuery,IpAddressQuery,MaturityTableQuery,MessageQuery,NetworkQuery,NotificationQuery,OidcAuthorizationQuery,OidcClientQuery,OperatorQuery,OrderQuery,ProductQuery,RecordQuery,RecurringTaskQuery,ReferenceQuery,SmsQuery,SystemCustomImageQuery,SystemReportQuery,TokenQuery,TransactionsAwaitingFeedbackQuery,TransferFilterQuery,TransferTypeQuery,TranslationQuery,UserAccountFeeLogQuery,VoucherInfoTransactionsQuery,VoucherTransactionsQuery,VoucherTypeSelectionQuery
public abstract class QueryParameters extends Bean
Base class for search parameters objects. They areBeans used to communicate between the service layer and upper layers (like presentation).- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Property<Integer,QueryParameters>CURRENT_PAGEstatic Property<Integer,QueryParameters>PAGE_SIZEstatic Property<Boolean,QueryParameters>SKIP_TOTAL_COUNT
-
Constructor Summary
Constructors Constructor Description QueryParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Property<?,?>>doGetProperties()IntegergetCurrentPage()IntegergetPageSize()booleanisSkipTotalCount()voidsetCountOnly()Sets current page = 0 and page size = 0, returning no results, but the total countvoidsetCurrentPage(Integer currentPage)voidsetPageSize(Integer pageSize)voidsetSkipTotalCount(boolean skipTotalCount)voidsetUnlimited()Sets the current page = 0 and page size =Integer.MAX_VALUE, returning all results.voiduseMaxAllowedPagination(int currentPage)This method is to be used on list pages that uses an underlying search operation with a query parameters.-
Methods inherited from class org.cyclos.model.Bean
addPropertyChangeListener, addPropertyChangeListener, attributeNames, backup, changes, className, clearAttributes, copyPropertiesTo, copyPropertiesTo, copyPropertiesTo, dataAccessor, firePropertyChange, get, getAttribute, initDataAccessor, properties, property, propertyMap, removeAttribute, removePropertyChangeListener, removePropertyChangeListener, restore, set, set, setAttribute, setWithPropagationId, values
-
-
-
-
Field Detail
-
CURRENT_PAGE
public static final Property<Integer,QueryParameters> CURRENT_PAGE
-
PAGE_SIZE
public static final Property<Integer,QueryParameters> PAGE_SIZE
-
SKIP_TOTAL_COUNT
public static final Property<Boolean,QueryParameters> SKIP_TOTAL_COUNT
-
-
Method Detail
-
getCurrentPage
public Integer getCurrentPage()
-
getPageSize
public Integer getPageSize()
-
isSkipTotalCount
public boolean isSkipTotalCount()
-
setCountOnly
public void setCountOnly()
Sets current page = 0 and page size = 0, returning no results, but the total count
-
setCurrentPage
public void setCurrentPage(Integer currentPage)
-
setPageSize
public void setPageSize(Integer pageSize)
-
setSkipTotalCount
public void setSkipTotalCount(boolean skipTotalCount)
-
setUnlimited
public void setUnlimited()
Sets the current page = 0 and page size =Integer.MAX_VALUE, returning all results. This method is only to be called from service implementations, where really no limit is desired. On client side, useuseMaxAllowedPagination(int)
-
useMaxAllowedPagination
public void useMaxAllowedPagination(int currentPage)
This method is to be used on list pages that uses an underlying search operation with a query parameters. The client will get as many results as possible (configured max results), but still allows paging over results, with a given current page.
-
doGetProperties
protected List<Property<?,?>> doGetProperties()
- Overrides:
doGetPropertiesin classBean
-
-