Ejemplo n.º 1
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;

    if (!super.equals(obj)) return false;
    if (getClass() != obj.getClass()) return false;
    GroupSymbolImpl other = (GroupSymbolImpl) obj;
    if (this.schema == null || other.schema == null) {
      if (getTeiidVersion().isLessThan(Version.TEIID_8_0.get())) {
        return this.getCanonicalName().equals(other.getCanonicalName());
      } else {
        return this.getName().equals(other.getName());
      }
    }

    if (this.schema == null) {
      if (other.schema != null) return false;
    } else if (!this.schema.equals(other.schema)) return false;

    if (getTeiidVersion().isLessThan(Version.TEIID_8_0.get()))
      return this.getShortCanonicalName().equals(other.getShortCanonicalName());

    return this.getShortName().equals(other.getShortName());
  }
Ejemplo n.º 2
0
 /**
  * Compare two groups and give an ordering.
  *
  * @param other Other group
  * @return -1, 0, or 1 depending on how this compares to group
  */
 public int compareTo(GroupSymbolImpl other) {
   return getName().compareTo(other.getName());
 }