Package org.infinispan.query
Interface Transformer
-
public interface Transformer
Convert objects (cache keys only) from their original Java types to a String representation (which is suitable to be used in a Lucene index) and vice versa. Transformers are needed only for custom types. Primitive types (boxed), java.lang.String, java.util.UUID and byte arrays are internally handled without the need of a user-supplied Transformer.Implementations must be thread-safe! It is recommended they are also stateless.
- Since:
- 4.0
- Author:
- Manik Surtani
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
fromString(java.lang.String str)
Transforms a String into an Object.java.lang.String
toString(java.lang.Object obj)
Transforms an Object into a String.
-
-
-
Method Detail
-
fromString
java.lang.Object fromString(java.lang.String str)
Transforms a String into an Object.- Parameters:
str
- cannot be null- Returns:
- the Object that is encoded in the given String
-
toString
java.lang.String toString(java.lang.Object obj)
Transforms an Object into a String.- Parameters:
obj
- cannot be null- Returns:
- the String representation of the object
-
-