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
,
LuceneServiceProvider
LuceneAccessor.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, queryForValues
createLuceneQueryFactory, createLuceneQueryFactory, createLuceneQueryFactory, doFind, getCache, getIndexName, getLuceneIndex, getLuceneService, getRegion, getRegionPath, resolveCache, resolveIndexName, resolveLuceneService, resolveLuceneService, resolveRegionPath, setCache, setIndexName, setLuceneIndex, setLuceneService, setRegion, setRegionPath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
query, query, query, query, query, query
query, query, query, query, query, query, queryForKeys, queryForKeys, queryForKeys, queryForKeys, queryForValues, queryForValues, queryForValues, queryForValues
public 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.LuceneIndex
public 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.Region
public 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 InitializingBean
afterPropertiesSet
in class LuceneAccessor
Exception
resolveProjectionFactory()
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 BeanClassLoaderAware
protected 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)
,
ClassLoader
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
protected BeanFactory getBeanFactory()
container
.container
.BeanFactoryAware.setBeanFactory(BeanFactory)
,
BeanFactory
protected 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.ProjectionFactory
protected ProjectionFactory getProjectionFactory()
ProjectionFactory
used to create projections out of query results.ProjectionFactory
used to created projects out of query results.ProjectionFactory
public <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.