コード例 #1
0
  public boolean equals(TCreateSentryRoleRequest that) {
    if (that == null) return false;

    boolean this_present_protocol_version = true;
    boolean that_present_protocol_version = true;
    if (this_present_protocol_version || that_present_protocol_version) {
      if (!(this_present_protocol_version && that_present_protocol_version)) return false;
      if (this.protocol_version != that.protocol_version) return false;
    }

    boolean this_present_requestorUserName = true && this.isSetRequestorUserName();
    boolean that_present_requestorUserName = true && that.isSetRequestorUserName();
    if (this_present_requestorUserName || that_present_requestorUserName) {
      if (!(this_present_requestorUserName && that_present_requestorUserName)) return false;
      if (!this.requestorUserName.equals(that.requestorUserName)) return false;
    }

    boolean this_present_requestorGroupNames = true && this.isSetRequestorGroupNames();
    boolean that_present_requestorGroupNames = true && that.isSetRequestorGroupNames();
    if (this_present_requestorGroupNames || that_present_requestorGroupNames) {
      if (!(this_present_requestorGroupNames && that_present_requestorGroupNames)) return false;
      if (!this.requestorGroupNames.equals(that.requestorGroupNames)) return false;
    }

    boolean this_present_roleName = true && this.isSetRoleName();
    boolean that_present_roleName = true && that.isSetRoleName();
    if (this_present_roleName || that_present_roleName) {
      if (!(this_present_roleName && that_present_roleName)) return false;
      if (!this.roleName.equals(that.roleName)) return false;
    }

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

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

    lastComparison =
        Boolean.valueOf(isSetProtocol_version()).compareTo(typedOther.isSetProtocol_version());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProtocol_version()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.protocol_version, typedOther.protocol_version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetRequestorUserName()).compareTo(typedOther.isSetRequestorUserName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRequestorUserName()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.requestorUserName, typedOther.requestorUserName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetRequestorGroupNames())
            .compareTo(typedOther.isSetRequestorGroupNames());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRequestorGroupNames()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.requestorGroupNames, typedOther.requestorGroupNames);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(typedOther.isSetRoleName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRoleName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, typedOther.roleName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
コード例 #3
0
 /** Performs a deep copy on <i>other</i>. */
 public TCreateSentryRoleRequest(TCreateSentryRoleRequest other) {
   __isset_bitfield = other.__isset_bitfield;
   this.protocol_version = other.protocol_version;
   if (other.isSetRequestorUserName()) {
     this.requestorUserName = other.requestorUserName;
   }
   if (other.isSetRequestorGroupNames()) {
     Set<String> __this__requestorGroupNames = new HashSet<String>();
     for (String other_element : other.requestorGroupNames) {
       __this__requestorGroupNames.add(other_element);
     }
     this.requestorGroupNames = __this__requestorGroupNames;
   }
   if (other.isSetRoleName()) {
     this.roleName = other.roleName;
   }
 }