posts - 431,  comments - 344,  trackbacks - 0
public List<Meeting> getRecentlyMeetingsByAudit(Long candidateId, Long ownerId) {
    List<Meeting> meetings = new ArrayList<Meeting>();
    meetings = mgr.createQuery("select new com.integral7.ejb3.investigations.Meeting(m.id, m.scheduledDate, m.type.name, m.description, " +
        "case when exists(select id from MeetingAudit ma where ma.meeting = m and ma.audit.id = ?0) then True else False end) " +
        " from Meeting m " +
        " where m.owner.id = ?1 and m.scheduledDate >= ?2 order by m.scheduledDate asc")
        .setParameter(0, candidateId)
        .setParameter(1, ownerId)
        .setParameter(2, DateUtils.convertToBeginningOfDay(new Date())).getResultList();
    return meetings;
 }

这里主要注意TrueFalse 首字母必须大写其余小写.
posted on 2008-08-29 23:38 周锐 阅读(798) 评论(0)  编辑  收藏 所属分类: EJBHibernateSQL Server

只有注册用户登录后才能发表评论。


网站导航: