org.hibernate.search.query.collector.impl
Class TwoWayTransformingFieldCacheCollector
java.lang.Object
org.apache.lucene.search.Collector
org.hibernate.search.query.collector.impl.FieldCacheCollector
org.hibernate.search.query.collector.impl.TwoWayTransformingFieldCacheCollector
public class TwoWayTransformingFieldCacheCollector
- extends FieldCacheCollector
Wraps a FieldCacheCollector in such a way that getValue(int)
returns objects as transformed
by a TwoWayStringBridge
to transform from String form to the object.
- Author:
- Sanne Grinovero (C) 2011 Red Hat Inc.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TwoWayTransformingFieldCacheCollector
public TwoWayTransformingFieldCacheCollector(FieldCacheCollector delegate,
TwoWayStringBridge twoWayStringBridge)
- Parameters:
delegate
- Actually uses the delegate Collector implementationtwoWayStringBridge
- Converts returned values using this TwoWayStringBridge.stringToObject(String)
collect
public void collect(int doc)
throws IOException
- Specified by:
collect
in class FieldCacheCollector
- Throws:
IOException
setNextReader
public void setNextReader(org.apache.lucene.index.IndexReader reader,
int docBase)
throws IOException
- Specified by:
setNextReader
in class FieldCacheCollector
- Throws:
IOException
getValue
public Object getValue(int docId)
- Specified by:
getValue
in class FieldCacheCollector
Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved