ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ohsuria@gmail.com" <ohsu...@gmail.com>
Subject Re: Tutorial questions
Date Thu, 05 Apr 2007 14:48:27 GMT
Thank you very much..
it is working. :)

Ohsuria

On Wednesday 04 April 2007 22:47, James, Steven wrote:
> Well you need to cast the returned from the list to an appropriate type.
> Therefore in your for loop do the cast like so
>
> out.println("Selected " + list.size() + " records.<br><br>");
> for (int i=0; i < list.size(); i++) {
>       MyType obj = (MyType)list.get(i);
> 	out.println( obj.mymethod + "<br>");
> }
>
> -----Original Message-----
> From: ohsuria@gmail.com [mailto:ohsuria@gmail.com]
> Sent: Mittwoch, 4. April 2007 17:48
> To: user-java@ibatis.apache.org
> Subject: Tutorial questions
>
> Hi all,
>
> I am trying to develop a web using jsp and ibatis.
> I am new for this environment so this would be a tutorial question ;).
>
> I use jsp and AbatorForEclipse1.0 for the code generation.
> it creates crud classes.
> but I cannot find the class for queries all records from the table.
>
> May I use SelectByExample()?
>
> when I try this code:
> myTableExample objExample = new myTableExample();
>
> list =  myTableDAO.selectByExample(objExample);
>
> out.println("Selected " + list.size() + " records.<br><br>");
> for (int i=0; i < list.size(); i++) {
> 	out.println(list.get(i) + "<br>");
> }
>
>
> it returns:
> mysql.model.myTable@9abce9
> mysql.model.myTable@e8a0cd
> mysql.model.myTable@95215b
> mysql.model.myTable@c10de0
>
> How to return the field's value from the table I select?
>
> Thanks in advance.
>
> OHSuria
>
>
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender. Thank you.

Mime
View raw message