eu.etaxonomy.cdm.hibernate.search
Class DescriptionBaseClassBridge

java.lang.Object
  extended by eu.etaxonomy.cdm.hibernate.search.AbstractClassBridge
      extended by eu.etaxonomy.cdm.hibernate.search.DescriptionBaseClassBridge
All Implemented Interfaces:
org.hibernate.search.bridge.FieldBridge

public class DescriptionBaseClassBridge
extends AbstractClassBridge

This class bridge is needed to overcome limitations in hibernate search with polymorphism on associations. See:

  1. "Support runtime polymorphism on associations (instead of defining the indexed properties based on the returned type" (https://hibernate.onjira.com/browse/HSEARCH-438)
  2. https://forum.hibernate.org/search.php?keywords=indexembedded+subclass&terms=all &author=&sc=1&sf=all&sk=t&sd=d&sr=posts&st=0&ch=300&t=0&submit=Search
DEVELOPER NOTE: the problem is in org.hibernate.search.engine.DocumentBuilderContainedEntity#initializeClass() which is not taking subclasses into account, so the taxon field defined in TaxonDescription is not registered in the propertiesMetdata

Author:
Andreas Kohlbecker

Field Summary
 
Fields inherited from class eu.etaxonomy.cdm.hibernate.search.AbstractClassBridge
idFieldBridge, idFieldOptions, sortFieldOptions
 
Constructor Summary
DescriptionBaseClassBridge()
           
 
Method Summary
 void set(String name, Object entity, org.apache.lucene.document.Document document, org.hibernate.search.bridge.LuceneOptions luceneOptions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptionBaseClassBridge

public DescriptionBaseClassBridge()
Method Detail

set

public void set(String name,
                Object entity,
                org.apache.lucene.document.Document document,
                org.hibernate.search.bridge.LuceneOptions luceneOptions)
Specified by:
set in interface org.hibernate.search.bridge.FieldBridge
Specified by:
set in class AbstractClassBridge


Copyright © 2007-2013 EDIT. All Rights Reserved.