class SecurityRoleDaoHelper {

    public SecurityRoleEntity getSecurityRoleEntity(String securityRoleName)
    {
        SecurityRoleEntity securityRoleEntity = securityRoleDao.getSecurityRoleByName(securityRoleName);

        if (securityRoleEntity == null)
        {
            throw new ObjectNotFoundException(String.format("Security role with name \"%s\" doesn't exist.", securityRoleName));
        }

        return securityRoleEntity;
    }

}