Author: hardy.ferentschik
Date: 2008-11-25 08:29:35 -0500 (Tue, 25 Nov 2008)
New Revision: 15612
Modified:
search/trunk/src/java/org/hibernate/search/engine/MultiClassesQueryLoader.java
search/trunk/src/java/org/hibernate/search/engine/SearchFactoryImplementor.java
search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java
search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java
search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java
Log:
HSEARCH-285
Renamed SearchFactoryImplementor.getDocumentBuilders to
getDocumentBuildersIndexedEntities
Modified: search/trunk/src/java/org/hibernate/search/engine/MultiClassesQueryLoader.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/engine/MultiClassesQueryLoader.java 2008-11-25
13:10:25 UTC (rev 15611)
+++
search/trunk/src/java/org/hibernate/search/engine/MultiClassesQueryLoader.java 2008-11-25
13:29:35 UTC (rev 15612)
@@ -35,7 +35,7 @@
// root entity could lead to quite inefficient queries in Hibernate when using
table per class
if ( entityTypes.size() == 0 ) {
//support all classes
- for( Map.Entry<Class<?>, DocumentBuilderIndexedEntity<?>> entry :
searchFactoryImplementor.getDocumentBuilders().entrySet() ) {
+ for( Map.Entry<Class<?>, DocumentBuilderIndexedEntity<?>> entry :
searchFactoryImplementor.getDocumentBuildersIndexedEntities().entrySet() ) {
//get only root entities to limit queries
if ( entry.getValue().isRoot() ) {
safeEntityTypes.add( entry.getKey() );
Modified: search/trunk/src/java/org/hibernate/search/engine/SearchFactoryImplementor.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/engine/SearchFactoryImplementor.java 2008-11-25
13:10:25 UTC (rev 15611)
+++
search/trunk/src/java/org/hibernate/search/engine/SearchFactoryImplementor.java 2008-11-25
13:29:35 UTC (rev 15612)
@@ -24,7 +24,7 @@
void setBackendQueueProcessorFactory(BackendQueueProcessorFactory
backendQueueProcessorFactory);
- Map<Class<?>, DocumentBuilderIndexedEntity<?>> getDocumentBuilders();
+ Map<Class<?>, DocumentBuilderIndexedEntity<?>>
getDocumentBuildersIndexedEntities();
<T> DocumentBuilderIndexedEntity<T>
getDocumentBuilderIndexedEntity(Class<T> entityType);
Modified:
search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java
===================================================================
---
search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java 2008-11-25
13:10:25 UTC (rev 15611)
+++
search/trunk/src/java/org/hibernate/search/event/FullTextIndexEventListener.java 2008-11-25
13:29:35 UTC (rev 15612)
@@ -59,7 +59,7 @@
searchFactoryImplementor = ContextHolder.getOrBuildSearchFactory( cfg );
String indexingStrategy = searchFactoryImplementor.getIndexingStrategy();
if ( "event".equals( indexingStrategy ) ) {
- used = searchFactoryImplementor.getDocumentBuilders().size() != 0;
+ used = searchFactoryImplementor.getDocumentBuildersIndexedEntities().size() != 0;
}
else if ( "manual".equals( indexingStrategy ) ) {
used = false;
@@ -73,7 +73,7 @@
public void onPostDelete(PostDeleteEvent event) {
if ( used ) {
final Class<?> entityType = event.getEntity().getClass();
- if ( searchFactoryImplementor.getDocumentBuilders().containsKey( entityType )
+ if ( searchFactoryImplementor.getDocumentBuildersIndexedEntities().containsKey(
entityType )
|| searchFactoryImplementor.getDocumentBuilderContainedEntity( entityType ) != null
) {
processWork( event.getEntity(), event.getId(), WorkType.DELETE, event );
}
Modified: search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java 2008-11-25
13:10:25 UTC (rev 15611)
+++ search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java 2008-11-25
13:29:35 UTC (rev 15612)
@@ -261,7 +261,7 @@
}
- public Map<Class<?>, DocumentBuilderIndexedEntity<?>>
getDocumentBuilders() {
+ public Map<Class<?>, DocumentBuilderIndexedEntity<?>>
getDocumentBuildersIndexedEntities() {
if ( barrier != 0 ) {
} //read barrier
return documentBuildersIndexedEntities;
@@ -336,7 +336,7 @@
public void optimize() {
if ( barrier != 0 ) {
} //read barrier
- Set<Class<?>> clazzs = getDocumentBuilders().keySet();
+ Set<Class<?>> clazzs = getDocumentBuildersIndexedEntities().keySet();
for ( Class clazz : clazzs ) {
optimize( clazz );
}
@@ -345,7 +345,7 @@
public void optimize(Class entityType) {
if ( barrier != 0 ) {
} //read barrier
- if ( !getDocumentBuilders().containsKey( entityType ) ) {
+ if ( !getDocumentBuildersIndexedEntities().containsKey( entityType ) ) {
throw new SearchException( "Entity not indexed: " + entityType );
}
List<LuceneWork> queue = new ArrayList<LuceneWork>( 1 );
Modified: search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java 2008-11-25
13:10:25 UTC (rev 15611)
+++ search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java 2008-11-25
13:29:35 UTC (rev 15612)
@@ -607,7 +607,7 @@
* TODO change classesAndSubclasses by side effect, which is a mismatch with the
Searcher return, fix that.
*/
private IndexSearcher buildSearcher(SearchFactoryImplementor searchFactoryImplementor)
{
- Map<Class<?>, DocumentBuilderIndexedEntity<?>> builders =
searchFactoryImplementor.getDocumentBuilders();
+ Map<Class<?>, DocumentBuilderIndexedEntity<?>> builders =
searchFactoryImplementor.getDocumentBuildersIndexedEntities();
List<DirectoryProvider> directories = new ArrayList<DirectoryProvider>();
Set<String> idFieldNames = new HashSet<String>();
Show replies by date