@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_authzObj = true && (isSetAuthzObj()); builder.append(present_authzObj); if (present_authzObj) builder.append(authzObj); boolean present_addPrivileges = true && (isSetAddPrivileges()); builder.append(present_addPrivileges); if (present_addPrivileges) builder.append(addPrivileges); boolean present_delPrivileges = true && (isSetDelPrivileges()); builder.append(present_delPrivileges); if (present_delPrivileges) builder.append(delPrivileges); return builder.toHashCode(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case AUTHZ_OBJ: return isSetAuthzObj(); case ADD_PRIVILEGES: return isSetAddPrivileges(); case DEL_PRIVILEGES: return isSetDelPrivileges(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public TPrivilegeChanges(TPrivilegeChanges other) { if (other.isSetAuthzObj()) { this.authzObj = other.authzObj; } if (other.isSetAddPrivileges()) { Map<String,String> __this__addPrivileges = new HashMap<String,String>(); for (Map.Entry<String, String> other_element : other.addPrivileges.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__addPrivileges_copy_key = other_element_key; String __this__addPrivileges_copy_value = other_element_value; __this__addPrivileges.put(__this__addPrivileges_copy_key, __this__addPrivileges_copy_value); } this.addPrivileges = __this__addPrivileges; } if (other.isSetDelPrivileges()) { Map<String,String> __this__delPrivileges = new HashMap<String,String>(); for (Map.Entry<String, String> other_element : other.delPrivileges.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__delPrivileges_copy_key = other_element_key; String __this__delPrivileges_copy_value = other_element_value; __this__delPrivileges.put(__this__delPrivileges_copy_key, __this__delPrivileges_copy_value); } this.delPrivileges = __this__delPrivileges; } }
TPrivilegeChanges typedOther = (TPrivilegeChanges)other; lastComparison = Boolean.valueOf(isSetAuthzObj()).compareTo(typedOther.isSetAuthzObj()); if (lastComparison != 0) { return lastComparison; if (isSetAuthzObj()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzObj, typedOther.authzObj); if (lastComparison != 0) {
public boolean equals(TPrivilegeChanges that) { if (that == null) return false; boolean this_present_authzObj = true && this.isSetAuthzObj(); boolean that_present_authzObj = true && that.isSetAuthzObj(); if (this_present_authzObj || that_present_authzObj) { if (!(this_present_authzObj && that_present_authzObj)) return false; if (!this.authzObj.equals(that.authzObj)) return false; } boolean this_present_addPrivileges = true && this.isSetAddPrivileges(); boolean that_present_addPrivileges = true && that.isSetAddPrivileges(); if (this_present_addPrivileges || that_present_addPrivileges) { if (!(this_present_addPrivileges && that_present_addPrivileges)) return false; if (!this.addPrivileges.equals(that.addPrivileges)) return false; } boolean this_present_delPrivileges = true && this.isSetDelPrivileges(); boolean that_present_delPrivileges = true && that.isSetDelPrivileges(); if (this_present_delPrivileges || that_present_delPrivileges) { if (!(this_present_delPrivileges && that_present_delPrivileges)) return false; if (!this.delPrivileges.equals(that.delPrivileges)) return false; } return true; }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetAuthzObj()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzObj' is unset! Struct:" + toString()); } if (!isSetAddPrivileges()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'addPrivileges' is unset! Struct:" + toString()); } if (!isSetDelPrivileges()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'delPrivileges' is unset! Struct:" + toString()); } // check for sub-struct validity }