コード例 #1
0
  public int compareTo(HiveObjectRef other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    HiveObjectRef typedOther = (HiveObjectRef) other;

    lastComparison = Boolean.valueOf(isSetObjectType()).compareTo(typedOther.isSetObjectType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetObjectType()) {
      lastComparison = TBaseHelper.compareTo(this.objectType, typedOther.objectType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDbName()) {
      lastComparison = TBaseHelper.compareTo(this.dbName, typedOther.dbName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetObjectName()).compareTo(typedOther.isSetObjectName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetObjectName()) {
      lastComparison = TBaseHelper.compareTo(this.objectName, typedOther.objectName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPartValues()).compareTo(typedOther.isSetPartValues());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPartValues()) {
      lastComparison = TBaseHelper.compareTo(this.partValues, typedOther.partValues);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(typedOther.isSetColumnName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumnName()) {
      lastComparison = TBaseHelper.compareTo(this.columnName, typedOther.columnName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
コード例 #2
0
 /** Performs a deep copy on <i>other</i>. */
 public HiveObjectRef(HiveObjectRef other) {
   if (other.isSetObjectType()) {
     this.objectType = other.objectType;
   }
   if (other.isSetDbName()) {
     this.dbName = other.dbName;
   }
   if (other.isSetObjectName()) {
     this.objectName = other.objectName;
   }
   if (other.isSetPartValues()) {
     List<String> __this__partValues = new ArrayList<String>();
     for (String other_element : other.partValues) {
       __this__partValues.add(other_element);
     }
     this.partValues = __this__partValues;
   }
   if (other.isSetColumnName()) {
     this.columnName = other.columnName;
   }
 }
コード例 #3
0
  public boolean equals(HiveObjectRef that) {
    if (that == null) return false;

    boolean this_present_objectType = true && this.isSetObjectType();
    boolean that_present_objectType = true && that.isSetObjectType();
    if (this_present_objectType || that_present_objectType) {
      if (!(this_present_objectType && that_present_objectType)) return false;
      if (!this.objectType.equals(that.objectType)) return false;
    }

    boolean this_present_dbName = true && this.isSetDbName();
    boolean that_present_dbName = true && that.isSetDbName();
    if (this_present_dbName || that_present_dbName) {
      if (!(this_present_dbName && that_present_dbName)) return false;
      if (!this.dbName.equals(that.dbName)) return false;
    }

    boolean this_present_objectName = true && this.isSetObjectName();
    boolean that_present_objectName = true && that.isSetObjectName();
    if (this_present_objectName || that_present_objectName) {
      if (!(this_present_objectName && that_present_objectName)) return false;
      if (!this.objectName.equals(that.objectName)) return false;
    }

    boolean this_present_partValues = true && this.isSetPartValues();
    boolean that_present_partValues = true && that.isSetPartValues();
    if (this_present_partValues || that_present_partValues) {
      if (!(this_present_partValues && that_present_partValues)) return false;
      if (!this.partValues.equals(that.partValues)) return false;
    }

    boolean this_present_columnName = true && this.isSetColumnName();
    boolean that_present_columnName = true && that.isSetColumnName();
    if (this_present_columnName || that_present_columnName) {
      if (!(this_present_columnName && that_present_columnName)) return false;
      if (!this.columnName.equals(that.columnName)) return false;
    }

    return true;
  }