Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Dev List »

[hibernate-dev] [OGM] Ogm mass indexer,
how to convert Tuple/EntityKey to Entity/Id?

Davide D'Alto

2013-03-01

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello,
I'm trying to create a mass indexer that could work with OGM.
The idea is to have a way to scan all the element of a certain type in
the data store and index them, this way it would be possible to create
an index starting from an existing populated data store.

The first prototype idea is to add a method to the GridDialect, something like:

GridDialect#forEachTuple(Consumer consumer, String... tableName)

Where the Consumer is an interface with a method Consumer#consume(Tuple tuple)

The consumer will execute the indexing of the found tuple.

The problem that I have now is how to convert the Tuple to the
corresponding entity so that I can index it using hibernate search.
An alternative idea would be to use the EntityKey and obtain the id
instead of using the Tuple.

Is there a method somewhere that I can use to obtain an entity from a Tuple?

Thanks,
Davide
_______________________________________________
hibernate-dev mailing list
hibernate-dev@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-dev
©2008 gg3721.com - Jax Systems, LLC, U.S.A.