Package com.skava.shipping.util
Class SearchUtility
java.lang.Object
com.skava.shipping.util.SearchUtility
This is a Utility class used for filter and sort functionality.
- Since:
- 8.0
- Author:
- Infosys Equinox
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isValidId
(long id) Converts given values to appropriate ordinal valuesstatic boolean
isValidPageAndSize
(int page, int size) Checks whether the page and size are validstatic String
validateCollectionDescription
(CollectionDataRequest collectionDataRequest) Checks the collection name whether its non-empty and validstatic String
validateCollectionName
(CollectionDataRequest collectionDataRequest) Checks the collection name whether its non-empty and validstatic void
validateLocale
(String locale) SkuId Validation
-
Field Details
-
INDEX_NUMBER
- See Also:
-
INDEX_STRING
- See Also:
-
-
Method Details
-
isValidPageAndSize
public static boolean isValidPageAndSize(int page, int size) Checks whether the page and size are valid- Parameters:
page
- Requested page no from the requestsize
- Size of the page- Returns:
- it returns boolean true/false
-
isValidId
public static boolean isValidId(long id) Converts given values to appropriate ordinal values- Parameters:
id
- identifier of the collection to be validated- Returns:
- returns the boolean value
-
validateCollectionName
Checks the collection name whether its non-empty and valid- Parameters:
collectionDataRequest
- name of the collection to be validated- Returns:
- returns the error code for validation.
-
validateCollectionDescription
Checks the collection name whether its non-empty and valid- Parameters:
collectionDataRequest
- description of the collection to be validated- Returns:
- returns the error code for validation.
-
validateLocale
SkuId Validation- Parameters:
locale
- It contains locale of the item.
-