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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SortKeyascendingOrder(String field) Creates a new ascending-order sort key for the provided field.static SortKeydescendingOrder(String field) Creates a new descending-order sort key for the provided field.getField()Returns the sort key field.booleanReturnstrueif this sort key is in ascending order, orfalseif it is in descending order.static SortKeyreverseOrder(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- Iffieldis 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- Iffieldis 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()Returnstrueif this sort key is in ascending order, orfalseif it is in descending order.- Returns:
trueif this sort key is in ascending order, orfalseif 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.
-