org.springframework.data.solr.repository.support
Class SimpleSolrRepository<T,ID extends Serializable>
java.lang.Object
org.springframework.data.solr.repository.support.SimpleSolrRepository<T,ID>
- Type Parameters:
T -
- All Implemented Interfaces:
- CrudRepository<T,ID>, PagingAndSortingRepository<T,ID>, Repository<T,ID>, SolrCrudRepository<T,ID>, SolrRepository<T,ID>
public class SimpleSolrRepository<T,ID extends Serializable>
- extends Object
- implements SolrCrudRepository<T,ID>
Solr specific repository implementation. Likely to be used as target within SolrRepositoryFactory
- Author:
- Christoph Strobl
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSolrRepository
public SimpleSolrRepository()
SimpleSolrRepository
public SimpleSolrRepository(SolrOperations solrOperations)
- Parameters:
solrOperations - must not be null
SimpleSolrRepository
public SimpleSolrRepository(SolrEntityInformation<T,?> metadata,
SolrOperations solrOperations)
- Parameters:
metadata - must not be nullsolrOperations - must not be null
SimpleSolrRepository
public SimpleSolrRepository(SolrOperations solrOperations,
Class<T> entityClass)
- Parameters:
solrOperations - must not be nullentityClass -
findOne
public T findOne(ID id)
- Specified by:
findOne in interface CrudRepository<T,ID extends Serializable>
findAll
public Iterable<T> findAll()
- Specified by:
findAll in interface CrudRepository<T,ID extends Serializable>
findAll
public Page<T> findAll(Pageable pageable)
- Specified by:
findAll in interface PagingAndSortingRepository<T,ID extends Serializable>
findAll
public Iterable<T> findAll(Sort sort)
- Specified by:
findAll in interface PagingAndSortingRepository<T,ID extends Serializable>
findAll
public Iterable<T> findAll(Iterable<ID> ids)
- Specified by:
findAll in interface CrudRepository<T,ID extends Serializable>
count
public long count()
- Description copied from interface:
SolrRepository
- Returns the number of entities available.
- Specified by:
count in interface CrudRepository<T,ID extends Serializable>- Specified by:
count in interface SolrRepository<T,ID extends Serializable>
- Returns:
- the total number of entities
count
protected long count(Query query)
save
public <S extends T> S save(S entity)
- Specified by:
save in interface CrudRepository<T,ID extends Serializable>
save
public <S extends T> Iterable<S> save(Iterable<S> entities)
- Specified by:
save in interface CrudRepository<T,ID extends Serializable>
exists
public boolean exists(ID id)
- Specified by:
exists in interface CrudRepository<T,ID extends Serializable>
delete
public void delete(ID id)
- Specified by:
delete in interface CrudRepository<T,ID extends Serializable>
delete
public void delete(T entity)
- Specified by:
delete in interface CrudRepository<T,ID extends Serializable>
delete
public void delete(Iterable<? extends T> entities)
- Specified by:
delete in interface CrudRepository<T,ID extends Serializable>
deleteAll
public void deleteAll()
- Specified by:
deleteAll in interface CrudRepository<T,ID extends Serializable>
getIdFieldName
public final String getIdFieldName()
setIdFieldName
public final void setIdFieldName(String idFieldName)
getEntityClass
public Class<T> getEntityClass()
setEntityClass
public final void setEntityClass(Class<T> entityClass)
setSolrOperations
public final void setSolrOperations(SolrOperations solrOperations)
getSolrOperations
public final SolrOperations getSolrOperations()
Copyright © 2011-2014-2014 Pivotal. All Rights Reserved.