Search in sources :

Example 1 with OrgRoleVo

use of com.ngtesting.platform.vo.OrgRoleVo in project ngtesting-platform by aaronchen2k.

the class OrgRoleServiceImpl method genVos.

@Override
public List<OrgRoleVo> genVos(List<TestOrgRole> pos) {
    List<OrgRoleVo> vos = new LinkedList<OrgRoleVo>();
    for (TestOrgRole po : pos) {
        OrgRoleVo vo = genVo(po);
        vos.add(vo);
    }
    return vos;
}
Also used : OrgRoleVo(com.ngtesting.platform.vo.OrgRoleVo) TestOrgRole(com.ngtesting.platform.entity.TestOrgRole) LinkedList(java.util.LinkedList)

Example 2 with OrgRoleVo

use of com.ngtesting.platform.vo.OrgRoleVo in project ngtesting-platform by aaronchen2k.

the class OrgRoleServiceImpl method genVo.

// @Override
// public void addUserToOrgRolePers(TestUser user, Long orgId, TestOrgRole.OrgRoleCode code) {
// DetachedCriteria dc = DetachedCriteria.forClass(TestOrgRole.class);
// dc.add(Restrictions.eq("orgId", orgId));
// dc.add(Restrictions.eq("code", code));
// dc.add(Restrictions.ne("deleted", true));
// dc.add(Restrictions.ne("disabled", true));
// 
// dc.addOrder(Order.asc("id"));
// List<TestOrgRole> ls = findAllByCriteria(dc);
// TestOrgRole role = ls.get(0);
// role.getUserSet().add(user);
// saveOrUpdate(role);
// }
@Override
public OrgRoleVo genVo(TestOrgRole role) {
    OrgRoleVo vo = new OrgRoleVo();
    BeanUtilEx.copyProperties(vo, role);
    return vo;
}
Also used : OrgRoleVo(com.ngtesting.platform.vo.OrgRoleVo)

Aggregations

OrgRoleVo (com.ngtesting.platform.vo.OrgRoleVo)2 TestOrgRole (com.ngtesting.platform.entity.TestOrgRole)1 LinkedList (java.util.LinkedList)1