Class PaginationConfig
java.lang.Object
org.emau.icmvc.ttp.epix.common.utils.PaginationConfig
- All Implemented Interfaces:
Serializable
parameter for get...Paginated functions
firstEntry
default = 0
pageSize
default = 10
filter
default = empty map
filter values; for possible keys see IdentityField
startDate
default = null
consents with date >= startDate are returned
endDate
default = null
consents with date invalid input: '<'= endDate are returned
templateType
default = null
filterAreTreatedAsConjunction
default = true
has no effect on template type
filterIsCaseSensitive
default = false
sortField
see IdentityField
default = null
sortIsAscending
default = true
- Author:
- geidell, moser
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPaginationConfig(String globalFieldFilter, boolean caseSensitive) PaginationConfig(Map<IdentityField, String> identityFilter, Map<PersonField, String> personFilter, boolean asConjunction, boolean caseSensitive) -
Method Summary
Modifier and TypeMethodDescriptionstatic PaginationConfig.Builderbuilder()Creates a builder for the pagination config (see Builder-Pattern).booleandetectAndConfigureGlobalIdentityFiltering(Set<IdentityField> globalFilterFields) IfIdentityField.NONEis the only key in the identity filter map with a non-empty pattern value, then configure the filter to search in all given global filter fields linked by OR (disjunction), otherwise leave the filter configuration untouched.booleandetectAndConfigureGlobalPersonFiltering(Set<PersonField> globalFilterFields) IfPersonField.NONEis the only key in the identity filter map with a non-empty pattern value, then configure the filter to search in all given global filter fields linked by OR (disjunction), otherwise leave the filter configuration untouched.booleanbooleandetectAndConfigureIdentityGenderFiltering(Map<Gender, String> genderStrings) IfIdentityField.GENDERis a key in the identity fields filter map, then replace the (localized) gender strings by all gender symbol keys (as defined inGender) for which the value's pattern matches the gender string value.booleanbooleandetectAndConfigureIdentityVitalStatusFiltering(Map<VitalStatus, String> vitalStatusStrings) IfIdentityField.VITAL_STATUSis a key in the person fields filter map, then replace the (localized) vitalStatus strings by all vital status symbol keys (as defined inVitalStatus) for which the value's pattern matches the vital status string value.booleanbooleanintintinthashCode()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanPrepares this pagination config for using with JPA-predicates.voidsetCreateTimestampFilter(String createTimestampFilter) voidsetDateFormat(String dateFormat) voidsetEventFilter(Set<IdentityHistoryEvent> eventFilter) voidsetFirstEntry(int firstEntry) voidsetGlobalFieldFilter(String globalFieldFilter) voidsetGlobalFieldFilterCaseSensitive(boolean globalFieldFilterCaseSensitive) voidsetIdentityAndPersonFilterCombinedAsConjunction(boolean identityAndPersonFilterCombinedAsConjunction) voidsetIdentityFilter(Map<IdentityField, String> identityFilter) voidsetIdentityFilterAsConjunction(boolean identityFilterAsConjunction) voidsetIdentityFilterCaseSensitive(boolean identityFilterCaseSensitive) voidsetIdentityGenderStrings(Map<Gender, String> identityGenderStrings) voidsetIdentityVitalStatusStrings(Map<VitalStatus, String> identityVitalStatusStrings) voidsetPageSize(int pageSize) voidsetPersonFilter(Map<PersonField, String> personFilter) voidsetPersonFilterAsConjunction(boolean personFilterAsConjunction) voidsetPersonFilterCaseSensitive(boolean personFilterCaseSensitive) voidsetPriorityFilter(Set<PossibleMatchPriority> priorityFilter) voidsetSolutionFilter(Set<PossibleMatchSolution> solutionFilter) voidsetSortField(IdentityField sortField) voidsetSortIsAscending(boolean sortIsAscending) voidsetTimeFormat(String timeFormat) toString()
-
Constructor Details
-
PaginationConfig
public PaginationConfig() -
PaginationConfig
-
PaginationConfig
public PaginationConfig(Map<IdentityField, String> identityFilter, Map<PersonField, String> personFilter, boolean asConjunction, boolean caseSensitive)
-
-
Method Details
-
isUsingPagination
public boolean isUsingPagination() -
getFirstEntry
public int getFirstEntry() -
setFirstEntry
public void setFirstEntry(int firstEntry) -
getPageSize
public int getPageSize() -
setPageSize
public void setPageSize(int pageSize) -
getGlobalFieldFilter
-
setGlobalFieldFilter
-
isUsingGlobalFieldFiltering
public boolean isUsingGlobalFieldFiltering() -
isGlobalFieldFilterCaseSensitive
public boolean isGlobalFieldFilterCaseSensitive() -
setGlobalFieldFilterCaseSensitive
public void setGlobalFieldFilterCaseSensitive(boolean globalFieldFilterCaseSensitive) -
isUsingEventFiltering
public boolean isUsingEventFiltering() -
getEventFilter
-
setEventFilter
-
isUsingSolutionFiltering
public boolean isUsingSolutionFiltering() -
getSolutionFilter
-
setSolutionFilter
-
isUsingPriorityFiltering
public boolean isUsingPriorityFiltering() -
getPriorityFilter
-
setPriorityFilter
-
isUsingIdentityFiltering
public boolean isUsingIdentityFiltering() -
getIdentityFilter
-
setIdentityFilter
-
isIdentityFilterAsConjunction
public boolean isIdentityFilterAsConjunction() -
setIdentityFilterAsConjunction
public void setIdentityFilterAsConjunction(boolean identityFilterAsConjunction) -
isIdentityFilterCaseSensitive
public boolean isIdentityFilterCaseSensitive() -
setIdentityFilterCaseSensitive
public void setIdentityFilterCaseSensitive(boolean identityFilterCaseSensitive) -
isGlobalIdentityFiltering
public boolean isGlobalIdentityFiltering() -
getGlobalIdentityFilterPattern
-
detectAndConfigureGlobalIdentityFiltering
IfIdentityField.NONEis the only key in the identity filter map with a non-empty pattern value, then configure the filter to search in all given global filter fields linked by OR (disjunction), otherwise leave the filter configuration untouched.- Parameters:
globalFilterFields- the identity fields to search in when using global identity field filtering- Returns:
- true when global filtering was detected and configured
-
getIdentityGenderStrings
-
setIdentityGenderStrings
-
detectAndConfigureIdentityGenderFiltering
public boolean detectAndConfigureIdentityGenderFiltering() -
detectAndConfigureIdentityGenderFiltering
IfIdentityField.GENDERis a key in the identity fields filter map, then replace the (localized) gender strings by all gender symbol keys (as defined inGender) for which the value's pattern matches the gender string value.- Parameters:
genderStrings- a map with genders as keys and the localized strings as values- Returns:
- true when the identity gender pattern has changed
-
getIdentityVitalStatusStrings
-
setIdentityVitalStatusStrings
-
detectAndConfigureIdentityVitalStatusFiltering
public boolean detectAndConfigureIdentityVitalStatusFiltering() -
detectAndConfigureIdentityVitalStatusFiltering
public boolean detectAndConfigureIdentityVitalStatusFiltering(Map<VitalStatus, String> vitalStatusStrings) IfIdentityField.VITAL_STATUSis a key in the person fields filter map, then replace the (localized) vitalStatus strings by all vital status symbol keys (as defined inVitalStatus) for which the value's pattern matches the vital status string value.- Parameters:
vitalStatusStrings- a map with vital status as keys and the localized strings as values- Returns:
- true when the person vital status pattern has changed
-
isUsingSorting
public boolean isUsingSorting() -
getSortField
-
setSortField
-
isSortIsAscending
public boolean isSortIsAscending() -
setSortIsAscending
public void setSortIsAscending(boolean sortIsAscending) -
isUsingPersonFiltering
public boolean isUsingPersonFiltering() -
getPersonFilter
-
setPersonFilter
-
isPersonFilterAsConjunction
public boolean isPersonFilterAsConjunction() -
setPersonFilterAsConjunction
public void setPersonFilterAsConjunction(boolean personFilterAsConjunction) -
isPersonFilterCaseSensitive
public boolean isPersonFilterCaseSensitive() -
setPersonFilterCaseSensitive
public void setPersonFilterCaseSensitive(boolean personFilterCaseSensitive) -
isGlobalPersonFiltering
public boolean isGlobalPersonFiltering() -
getGlobalPersonFilterPattern
-
detectAndConfigureGlobalPersonFiltering
IfPersonField.NONEis the only key in the identity filter map with a non-empty pattern value, then configure the filter to search in all given global filter fields linked by OR (disjunction), otherwise leave the filter configuration untouched.- Parameters:
globalFilterFields- the person fields to search in when using global person field filtering- Returns:
- true when global filtering was detected and configured
-
isIdentityAndPersonFilterCombinedAsConjunction
public boolean isIdentityAndPersonFilterCombinedAsConjunction() -
setIdentityAndPersonFilterCombinedAsConjunction
public void setIdentityAndPersonFilterCombinedAsConjunction(boolean identityAndPersonFilterCombinedAsConjunction) -
isUsingCreateTimestampFiltering
public boolean isUsingCreateTimestampFiltering() -
getCreateTimestampFilter
-
setCreateTimestampFilter
-
getDateFormat
-
setDateFormat
-
getTimeFormat
-
setTimeFormat
-
normalize
public boolean normalize() -
prepareIdentityFilterForPredicates
Prepares this pagination config for using with JPA-predicates.- Parameters:
cc- the configuration container e.g. to request required fields- Returns:
- true, if the pagination config actually has been changed
-
hashCode
public int hashCode() -
equals
-
equalsWhenPagingAndSortingIsIgnored
-
toString
-
builder
Creates a builder for the pagination config (see Builder-Pattern).- Returns:
- a builder for the pagination config.
-