-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: createFullTextQuery with multiple entity Class
PostPosted: Sat Jan 24, 2009 2:57 am 
Newbie

Joined: Sat Jan 24, 2009 2:19 am
Posts: 3
Hi every one

I am using hibernate search in my project.
As per the Hibernate Search API documentation
http://www.hibernate.org/hib_docs/search/api/org/hibernate/search/jpa/FullTextEntityManager.html
we can pass through mulitple entity Class as parameters to the createFullTextQuery method.

So if a book store site selling both books and magazines for example.
I need my search will works across these classes.
So this is my code for that purpose.

Code:
FullTextQuery  query=( (FullTextEntityManager) entityManager ).createFullTextQuery(luceneQuery, Book.class, Magazine.class);


My question is at, the time of getting the result from FullTextQuery by using query.getResultList() what is the data type it would be.
i need to define the type of collection by using java generics types.
Code:
List searchResult=query.getResultList();

if it is Object type meant how can know the object type at the time of iterating the collection by using h:dataTable in jsf

any help please..


by
Thiagu.m


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.