Package jakarta.nosql
Interface Sort
-
public interface Sort
This element represents a required order to be used in a query, it's 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 interface
Sort.SortProvider
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Sort
asc(String name)
Creates a new Sort of the typeSortType.ASC
static Sort
desc(String name)
Creates a new Sort of the typeSortType.DESC
String
getName()
Returns the field nameSortType
getType()
TheSortType
static Sort
of(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
-
-