SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-733
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Joe Zulli
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Compass

Ability to configure multiple index query providers via Spring

Created: 07/Oct/08 03:46 PM   Updated: 07/Oct/08 07:37 PM
Component/s: Compass::Gps, Compass::Spring
Affects Version/s: 2.1.0 M4
Fix Version/s: 2.1.0 RC

Environment: Compass 2.1.0 M4, Spring 2.5.5, Hibernate 3.2


 Description  « Hide
This issue is in relation to CMP-643. In that issue, Stephan asked for a way to inject custom index queries via Spring in a fashion similar to this:

<bean id="" class="...HibernateGpsDevice">
<property name="indexProviders">
<map>
<entry key="...PersonImpl">
<value>from PersonImpl p where p.type = 0</value>
</entry>
</map>
</property>
</bean>

A new class called HibernateEntityIndexInfo was created to address this issue, but the problem is that you can only inject one one. So if you have multiple types that are indexed, and you want to have one index query provider for each type you are out of luck.

One simple solution would be to change the method:

void setindexEntityInfo(HibernateEntityIndexInfo indexInfo)

in HibernateGpsDevice to this:

void setindexEntityInfo(List<HibernateEntityIndexInfo> indexInfos)

Essentially, just changing the argument of the setter method from a single entity to a collection.

Thanks,
Joe



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 07/Oct/08 07:37 PM
Fixed. Added: setindexEntityInfos(HibernateEntityIndexInfo[] indexInfos).