/** 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(); }
TRenamePrivilegesRequest typedOther = (TRenamePrivilegesRequest)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) {
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(); } }