コード例 #1
0
ファイル: GroupSymbolImpl.java プロジェクト: vhalbert/komodo
  @Override
  public GroupSymbolImpl clone() {
    GroupSymbolImpl clone = new GroupSymbolImpl(this.parser, this.id);

    if (getDefinition() != null) clone.setDefinition(getDefinition());
    if (getOutputDefinition() != null) clone.setOutputDefinition(getOutputDefinition());
    if (getShortCanonicalName() != null) clone.setShortCanonicalName(getShortCanonicalName());
    if (getOutputName() != null) clone.setOutputName(getOutputName());
    if (getShortName() != null) clone.setShortName(getShortName());
    if (getName() != null) clone.setName(getName());
    if (getMetadataID() != null) clone.setMetadataID(getMetadataID());

    clone.setIsTempTable(isTempTable);
    clone.setProcedure(isProcedure);

    return clone;
  }
コード例 #2
0
ファイル: GroupSymbolImpl.java プロジェクト: vhalbert/komodo
  @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());
  }
コード例 #3
0
ファイル: GroupSymbolImpl.java プロジェクト: vhalbert/komodo
 /**
  * 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());
 }