struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snpe <s...@snpe.co.yu>
Subject Re: Hibernate and smart search
Date Fri, 30 Apr 2004 17:05:35 GMT
You don't understand me ( probably)
I don't want set criteria for every class - I want features btw search, like load, find, save
etc
session.search(PermanentClass.class,BeanClass.class)
for any PermanentClass and any BeanClass
method search find properties in BeanClass like properties in PermanentClass and automatic
make query 

regards

p.s.
this is question for hiberante list, sorry for mistake
On Friday 30 April 2004 11:42 am, Nicolas de Amorrortu wrote:
> 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
> 

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


Mime
View raw message