BaseService.java 文件源码

java
阅读 29 收藏 0 点赞 0 评论 0

项目:bamboobsc 作者:
@ServiceMethodAuthority(type={ServiceMethodType.SELECT})
@Transactional(isolation=Isolation.READ_COMMITTED, timeout=25, readOnly=true)
@SuppressWarnings("unchecked")
public int countByUK(T object) throws ServiceException, Exception {
    if (object==null || !(object instanceof BaseValueObj) ) {
        throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.OBJ_NULL));
    }
    int count=0;
    Class<E> entityObjectClass=GenericsUtils.getSuperClassGenricType(getClass(), 1);
    E entityObject=entityObjectClass.newInstance(); 
    try {
        this.doMapper(object, entityObject, this.getMapperIdVo2Po());
        count=this.getBaseDataAccessObject().countByUK(entityObject);
    } catch (Exception e) {
        e.printStackTrace();
    }
    return count;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号