wt.query
Class QueryCollationKeyFactory

java.lang.Object
  extended bywt.util.CollationKeyFactory
      extended bywt.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


Field Summary
private  String sortPreference
           
 
Fields inherited from class wt.util.CollationKeyFactory
 
Constructor Summary
QueryCollationKeyFactory()
          Construct a collation key factory for the current WTContext's locale.
QueryCollationKeyFactory(Locale locale)
          Construct a collation key factory for the given locale.
QueryCollationKeyFactory(Locale locale, String sort_preference)
          Construct a collation key factory for the the given locale.
 
Method Summary
 String getCollationString(Object obj)
          Get a collation string for the given object.
 
Methods inherited from class wt.util.CollationKeyFactory
getKey, getLocale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sortPreference

private String sortPreference
Constructor Detail

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 locale
sort_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
Method Detail

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