wt.query
Class QueryCollationKeyFactory
java.lang.Object
wt.util.CollationKeyFactory
wt.query.QueryCollationKeyFactory
- public final class QueryCollationKeyFactory
- extends CollationKeyFactory
A collation key factory for Identified objects. Used as part of a string sort
on query results. Only supports sorting on one attribute.
Supported API: true
Extendable: false
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sortPreference
private String sortPreference
QueryCollationKeyFactory
public QueryCollationKeyFactory(Locale locale,
String sort_preference)
- Construct a collation key factory for the the given locale. Save the information
for generating the collation key.
- Parameters:
locale
- desired localesort_preference
- Attribute to sort on, can be null then default to identity.
QueryCollationKeyFactory
public QueryCollationKeyFactory()
- Construct a collation key factory for the current
WTContext
's locale.
QueryCollationKeyFactory
public QueryCollationKeyFactory(Locale locale)
- Construct a collation key factory for the given locale.
- Parameters:
locale
- desired locale
getCollationString
public String getCollationString(Object obj)
- Get a collation string for the given object.
This method returns the identity string of
Identified
objects, the
results of getIdentity
for WTObject
, and the results of
toString()
for others.
- Overrides:
getCollationString
in class CollationKeyFactory
- Parameters:
obj
- the object
- Returns:
- string collation key source string