package org.ccpit.base.role;

import org.ccpit.base.dao.BaseDao;
import org.springframework.stereotype.Repository;

/**
 * 角色实体操作类
 * Created by Administrator on 2015/9/6.
 */
@Repository
public class RoleDao extends BaseDao<Role> {
    public Role getRoleByUrl(String url) {
        Role role = findUnique("select r from " + Role.class.getName() + " as r left join r.urlPerfixs as p where p.url = ?", new String[]{url});
        return role;
    }
}
