class SecurityRoleFunctionDaoHelper {

    public SecurityRoleFunctionEntity getSecurityRoleFunctionEntity(SecurityRoleFunctionKey securityRoleFunctionKey)
    {
        SecurityRoleFunctionEntity securityRoleFunctionEntity = securityRoleFunctionDao.getSecurityRoleFunctionByKey(securityRoleFunctionKey);

        if (securityRoleFunctionEntity == null)
        {
            throw new ObjectNotFoundException(String
                .format("Security role to function mapping with \"%s\" security role name and \"%s\" security function name doesn't exist.",
                    securityRoleFunctionKey.getSecurityRoleName(), securityRoleFunctionKey.getSecurityFunctionName()));
        }

        return securityRoleFunctionEntity;
    }

}