Package wt.util

Class CollationKeyFactory

java.lang.Object
wt.util.CollationKeyFactory
Direct Known Subclasses:
AbstractValueViewCollationKeyFactory, ClassnameCollationKeyFactory, DomainRefCollationKeyFactory, FolderCollationKeyFactory, IdentityCollationKeyFactory, PrincipalCollationKeyFactory, QueryCollationKeyFactory, WTProductConfigurationCollationKeyFactory

public class CollationKeyFactory extends Object
A factory for object collation keys.

Supported API: true
Extendable: true
  • Constructor Details

    • CollationKeyFactory

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

      Supported API: true
      Parameters:
      locale - desired locale
    • CollationKeyFactory

      public CollationKeyFactory(Locale locale)
      Construct a collation key factory for the given locale.

      Supported API: true
      Parameters:
      locale - desired locale
  • Method Details

    • getLocale

      public Locale getLocale()
      Get the locale corresponding to this factory.

      Supported API: true
      Returns:
      locale specified when factory was contstructed
    • getKey

      public CollationKey getKey(Object obj)
      Get a collation key for the given object.

      Supported API: true
      Parameters:
      obj - the object
      Returns:
      collation key
    • getCollationString

      public String getCollationString(Object obj)
      Get a collation string for the given object. It is used as the source string for the collation key. This method returns obj.toString(). Subclasses should override to produce the desired collation string.

      Supported API: true
      Parameters:
      obj - the object
      Returns:
      string collation key source string