@RequiresSession
  public SettingEntity findByName(String name) {
    if (StringUtils.isBlank(name)) {
      return null;
    }
    TypedQuery<SettingEntity> query = entityManagerProvider.get()
            .createNamedQuery("settingByName", SettingEntity.class);
    query.setParameter("name", name);
    return daoUtils.selectOne(query);
  }
Find a setting with the given name.

@param name - name of setting.
@return  a matching setting or null
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/SettingDAO.java