Class Sort

    • Field Detail

      • SYSTEM_LEVEL_SORT_PARAMETER_NAMES

        public static final List<String> SYSTEM_LEVEL_SORT_PARAMETER_NAMES
    • Constructor Detail

      • Sort

        public Sort()
    • Method Detail

      • parseSortParameter

        public void parseSortParameter​(Class<?> resourceType,
                                       FHIRSearchContext context,
                                       List<String> sortQueryParmValues,
                                       boolean lenient)
                                throws Exception
        Parameters:
        resourceType -
        context -
        sortQueryParmValues -
        lenient -
        Throws:
        Exception
      • parseSortParameter

        public void parseSortParameter​(String resourceTypeName,
                                       FHIRSearchContext context,
                                       List<String> sortQueryParmValues,
                                       boolean lenient)
                                throws Exception
        Parameters:
        resourceTypeName -
        context -
        sortQueryParmValues -
        lenient -
        Throws:
        Exception
      • isUndefinedOrLenient

        public boolean isUndefinedOrLenient​(String resourceTypeName,
                                            String sortParmCode,
                                            SearchParameter sortParmProxy,
                                            boolean lenient)
                                     throws FHIRSearchException
        checks to see if undefined as a SearchParameter or Lenient
        Parameters:
        resourceTypeName -
        sortParmCode -
        sortParmProxy -
        lenient -
        Returns:
        Throws:
        FHIRSearchException
      • checkSystemLevel

        public void checkSystemLevel​(String resourceTypeName,
                                     String code)
                              throws FHIRSearchException
        check system level searches with DESC/ASC are ONLY with _id and _lastUpdated
        Parameters:
        resourceTypeName - one of the FHIR Resources, and must be a non-null value
        code - the code to check.
        Throws:
        FHIRSearchException
      • buildNewInvalidSearchExceptionMessage

        public final String buildNewInvalidSearchExceptionMessage​(String sortParmCode)
        builds exception message when the sort parameter used is undefined.
        Parameters:
        sortParmCode - the code that is passed in
        Returns:
        String representing the exception message
      • buildUndefinedSortParamMessage

        public final String buildUndefinedSortParamMessage​(String resourceTypeName,
                                                           String sortParmCode)
        builds exception message when the sort parameter used is undefined.
        Parameters:
        resourceTypeName - the specific FHIR Resource passed in or general RESOURCE
        sortParmCode - the code that is passed in
        Returns:
        String representing the exception message