2526272829303132
public void deleteFriendGroupById(Integer id) throws FriendGroupException { try{ FriendGroup friendGroup = (FriendGroup) baseDao.findById(FriendGroup.class, id); baseDao.delete(friendGroup); } catch (Exception e) { throw new FriendGroupException("FriendGroup删除异常"); } }
3839404142434445
@Transactional public void saveFriendGroup(FriendGroup friendGroup) throws FriendGroupException { try { baseDao.save(friendGroup); } catch (Exception e) { throw new FriendGroupException("FriendGroup保存异常"); } }
5152535455565758
@Transactional public FriendGroup findFriendGroupById(Integer id) throws FriendGroupException { try { return (FriendGroup) baseDao.findById(FriendGroup.class, id); } catch (Exception e) { throw new FriendGroupException("FriendGroup按ID查询异常"); } }
6970717273747576
Object[] values = CommonDaoUtil.commonQuery(map); hql += values[0].toString(); // Object[]需要进行强制转换. return baseDao.findPage(start, limit, hql, (Object[]) values[1]); } catch (Exception e) { throw new FriendGroupException("FriendGroup分页异常"); } }
8788899091929394
Object[] values = CommonDaoUtil.commonQuery(map); hql += values[0].toString(); // Object[]需要进行强制转换. return baseDao.find(hql, (Object[]) values[1]); } catch (Exception e) { throw new FriendGroupException("查询FriendGroup全部异常"); } }