ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James, Steven" <steven.ja...@logicacmg.com>
Subject RE: Tutorial questions
Date Wed, 04 Apr 2007 15:47:15 GMT
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:

How to return the field's value from the table I select?

Thanks in advance.


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.

View raw message