package ccpit.base.role;

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

/**
 * 
 * ClassName: RoleDao <br/>
 * Function: TODO 角色实体操作类. <br/>
 * Reason: TODO ADD REASON(可选). <br/>
 * date: 2014年4月12日 下午1:46:36 <br/>
 *
 * @author dingwei
 * @version 
 * @since JDK 1.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;
    }
}
