Spring Data Solr

org.springframework.data.solr.repository.support
Class MappingSolrEntityInformation<T,ID extends Serializable>

java.lang.Object
  extended by org.springframework.data.repository.core.support.AbstractEntityInformation<T,ID>
      extended by org.springframework.data.solr.repository.support.MappingSolrEntityInformation<T,ID>
Type Parameters:
T -
ID -
All Implemented Interfaces:
EntityInformation<T,ID>, EntityMetadata<T>, SolrEntityInformation<T,ID>

public class MappingSolrEntityInformation<T,ID extends Serializable>
extends AbstractEntityInformation<T,ID>
implements SolrEntityInformation<T,ID>

Solr specific implementation of AbstractEntityInformation

Author:
Christoph Strobl

Constructor Summary
MappingSolrEntityInformation(SolrPersistentEntity<T> entity)
           
MappingSolrEntityInformation(SolrPersistentEntity<T> entity, String solrCoreName)
           
 
Method Summary
 ID getId(T entity)
           
 String getIdAttribute()
          get the name of the id attribute
 Class<ID> getIdType()
           
 String getSolrCoreName()
          get the name of the solr collection the entity resides in
 
Methods inherited from class org.springframework.data.repository.core.support.AbstractEntityInformation
getJavaType, isNew
 
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.repository.core.EntityInformation
isNew
 
Methods inherited from interface org.springframework.data.repository.core.EntityMetadata
getJavaType
 

Constructor Detail

MappingSolrEntityInformation

public MappingSolrEntityInformation(SolrPersistentEntity<T> entity)

MappingSolrEntityInformation

public MappingSolrEntityInformation(SolrPersistentEntity<T> entity,
                                    String solrCoreName)
Method Detail

getId

public ID getId(T entity)
Specified by:
getId in interface EntityInformation<T,ID extends Serializable>

getIdType

public Class<ID> getIdType()
Specified by:
getIdType in interface EntityInformation<T,ID extends Serializable>

getIdAttribute

public String getIdAttribute()
Description copied from interface: SolrEntityInformation
get the name of the id attribute

Specified by:
getIdAttribute in interface SolrEntityInformation<T,ID extends Serializable>
Returns:

getSolrCoreName

public String getSolrCoreName()
Description copied from interface: SolrEntityInformation
get the name of the solr collection the entity resides in

Specified by:
getSolrCoreName in interface SolrEntityInformation<T,ID extends Serializable>
Returns:

Spring Data Solr

Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.