public abstract class ProjectingLuceneAccessor extends LuceneTemplate implements BeanClassLoaderAware, BeanFactoryAware, ProjectingLuceneOperations
ProjectingLuceneAccessor is an abstract class supporting implementations of
the ProjectingLuceneOperations interface encapsulating common functionality
necessary to execute Lucene queries and work with application domain object views.ClassLoader,
BeanClassLoaderAware,
BeanFactory,
BeanFactoryAware,
ProjectingLuceneOperations,
PdxInstanceMethodInterceptorFactory,
ProjectionFactory,
SpelAwareProxyProjectionFactory,
Region,
LuceneIndex,
LuceneQuery,
LuceneQueryFactory,
LuceneService,
LuceneServiceProviderLuceneAccessor.LuceneQueryExecutor<T>DEFAULT_PAGE_SIZE, DEFAULT_RESULT_LIMIT| Constructor and Description |
|---|
ProjectingLuceneAccessor()
Constructs a default, uninitialized instance of the
ProjectingLuceneAccessor. |
ProjectingLuceneAccessor(org.apache.geode.cache.lucene.LuceneIndex luceneIndex)
Constructs an instance of the
ProjectingLuceneAccessor initialized with the given LuceneIndex
used to perform Lucene queries (searches). |
ProjectingLuceneAccessor(String indexName,
org.apache.geode.cache.Region<?,?> region)
Constructs an instance of the
ProjectingLuceneAccessor initialized with the given Lucene index name
and Region reference upon which Lucene queries are executed. |
ProjectingLuceneAccessor(String indexName,
String regionPath)
Constructs an instance of the
ProjectingLuceneAccessor initialized with the given Lucene index name
and Region reference upon which Lucene queries are executed. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected ClassLoader |
getBeanClassLoader()
Returns a reference to the
ClassLoader used by the Spring container
to load bean class definitions. |
protected BeanFactory |
getBeanFactory()
Returns a reference to the Spring
container. |
protected ProjectionFactory |
getProjectionFactory()
Returns the Spring Data
ProjectionFactory used to create projections out of query results. |
<T,K,V> List<T> |
project(List<org.apache.geode.cache.lucene.LuceneResultStruct<K,V>> source,
Class<T> projectionType) |
<T,K,V> T |
project(org.apache.geode.cache.lucene.LuceneResultStruct<K,V> source,
Class<T> projectionType) |
<T> T |
project(Object source,
Class<T> projectionType) |
protected ProjectionFactory |
resolveProjectionFactory()
Null-safe method to resolve the Spring Data
ProjectionFactory used to create projections
out of the Lucene query results. |
void |
setBeanClassLoader(ClassLoader beanClassLoader) |
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setProjectionFactory(ProjectionFactory projectionFactory)
Sets the Spring Data
ProjectionFactory used to create projections out of query results. |
protected ProjectionFactory |
setThenGetProjectionFactory(ProjectionFactory projectionFactory) |
query, query, query, query, queryForKeys, queryForKeys, queryForValues, queryForValuescreateLuceneQueryFactory, createLuceneQueryFactory, createLuceneQueryFactory, doFind, getCache, getIndexName, getLuceneIndex, getLuceneService, getRegion, getRegionPath, resolveCache, resolveIndexName, resolveLuceneService, resolveLuceneService, resolveRegionPath, setCache, setIndexName, setLuceneIndex, setLuceneService, setRegion, setRegionPathclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitquery, query, query, query, query, queryquery, query, query, query, query, query, queryForKeys, queryForKeys, queryForKeys, queryForKeys, queryForValues, queryForValues, queryForValues, queryForValuespublic ProjectingLuceneAccessor()
ProjectingLuceneAccessor.public ProjectingLuceneAccessor(org.apache.geode.cache.lucene.LuceneIndex luceneIndex)
ProjectingLuceneAccessor initialized with the given LuceneIndex
used to perform Lucene queries (searches).luceneIndex - LuceneIndex used in Lucene queries.LuceneIndexpublic ProjectingLuceneAccessor(String indexName, org.apache.geode.cache.Region<?,?> region)
ProjectingLuceneAccessor initialized with the given Lucene index name
and Region reference upon which Lucene queries are executed.indexName - String containing the name of the LuceneIndex used in Lucene queries.region - Region on which Lucene queries are executed.Regionpublic ProjectingLuceneAccessor(String indexName, String regionPath)
ProjectingLuceneAccessor initialized with the given Lucene index name
and Region reference upon which Lucene queries are executed.public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class LuceneAccessorExceptionresolveProjectionFactory()protected ProjectionFactory resolveProjectionFactory()
ProjectionFactory used to create projections
out of the Lucene query results.ProjectionFactory used to create projections
out of the Lucene query results.ProjectionFactory,
SpelAwareProxyProjectionFactory,
afterPropertiesSet()public void setBeanClassLoader(ClassLoader beanClassLoader)
setBeanClassLoader in interface BeanClassLoaderAwareprotected ClassLoader getBeanClassLoader()
ClassLoader used by the Spring container
to load bean class definitions.ClassLoader used by the Spring container
to load bean class definitions.BeanClassLoaderAware.setBeanClassLoader(ClassLoader),
ClassLoaderpublic void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory in interface BeanFactoryAwareBeansExceptionprotected BeanFactory getBeanFactory()
container.container.BeanFactoryAware.setBeanFactory(BeanFactory),
BeanFactoryprotected ProjectionFactory setThenGetProjectionFactory(ProjectionFactory projectionFactory)
public void setProjectionFactory(ProjectionFactory projectionFactory)
ProjectionFactory used to create projections out of query results.projectionFactory - Spring Data ProjectionFactory used to created projects out of query results.ProjectionFactoryprotected ProjectionFactory getProjectionFactory()
ProjectionFactory used to create projections out of query results.ProjectionFactory used to created projects out of query results.ProjectionFactorypublic <T,K,V> List<T> project(List<org.apache.geode.cache.lucene.LuceneResultStruct<K,V>> source, Class<T> projectionType)
public <T,K,V> T project(org.apache.geode.cache.lucene.LuceneResultStruct<K,V> source,
Class<T> projectionType)
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.