wt.fc
Class IdentityCollationKeyFactory

java.lang.Object
  extended bywt.util.CollationKeyFactory
      extended bywt.fc.IdentityCollationKeyFactory

public class IdentityCollationKeyFactory
extends CollationKeyFactory

A collation key factory for Identified objects. This is used to sort the objects by the string value of their getIdentificationObject().getIdentity() string or for WTObject's, by their getIdentity() string. Usage example:

   IdentityCollationKeyFactory keyFactory = new IdentityCollationKeyFactory( );
   QueryResult result = ...;  // perform query
   SortedEnumeration enum = new SortedEnumeration( result, keyFactory );
 


Supported API: true

Extendable: false


Field Summary
private static String versionID
           
 
Fields inherited from class wt.util.CollationKeyFactory
 
Constructor Summary
IdentityCollationKeyFactory()
          Construct a collation key factory for the current WTContext's locale.
IdentityCollationKeyFactory(Locale locale)
          Construct a collation key factory for 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

versionID

private static final String versionID
See Also:
Constant Field Values
Constructor Detail

IdentityCollationKeyFactory

public IdentityCollationKeyFactory()
Construct a collation key factory for the current WTContext's locale.


IdentityCollationKeyFactory

public IdentityCollationKeyFactory(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