You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Friedman <hu...@ix.netcom.com> on 2004/04/30 06:04:16 UTC

RE: Hibernate and smart search

Sounds like you might be able to do that
with a couple of IF statements across
some named queries, as long as you don't
have too many classes.  If you're looking
for something more dynamic, you might want
to post to http://forums.hibernate.org for
any possibly expert Hibernate help.

Regards,
David

-----Original Message-----
From: snpe [mailto:snpe@snpe.co.yu]
Sent: Friday, April 30, 2004 1:19 AM
To: 'Struts Users Mailing List'
Subject: Hibernate and smart search


Hello
	I have bean with table propeties (web or swing form field) and I want next
seach :

- if property is null no seach for this property
- if property is not null create query for value of property (where clause
in table)
- if value property btw 'TH%' or 'TH_' (value with character %, _ ..) then
use LIKE clause
- if value is '>xxx' query is "where prop > 'xxx' "
etc

I want search like
  List list = dao.search(BeanClass.class)

I can make query for any class easy, but I want this for every class

My goal is that user populate bean and with search button find rows with
populated field

Is it possible ?

regards

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org