ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Goodin" <brandon.goo...@gmail.com>
Subject Re: Problem with raw type.
Date Fri, 02 May 2008 16:19:39 GMT
put the @SuppressWarnings annotation at the top of the method or type your
list.

Annotation:
@SuppressWarnings("unchecked");

Typed List:
List<Depart> resultList = DepartDao.selectByExample(DepartExample);

B

On Fri, May 2, 2008 at 10:51 AM, Sara <jdev02@telenet.be> wrote:

>  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