Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.cache.search
Class Transformer

    java.lang.Object
      org.jboss.cache.search.Transformer

    public class Transformer

extends Object

Author:
  Navin Surtani - navin@surtani.org This class is one that does all the 'conversion' work between JBossCache and Hibernate Search. This is where users can switch from Fqn and key to a documentId and vice versa. If the Fqn is in the form /a/b/c and the key - which has to be a String - is keystring; the documentId - which is also a String - will be "Fqn=[/a/b/c]Key=[keystring]"

Constructor Summary
`Transformer()`

Method Summary
`static String` | `generateId(org.jboss.cache.Fqn fqn, String key)` Generates the documentId from an Fqn, key combination.
`static org.jboss.cache.Fqn` | `getFqn(String docId)` Takes in the documentId string from the user and will return the Fqn from the Fqn, key combination.
`static String` | `getKey(String docId)` Takes in the documentId string from the user and will return the key from the Fqn, key combination.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Transformer

    public Transformer()

Method Detail

### getKey

    public static String getKey(String docId)

  Takes in the documentId string from the user and will return the key from the Fqn, key combination.

  Parameters:
    `docId` - - for the keystring to be obtained
  Returns:
    keystring.

### getFqn

    public static org.jboss.cache.Fqn getFqn(String docId)

  Takes in the documentId string from the user and will return the Fqn from the Fqn, key combination.

  Parameters:
    `docId` - - for the Fqn to be obtained
  Returns:
    Fqn from the documentId.

### generateId

    public static String generateId(org.jboss.cache.Fqn fqn,
                                    String key)
                             throws InvalidFqnException,
                                    InvalidKeyException

  Generates the documentId from an Fqn, key combination.

  Parameters:
    `fqn` - - standard call Fqn.fromString()
    `key` - - cannot be an object.
  Returns:
    documentId String to be given to Lucene.
  Throws:
    `InvalidFqnException`
    `InvalidKeyException`

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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