Package com.liferay.portal.odata.sort
Class SortField
java.lang.Object
com.liferay.portal.odata.sort.SortField
- All Implemented Interfaces:
Serializable
Models a sort field.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSortField
(boolean asc, EntityField entityField, List<EntityField> parentEntityFields) SortField
(EntityField entityField, boolean asc) Creates a new sort field.Creates a new sort field not linked to a entityField -
Method Summary
Modifier and TypeMethodDescriptiongetSortableFieldName
(Locale locale) Returns the field's name.getSortableFieldPath
(Locale locale) boolean
Returnstrue
if the sort field is ascending.
-
Constructor Details
-
SortField
-
SortField
Creates a new sort field.- Parameters:
entityField
- the entity fieldasc
- whether the sort should be ascending
-
SortField
Creates a new sort field not linked to a entityField- Parameters:
fieldName
- the entity field nameasc
- whether the sort should be ascending
-
-
Method Details
-
getSortableFieldName
Returns the field's name.- Parameters:
locale
- the locale- Returns:
- the field's name
-
getSortableFieldPath
-
isAscending
public boolean isAscending()Returnstrue
if the sort field is ascending.- Returns:
true
if the sort field is ascending;false
otherwise
-