Class AbstractSpecificationBuilder

java.lang.Object
com.skava.oms.entity.criteria.AbstractSpecificationBuilder
Direct Known Subclasses:
CollectionSpecificationBuilderImpl, OrderSpecificationBuilderImpl

public abstract class AbstractSpecificationBuilder extends Object
This class contains the specification for the filter through params and sort
Since:
Jun 29, 2018
Author:
Infosys Equinox
  • Field Details

  • Constructor Details

    • AbstractSpecificationBuilder

      public AbstractSpecificationBuilder()
  • Method Details

    • searchWith

      public AbstractSpecificationBuilder searchWith(String key, String operation, Object value)
      This method defines calls the SearchCriteria class with params key, operation and value
      Parameters:
      key - key of String type
      operation - operation to be done, this is of String type
      value - value of String type
      Returns:
      initializes SpecificationsBuilder class Debug logger has been added to this method.
    • sortWith

      public AbstractSpecificationBuilder sortWith(String key, String operation)
      This method defines calls the SortCriteria class with key and operation
      Parameters:
      key - key of String type
      operation - operation to be done, this is of String type
      Returns:
      initializes SpecificationsBuilder class Debug logger has been added to this method.
    • searchBuild

      public List<SearchCriteria> searchBuild()
      Returns:
      null on empty SearchCriteria params, on SearchCriteria params returns Specification Debug logger has been added to this method.
      See Also:
      • Specification
    • sortBuild

      public List<SortCriteria> sortBuild()
      Returns:
      null on empty SsortCriteria params, on SearchCriteria params returns Specification Debug logger has been added to this method.
      See Also:
      • Specification
    • toUpdateOperation

      protected abstract SearchCriteria toUpdateOperation(SearchCriteria criteria)
    • getSearchSpecification

      public List<SearchCriteria> getSearchSpecification(String searchString)
      Gets the specifications.
      Parameters:
      searchString - the string going to be convert as specification
      Returns:
      the search specifications Debug logger has been added to this method.
    • getSortSpecification

      public List<SortCriteria> getSortSpecification(String sortString)
      Gets the specifications.
      Parameters:
      sortString - the string going to be convert as specification
      Returns:
      the sort specifications Debug logger has been added to this method.
    • stringToLong

      public long stringToLong(String val)
      Convert required field value to long
      Parameters:
      val - value to be converted to long
      Returns:
      the long variable Debug logger has been added to this method.
    • equalsOperation

      public SearchCriteria equalsOperation(SearchCriteria criteria)
      This method checks for the equals operation for the given criteria
      Parameters:
      criteria - - contains the criteria to be performed
      Returns:
      the search criteria Debug logger has been added to this method.