org.hibernate.search.metadata.impl
Class IndexedTypeDescriptorForUnindexedType

java.lang.Object
  extended by org.hibernate.search.metadata.impl.IndexedTypeDescriptorForUnindexedType
All Implemented Interfaces:
FieldContributor, IndexedTypeDescriptor

public class IndexedTypeDescriptorForUnindexedType
extends Object
implements IndexedTypeDescriptor

Dummy descriptor for an unindexed type

Author:
Hardy Ferentschik

Constructor Summary
IndexedTypeDescriptorForUnindexedType(Class<?> type)
           
 
Method Summary
 BoostStrategy getDynamicBoost()
           
 Set<FieldDescriptor> getFieldsForProperty(String propertyName)
          Returns the set of index descriptors for the indexed field generated by the property with the given name.
 Set<IndexDescriptor> getIndexDescriptors()
          Returns a set of IndexDescriptor instances describing Lucene index information, in particular the index name.
 FieldDescriptor getIndexedField(String fieldName)
          Retrieves the field descriptor for a given field name.
 Set<FieldDescriptor> getIndexedFields()
           
 Set<PropertyDescriptor> getIndexedProperties()
           
 PropertyDescriptor getProperty(String propertyName)
          Retrieves the property descriptor for a given property name.
 float getStaticBoost()
           
 Class<?> getType()
           
 boolean isIndexed()
           
 boolean isSharded()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexedTypeDescriptorForUnindexedType

public IndexedTypeDescriptorForUnindexedType(Class<?> type)
Method Detail

getType

public Class<?> getType()
Specified by:
getType in interface IndexedTypeDescriptor
Returns:
the type for which this descriptor provides meta information

isIndexed

public boolean isIndexed()
Specified by:
isIndexed in interface IndexedTypeDescriptor
Returns:
true if the type for this descriptor is indexed, false otherwise

isSharded

public boolean isSharded()
Specified by:
isSharded in interface IndexedTypeDescriptor
Returns:
true is this index is sharded, false otherwise

getStaticBoost

public float getStaticBoost()
Specified by:
getStaticBoost in interface IndexedTypeDescriptor
Returns:
the class boost value, 1 being the default.

getDynamicBoost

public BoostStrategy getDynamicBoost()
Specified by:
getDynamicBoost in interface IndexedTypeDescriptor
Returns:
Dynamic boost strategy. There will always be a boost strategy, but the default strategy will apply a boost of 1.0.

getIndexDescriptors

public Set<IndexDescriptor> getIndexDescriptors()
Description copied from interface: IndexedTypeDescriptor
Returns a set of IndexDescriptor instances describing Lucene index information, in particular the index name. The index name can also be used to retrieve the actual IndexManager for this index via org.hibernate.search.engine.spi.SearchFactoryImplementor#getIndexManagerHolder()#getIndexManager(String). For non sharded indexes there will be only a single IndexDescriptor. The empty set is returned for an unindexed type

Specified by:
getIndexDescriptors in interface IndexedTypeDescriptor
Returns:
a set of IndexDescriptor instances describing Lucene index information

getIndexedProperties

public Set<PropertyDescriptor> getIndexedProperties()
Specified by:
getIndexedProperties in interface IndexedTypeDescriptor
Returns:
the set of indexed properties in form of PropertyDescriptors

getProperty

public PropertyDescriptor getProperty(String propertyName)
Description copied from interface: IndexedTypeDescriptor
Retrieves the property descriptor for a given property name.

Specified by:
getProperty in interface IndexedTypeDescriptor
Parameters:
propertyName - the property name for which to return descriptor, cannot be null
Returns:
the property descriptor for the specified property name. null is returned in case a property with the specified name does not exist

getIndexedFields

public Set<FieldDescriptor> getIndexedFields()
Specified by:
getIndexedFields in interface FieldContributor
Returns:
a set of FieldDescriptors for the fields contributed by this element

getIndexedField

public FieldDescriptor getIndexedField(String fieldName)
Description copied from interface: IndexedTypeDescriptor
Retrieves the field descriptor for a given field name.

Specified by:
getIndexedField in interface IndexedTypeDescriptor
Parameters:
fieldName - the field name for which to return descriptor, cannot be null
Returns:
the field descriptor for the specified field name. null is returned in case a field with the specified name does not exist

getFieldsForProperty

public Set<FieldDescriptor> getFieldsForProperty(String propertyName)
Description copied from interface: IndexedTypeDescriptor
Returns the set of index descriptors for the indexed field generated by the property with the given name.

Specified by:
getFieldsForProperty in interface IndexedTypeDescriptor
Parameters:
propertyName - the property name, cannot be null
Returns:
the set of index descriptors for the indexed field generated by the property with the given name. The empty set is returned in case the property does not exist or does not produce any indexed fields.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2013 Red Hat Middleware, LLC. All Rights Reserved