|
From: =?iso-8859-1?Q?<jp....@ti...> - 2003-07-09 17:19:44
|
Is simply the MappingSqlQueryWithParameters for me?=0D=0A=0D=0AJean-Pierr= e=0D=0A=0D=0A---------- Initial Header -----------=0D=0A=0D=0AFrom := spr...@li...=0D=0ATo := spr...@li...=0D=0ACc : =0D=0A= Date : Wed, 9 Jul 2003 19:12:24 +0200=0D=0ASubject : [Springframewo= rk-developer] Locale in rowmap?=0D=0A=0D=0AHi everyone,=0D=0A=0D=0AI have= a remaining issue with the JDBC package. When the application is Locale = aware, we would often have the object read from the database and/or sub-o= bjects localized for the user to serve.=0D=0A=0D=0AI see two approachs:=0D= =0A=0D=0A1) create an object having data for all supported languages.=0D=0A= 2) knowing the user Locale, pick from the database only the Locale matche= d data.=0D=0A=0D=0AThe approach 1 will have a performance drawback as all= objects contain unused data. The bean getters must also have a Locale pa= rameter. In views, it will be a nightmare.=0D=0A=0D=0AThe approach 2 seem= s to me far better. But in the rowmap method, the User Locale has to be k= nown to properly set the object. And here is the issue. For time being, I= declare a 'run' method in the MappingSqlQuery subclass which set a Local= e class property and call execute with its others arguments. The method m= ust be synchronized to be threadsafe as I use a class variable. This work= s, but I guess synchronizing the request is not a good long term solution= due to the performance impact.=0D=0A=0D=0AWhat could be very cool in th= is situation is an execute method taking a Locale parameter, just to pass= on the rowmap method.=0D=0A=0D=0AIt would be, as I see, only a matter of= adding signatures on the 'execute' and 'rowmap' methods for having ones = with Locale transport.=0D=0A=0D=0AWhat is your feel about this? Could I g= o for these adds? Has anyone a better solution to propose?=0D=0A=0D=0AReg= ards,=0D=0AJean-Pierre=0D=0A=0D=0A=0D=0A********** L'ADSL A 20 EUR/MOIS**= ********=0D=0ATiscali propose l'ADSL le moins cher du march=E9 : 20 EUR/m= ois et le modem ADSL offert ! =0D=0APour profiter de cette offre exceptio= nnelle, cliquez ici : http://register.tiscali.fr/adsl/=0D=0AOffre soumise= =E0 conditions.=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A---------------------------= ----------------------------=0D=0AThis SF.Net email sponsored by: Parasof= t=0D=0AError proof Web apps, automate testing & more.=0D=0ADownload & eva= l WebKing and get a free book.=0D=0Awww.parasoft.com/bulletproofapps=0D=0A= _______________________________________________=0D=0ASpringframework-deve= loper mailing lis...@li...=0D= =0Ahttps://lists.sourceforge.net/lists/listinfo/springframework-developer= =0D=0A=0A=0A********** L'ADSL A 20 EUR/MOIS**********=0ATiscali propose l= 'ADSL le moins cher du march=E9 : 20 EUR/mois et le modem ADSL offert ! =0A= Pour profiter de cette offre exceptionnelle, cliquez ici : http://registe= r.tiscali.fr/adsl/=0AOffre soumise =E0 conditions.=0A |