Class SplibSearchListService<FST extends SplibSearchForm, FLT extends SplibListForm<?>>
java.lang.Object
jp.ecuacion.splib.web.service.SplibGeneralService
jp.ecuacion.splib.web.service.SplibGeneral2FormsService<FST,FLT>
jp.ecuacion.splib.web.service.SplibSearchListService<FST,FLT>
- Type Parameters:
FST- SplibSearchFormFLT- SplibListForm
public abstract class SplibSearchListService<FST extends SplibSearchForm, FLT extends SplibListForm<?>>
extends SplibGeneral2FormsService<FST,FLT>
Provides abstract search list service.
In searching and list the results there are 3 procedures.
- To obtain the number of all the records adopting to the search conditions.
- To obtain the the sorted records adopting to the search conditions and the page number currently showing
- To set the data for optimistic exclusive control
In the case that storage has the function of data sorting and filtering (like DB),
you should use those functions to ease the procedure.
but in the case that storage doesn't have them, you need to sorting and filtering
in java code. In that case getSortedList sorts the data,
and getFilteredList filters them.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidDeletes the record.protected List<? extends SplibRecord> getFilteredList(List<? extends SplibRecord> sortedList, SplibSearchForm seForm) Filters list.protected List<? extends SplibRecord> getSortedList(List<? extends SplibRecord> listToSort, SplibSearchForm searchForm) Sorts the list.protected List<? extends SplibRecord> getSortedList(List<? extends SplibRecord> listToSort, SplibSearchForm searchForm, String[] needsNumberSortItems) Sorts the list.Methods inherited from class SplibGeneral2FormsService
page, prepareForm, prepareFormMethods inherited from class SplibGeneralService
getParams, throwWarning
-
Constructor Details
-
SplibSearchListService
public SplibSearchListService()
-
-
Method Details
-
delete
-
getSortedList
protected List<? extends SplibRecord> getSortedList(List<? extends SplibRecord> listToSort, SplibSearchForm searchForm) Sorts the list.- Parameters:
listToSort- listToSortsearchForm- searchForm- Returns:
- List
-
getSortedList
protected List<? extends SplibRecord> getSortedList(List<? extends SplibRecord> listToSort, SplibSearchForm searchForm, String[] needsNumberSortItems) Sorts the list.- Parameters:
listToSort- listToSortsearchForm- searchFormneedsNumberSortItems- needsNumberSortItems- Returns:
- List
-
getFilteredList
protected List<? extends SplibRecord> getFilteredList(List<? extends SplibRecord> sortedList, SplibSearchForm seForm) Filters list.- Parameters:
sortedList- sortedListseForm- seForm- Returns:
- list
-