ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sundar Sankaranarayanan" <Sundar.Sankaranaraya...@phoenix.edu>
Subject RE: Problem with raw type.
Date Fri, 02 May 2008 16:16:02 GMT
List is raw type exception occurs when u declare 

List l = new ArrayList() and not
List<Object> l = new ArrayList<Object>();

This has got nothing to do with Ibatis.  


Warm Regards,
 
Sundar Sankarnarayanan
Software Engineer
@University of Phoenix

-----Original Message-----
From: Irwin, Constance [mailto:cirwin@ll.mit.edu] 
Sent: Friday, May 02, 2008 9:07 AM
To: user-java@ibatis.apache.org
Subject: RE: Problem with raw type.

Sarah,

Are you getting an exception? It looks like you are getting a warning
related to the list data structure:

                      List resultList =
DepartDao.selectByExample(DepartExample)

Btw, is this Hibernate or some other DAO code?

Connie
________________________________________
From: Sara [jdev02@telenet.be]
Sent: Friday, May 02, 2008 11:51 AM
To: user-java@ibatis.apache.org
Subject: Problem with raw type.

Hi all,

I have a question about a select query.
This is the source that I use:

  try {
      dao.DepartmentDAO DepartDao = (dao.DepartmentDAO)
DaoManagerRequester.getDaoManager().getDao(dao.DepartmentDAO.class);
      model.DepartmentExample DepartExample = new
model.DepartmentExample();
      DepartExample.createCriteria().andDepartmentcodeLike(likekey);
      List resultList = DepartDao.selectByExample(DepartExample);

      if (resultList.size() > 0) {
        departmentRow = new DepartmentRow[resultList.size()];
        for (int i = 0; i < resultList1.size(); i++) {
          etc.......

This is the warning that I get:
List is a raw type. References to generic type List<E> should be
parameterized

Would anyone be so kind to give me some information or an example to
solve this?


Regards,
Sara.


Mime
View raw message