@RequiresSession
  public List<ViewEntity> findByCommonName(String viewCommonName) {
    List<ViewEntity> list = Lists.newArrayList();
    if (viewCommonName != null) {
      for (ViewEntity viewEntity : findAll()) {
        if (viewCommonName.equals(viewEntity.getCommonName())) {
          list.add(viewEntity);
        }
      }
    }
    return list;
  }
Find a view with a given common name.

@param viewCommonName common name of view to find

@return  a matching view or null
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewDAO.java