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) booleanReturnstrueif 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()Returnstrueif the sort field is ascending.- Returns:
trueif the sort field is ascending;falseotherwise
-