org.infinispan.query.backend
Class KeyTransformationHandler

java.lang.Object
  extended by org.infinispan.query.backend.KeyTransformationHandler

public class KeyTransformationHandler
extends Object

This transforms arbitrary keys to a String which can be used by Lucene as a document identifier, and vice versa.

There are 2 approaches to doing so; one for SimpleKeys: Java primitives (and their object wrappers) and Strings, and one for custom, user-defined types that could be used as keys.

For SimpleKeys, users don't need to do anything, these keys are automatically transformed by this class.

For user-defined keys, only types annotated with @Transformable, and declaring an appropriate Transformer implementation, are supported.

Since:
4.0
Author:
Manik Surtani
See Also:
Transformable, Transformer

Constructor Summary
KeyTransformationHandler()
           
 
Method Summary
static String keyToString(Object key)
           
static Object stringToKey(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyTransformationHandler

public KeyTransformationHandler()
Method Detail

stringToKey

public static Object stringToKey(String s)

keyToString

public static String keyToString(Object key)


Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.