@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_protocol_version = true; builder.append(present_protocol_version); if (present_protocol_version) builder.append(protocol_version); boolean present_requestorUserName = true && (isSetRequestorUserName()); builder.append(present_requestorUserName); if (present_requestorUserName) builder.append(requestorUserName); boolean present_oldAuthorizable = true && (isSetOldAuthorizable()); builder.append(present_oldAuthorizable); if (present_oldAuthorizable) builder.append(oldAuthorizable); boolean present_newAuthorizable = true && (isSetNewAuthorizable()); builder.append(present_newAuthorizable); if (present_newAuthorizable) builder.append(newAuthorizable); 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 PROTOCOL_VERSION: return isSetProtocol_version(); case REQUESTOR_USER_NAME: return isSetRequestorUserName(); case OLD_AUTHORIZABLE: return isSetOldAuthorizable(); case NEW_AUTHORIZABLE: return isSetNewAuthorizable(); } throw new IllegalStateException(); }
lastComparison = Boolean.valueOf(isSetOldAuthorizable()).compareTo(typedOther.isSetOldAuthorizable()); if (lastComparison != 0) { return lastComparison; if (isSetOldAuthorizable()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oldAuthorizable, typedOther.oldAuthorizable); if (lastComparison != 0) {
boolean this_present_oldAuthorizable = true && this.isSetOldAuthorizable(); boolean that_present_oldAuthorizable = true && that.isSetOldAuthorizable(); if (this_present_oldAuthorizable || that_present_oldAuthorizable) { if (!(this_present_oldAuthorizable && that_present_oldAuthorizable))
/** * Performs a deep copy on <i>other</i>. */ public TRenamePrivilegesRequest(TRenamePrivilegesRequest other) { __isset_bitfield = other.__isset_bitfield; this.protocol_version = other.protocol_version; if (other.isSetRequestorUserName()) { this.requestorUserName = other.requestorUserName; } if (other.isSetOldAuthorizable()) { this.oldAuthorizable = new TSentryAuthorizable(other.oldAuthorizable); } if (other.isSetNewAuthorizable()) { this.newAuthorizable = new TSentryAuthorizable(other.newAuthorizable); } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetProtocol_version()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'protocol_version' is unset! Struct:" + toString()); } if (!isSetRequestorUserName()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' is unset! Struct:" + toString()); } if (!isSetOldAuthorizable()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'oldAuthorizable' is unset! Struct:" + toString()); } if (!isSetNewAuthorizable()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'newAuthorizable' is unset! Struct:" + toString()); } // check for sub-struct validity if (oldAuthorizable != null) { oldAuthorizable.validate(); } if (newAuthorizable != null) { newAuthorizable.validate(); } }