新拿到一个seam项目,导入到eclipse里面,提示一个错误,大家帮我看看什么原因。
@SuppressWarnings("unchecked")
@Factory("bottomList")
public void bottomList() {
//String sql = "select showDiary from ShowDiary showDiary left join showDiary.contentType contentType where showDiary.deleted=0 and showDiary.publish=1 and contentType.levelKey like '01__' ";
String sqls = "select sd.show_diary_id,sd.title,sd.weburl,ct.type_name,ct.level_key from show_diary sd LEFT JOIN content_type ct on ct.type_id=sd.content_type_id where ct.level_key like '01__' and sd.deleted=0 and sd.publish=1";
List<Object[]> list = getEntityManager().createNativeQuery(sqls).getResultList();
if (list.size() != 0) {
showDiaryTempList = new ArrayList<ShowDiaryTemp>();
for (int i = 0; i < list.size(); i++) {
Object[] obj = (Object[]) list.get(i);
ShowDiaryTemp showDiaryTemp = new ShowDiaryTemp();
showDiaryTemp.setShowDiaryId(obj[0].toString());
showDiaryTemp.setContentName(obj[1].toString());
showDiaryTemp.setWebUrl(obj[2].toString());
showDiaryTemp.setLevelKey(obj[4].toString());
showDiaryTemp.setTitle(obj[3].toString());
showDiaryTempList.add(showDiaryTemp);
showDiaryTemp = null;
}
}
}