Class SplibSearchListService<FST extends SplibSearchForm, FLT extends SplibListForm<?>>

Type Parameters:
FST - SplibSearchForm
FLT - 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.

  1. To obtain the number of all the records adopting to the search conditions.
  2. To obtain the the sorted records adopting to the search conditions and the page number currently showing
  3. 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 Details

    • SplibSearchListService

      public SplibSearchListService()
  • Method Details

    • delete

      public abstract void delete(FLT listForm, org.springframework.security.core.userdetails.UserDetails loginUser) throws Exception
      Deletes the record.
      Parameters:
      listForm - listForm
      loginUser - loginUser
      Throws:
      Exception - Exception
    • getSortedList

      protected List<? extends SplibRecord> getSortedList(List<? extends SplibRecord> listToSort, SplibSearchForm searchForm)
      Sorts the list.
      Parameters:
      listToSort - listToSort
      searchForm - searchForm
      Returns:
      List
    • getSortedList

      protected List<? extends SplibRecord> getSortedList(List<? extends SplibRecord> listToSort, SplibSearchForm searchForm, String[] needsNumberSortItems)
      Sorts the list.
      Parameters:
      listToSort - listToSort
      searchForm - searchForm
      needsNumberSortItems - needsNumberSortItems
      Returns:
      List
    • getFilteredList

      protected List<? extends SplibRecord> getFilteredList(List<? extends SplibRecord> sortedList, SplibSearchForm seForm)
      Filters list.
      Parameters:
      sortedList - sortedList
      seForm - seForm
      Returns:
      list