public class SortField
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
SortField(boolean asc,
EntityField entityField,
java.util.List<EntityField> parentEntityFields) |
SortField(EntityField entityField,
boolean asc)
Creates a new sort field.
|
SortField(java.lang.String fieldName,
boolean asc)
Creates a new sort field not linked to a entityField
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSortableFieldName(java.util.Locale locale)
Returns the field's name.
|
java.lang.String |
getSortableFieldPath(java.util.Locale locale) |
boolean |
isAscending()
Returns
true if the sort field is ascending. |
public SortField(boolean asc, EntityField entityField, java.util.List<EntityField> parentEntityFields)
public SortField(EntityField entityField, boolean asc)
entityField
- the entity fieldasc
- whether the sort should be ascendingpublic SortField(java.lang.String fieldName, boolean asc)
fieldName
- the entity field nameasc
- whether the sort should be ascendingpublic java.lang.String getSortableFieldName(java.util.Locale locale)
locale
- the localepublic java.lang.String getSortableFieldPath(java.util.Locale locale)
public boolean isAscending()
true
if the sort field is ascending.true
if the sort field is ascending; false
otherwise