Class SortKey
java.lang.Object
org.identityconnectors.framework.common.objects.SortKey
A sort key which can be used to specify the order in which connector objects
should be included in the results of a search request.
- Since:
- 1.4
- Author:
- Laszlo Hordos
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SortKey
ascendingOrder
(String field) Creates a new ascending-order sort key for the provided field.static SortKey
descendingOrder
(String field) Creates a new descending-order sort key for the provided field.getField()
Returns the sort key field.boolean
Returnstrue
if this sort key is in ascending order, orfalse
if it is in descending order.static SortKey
reverseOrder
(SortKey key) Creates a new sort key having the same field as the provided key, but in reverse sort order.toString()
Returns the string representation of this sort key.
-
Constructor Details
-
SortKey
-
-
Method Details
-
ascendingOrder
Creates a new ascending-order sort key for the provided field.- Parameters:
field
- The sort key field.- Returns:
- A new ascending-order sort key.
- Throws:
IllegalArgumentException
- Iffield
is not a valid attribute name.
-
descendingOrder
Creates a new descending-order sort key for the provided field.- Parameters:
field
- The sort key field.- Returns:
- A new descending-order sort key.
- Throws:
IllegalArgumentException
- Iffield
is not a valid attribute name.
-
reverseOrder
Creates a new sort key having the same field as the provided key, but in reverse sort order.- Parameters:
key
- The sort key to be reversed.- Returns:
- The reversed sort key.
-
getField
Returns the sort key field.- Returns:
- The sort key field.
-
isAscendingOrder
public boolean isAscendingOrder()Returnstrue
if this sort key is in ascending order, orfalse
if it is in descending order.- Returns:
true
if this sort key is in ascending order, orfalse
if it is in descending ord)er.
-
toString
Returns the string representation of this sort key. It will be composed of a plus symbol, if the key is ascending, or a minus symbol, if the key is descending, followed by the field name.
-