org.hibernate.search.bridge.util.impl
Class ContextualExceptionBridge

java.lang.Object
  extended by org.hibernate.search.bridge.util.impl.ContextualExceptionBridge
All Implemented Interfaces:
FieldBridge
Direct Known Subclasses:
ContextualException2WayBridge

public class ContextualExceptionBridge
extends Object
implements FieldBridge

Wrap the exception with an exception provide contextual feedback

Author:
Emmanuel Bernard

Field Summary
protected  Class<?> clazz
           
protected  String fieldName
           
protected  List<org.hibernate.annotations.common.reflection.XMember> path
           
 
Constructor Summary
ContextualExceptionBridge()
           
 
Method Summary
protected  BridgeException buildBridgeException(Exception e, String method)
           
 ContextualExceptionBridge popMethod()
           
 ContextualExceptionBridge pushMethod(org.hibernate.annotations.common.reflection.XMember xMember)
           
 void set(String name, Object value, org.apache.lucene.document.Document document, LuceneOptions luceneOptions)
          Manipulate the document to index the given value.
 ContextualExceptionBridge setClass(Class<?> clazz)
           
 ContextualExceptionBridge setFieldBridge(FieldBridge delegate)
           
 ContextualExceptionBridge setFieldName(String fieldName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clazz

protected Class<?> clazz

path

protected List<org.hibernate.annotations.common.reflection.XMember> path

fieldName

protected String fieldName
Constructor Detail

ContextualExceptionBridge

public ContextualExceptionBridge()
Method Detail

setFieldBridge

public ContextualExceptionBridge setFieldBridge(FieldBridge delegate)

setClass

public ContextualExceptionBridge setClass(Class<?> clazz)

setFieldName

public ContextualExceptionBridge setFieldName(String fieldName)

buildBridgeException

protected BridgeException buildBridgeException(Exception e,
                                               String method)

set

public void set(String name,
                Object value,
                org.apache.lucene.document.Document document,
                LuceneOptions luceneOptions)
Description copied from interface: FieldBridge
Manipulate the document to index the given value.

A common implementation is to add a Field with the given name to document following the parameters luceneOptions if the value is not null. {code} String fieldValue = convertToString(value); luceneOptions.addFieldToDocument(name, fieldValue, document); {code}

Specified by:
set in interface FieldBridge
Parameters:
name - The field to add to the Lucene document
value - The actual value to index
document - The Lucene document into which we want to index the value.
luceneOptions - Contains the parameters used for adding value to the Lucene document.

pushMethod

public ContextualExceptionBridge pushMethod(org.hibernate.annotations.common.reflection.XMember xMember)

popMethod

public ContextualExceptionBridge popMethod()


Copyright © 2006-2012 Hibernate. All Rights Reserved.