Package jakarta.nosql
Interface Sort
-
public interface SortThis element represents a required order to be used in a query, it has two attributes: -- The name - the field's name to be sorted -- The type - the way to be sorted- See Also:
of(String, SortType),SortType
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSort.SortProvider
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Sortasc(String name)Creates a new Sort of the typeSortType.ASCstatic Sortdesc(String name)Creates a new Sort of the typeSortType.DESCStringgetName()Returns the field nameSortTypegetType()TheSortTypestatic Sortof(String name, SortType type)Creates a wew Sort instance to be used in a NoSQL query.
-
-
-
Method Detail
-
getName
String getName()
Returns the field name- Returns:
- the field name
-
of
static Sort of(String name, SortType type)
Creates a wew Sort instance to be used in a NoSQL query.- Parameters:
name- - the field name be used in a sort processtype- - the way to be sorted- Returns:
- a sort instance
- Throws:
NullPointerException- when there are null parameters
-
asc
static Sort asc(String name)
Creates a new Sort of the typeSortType.ASC- Parameters:
name- the field name be used in a sort process- Returns:
- a sort instance
- Throws:
NullPointerException- when name is null
-
desc
static Sort desc(String name)
Creates a new Sort of the typeSortType.DESC- Parameters:
name- the field name be used in a sort process- Returns:
- a sort instance
- Throws:
NullPointerException- when name is null
-
-