Spring Data Solr

org.springframework.data.solr.core.mapping
Class SimpleSolrPersistentEntity<T>

java.lang.Object
  extended by org.springframework.data.mapping.model.BasicPersistentEntity<T,SolrPersistentProperty>
      extended by org.springframework.data.solr.core.mapping.SimpleSolrPersistentEntity<T>
Type Parameters:
T -
All Implemented Interfaces:
Aware, ApplicationContextAware, MutablePersistentEntity<T,SolrPersistentProperty>, PersistentEntity<T,SolrPersistentProperty>, SolrPersistentEntity<T>

public class SimpleSolrPersistentEntity<T>
extends BasicPersistentEntity<T,SolrPersistentProperty>
implements SolrPersistentEntity<T>, ApplicationContextAware

Solr specific PersistentEntity implementation holding eg. name of solr core.

Author:
Christoph Strobl, Francisco Spaeth

Constructor Summary
SimpleSolrPersistentEntity(TypeInformation<T> typeInformation)
           
 
Method Summary
 Float getBoost()
           
 String getSolrCoreName()
          Get the core's name for this entity.
 boolean isBoosted()
           
 void setApplicationContext(ApplicationContext applicationContext)
           
 
Methods inherited from class org.springframework.data.mapping.model.BasicPersistentEntity
addAssociation, addPersistentProperty, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdProperty, getName, getPersistenceConstructor, getPersistentProperty, getPersistentProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isConstructorArgument, isIdProperty, isVersionProperty, returnPropertyIfBetterIdPropertyCandidateOrNull, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.data.mapping.PersistentEntity
doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdProperty, getName, getPersistenceConstructor, getPersistentProperty, getPersistentProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isConstructorArgument, isIdProperty, isVersionProperty
 

Constructor Detail

SimpleSolrPersistentEntity

public SimpleSolrPersistentEntity(TypeInformation<T> typeInformation)
Method Detail

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
Specified by:
setApplicationContext in interface ApplicationContextAware
Throws:
BeansException

getSolrCoreName

public String getSolrCoreName()
Description copied from interface: SolrPersistentEntity
Get the core's name for this entity.

Specified by:
getSolrCoreName in interface SolrPersistentEntity<T>
Returns:

isBoosted

public boolean isBoosted()
Specified by:
isBoosted in interface SolrPersistentEntity<T>
Returns:
true if this entity is boosted

getBoost

public Float getBoost()
Specified by:
getBoost in interface SolrPersistentEntity<T>
Returns:
entity's boost value if SolrPersistentEntity.isBoosted(), null otherwise

Spring Data Solr

Copyright © 2011-2014-2014 Pivotal Software, Inc.. All Rights Reserved.