Class BasicNamedQueryDataPopulator

java.lang.Object
de.hybris.platform.cmsfacades.media.populator.BasicNamedQueryDataPopulator
All Implemented Interfaces:
Populator<NamedQueryData,NamedQuery>

public class BasicNamedQueryDataPopulator extends Object implements Populator<NamedQueryData,NamedQuery>
This populator will convert the the basic attributes of the NamedQuery bean: - queryName - currentPage - pageSize - sort params
  • Constructor Details

    • BasicNamedQueryDataPopulator

      public BasicNamedQueryDataPopulator()
  • Method Details

    • populate

      public void populate(NamedQueryData namedQueryData, NamedQuery namedQuery) throws ConversionException
      Description copied from interface: Populator
      Populate the target instance with values from the source instance.
      Specified by:
      populate in interface Populator<NamedQueryData,NamedQuery>
      Parameters:
      namedQueryData - the source object
      namedQuery - the target to fill
      Throws:
      ConversionException - if an error occurs
    • toOptionalInteger

      protected Integer toOptionalInteger(String value)
      Convert the string to an integer. If the value is null, then return null. This method assumes that a validation has already taken place, and a NumberFormatException is not expected at this point.
      Parameters:
      value - - the value to be converted
      Returns:
      the Integer value
    • convertSort

      protected List<Sort> convertSort(String sort)
      Converts the String sort param into a list of objects. The input, if not empty, should be already validated with the following format: {param}:{direction} Multiple sort parameters are allowed if the blocks are separated by comma.
      Parameters:
      sort - - the sort parameter received from the request
      Returns:
      a list of Sort objects
    • convertSortBlock

      protected Sort convertSortBlock(String sortBlock)
      Convert A sort block, i.e. {param}:{direction} into a Sort object.
      Parameters:
      sortBlock -
      Returns: