新手求助——关于数据类型
dao里面:
public class UserDaoImpl extends JdbcDaoSupport implements IUserDao {
public List getUsers() {
String sql = "select * from user";
return getJdbcTemplate().queryForList(sql);
}
}
service里面:
public void saveToSmzxData() {
List users = userDao.getUsers();
for (int i = 0 ; i < users.size() ; i++) {
System.out.println(users.get(i));
}
}
运行结果是:
{id=1, email=flower0@pk.com, passwd=flower, nickname=flower0, regtime=2010-12-16, keyid=null, islogin=null}
{id=2, email=flower1@pk.com, passwd=flower, nickname=flower1, regtime=2010-12-16, keyid=null, islogin=null}
{id=3, email=flower2@pk.com, passwd=flower, nickname=flower2, regtime=2010-12-16, keyid=null, islogin=null}
想知道要怎样取得各属性的值呀?users.get(i)后面至于getClass(),没有getId(),getEmail()这些方法呀.....