Ejemplo n.º 1
0
  // if propertyName is in excludeList, or if className is in excludeList
  // className : like 'Table', 'Column', 'Class', ..
  // propertyName : like 'Table.Name', 'Column.Alias', ..
  protected boolean verifyExclusion(String className, String propertyName, RuleOptions options) {
    boolean excluded = false;

    if (options == null) {
      return false;
    }

    ArrayList excludeList = options.getExcludeList();

    if (excludeList != null) {
      if (excludeList.contains(className)) {
        excluded = true;
      } else if (excludeList.contains(propertyName)) {
        excluded = true;
      }
    } // end if

    return excluded;
  }
Ejemplo n.º 2
0
  protected boolean verifyExclusion(Serializable obj, RuleOptions options) {
    boolean excluded = false;

    if (options == null) {
      return false;
    }

    ArrayList excludeList = options.getExcludeList();

    if (obj != null) {
      if (obj instanceof DbObject) {
        DbObject dbObj = (DbObject) obj;
        MetaClass metaClass = dbObj.getMetaClass();
        String className = metaClass.getGUIName();
        if (excludeList != null) {
          if (excludeList.contains(className)) {
            excluded = true;
          }
        }
      }
    } // end if

    return excluded;
  }