[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    RE: Hibernate and smart search
From:       "Nicolas de Amorrortu" <namorrortu () interbanking ! com ! ar>
Date:       2004-04-30 11:42:18
Message-ID: 000c01c42ea8$313903a0$1901cd0a () SIB26
[Download RAW message or body]

Take a look to the Criterion Object at Hibernate 
(http://www.hibernate.org/hib_docs/reference/en/html_single/#querycriter
ia).
You can implement something like a "Chain of Responsiblity" where each
Handler is an adaptor to a Criterion (using Expression). You can define
one Adaptor for each Expression, so then you can externalize (¿?) your
criteria definition to an XML File.

saludos,
Nicolás

-----Original Message-----
From: snpe [mailto:snpe@snpe.co.yu] 
Sent: Viernes, 30 de Abril de 2004 02:19 a.m.
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

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las \
personas direccionadas en el mail y puede contener informacion (i)de propiedad \
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier \
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la \
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o \
divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion \
legal alguna por cualquier informacion incorrecta o alterada contenida en este \
mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad \
de destruirlo inmediatamente junto con todas las copias del mismo, notificando al \
remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni \
ninguna de sus partes si usted no es el destinatario. Muchas gracias.



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic