@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_protocol_version = true; list.add(present_protocol_version); if (present_protocol_version) list.add(protocol_version); boolean present_requestorUserName = true && (isSetRequestorUserName()); list.add(present_requestorUserName); if (present_requestorUserName) list.add(requestorUserName); boolean present_roleName = true && (isSetRoleName()); list.add(present_roleName); if (present_roleName) list.add(roleName); boolean present_component = true && (isSetComponent()); list.add(present_component); if (present_component) list.add(component); boolean present_serviceName = true && (isSetServiceName()); list.add(present_serviceName); if (present_serviceName) list.add(serviceName); boolean present_authorizables = true && (isSetAuthorizables()); list.add(present_authorizables); if (present_authorizables) list.add(authorizables); return list.hashCode(); }
/** * Performs a deep copy on <i>other</i>. */ public TListSentryPrivilegesRequest(TListSentryPrivilegesRequest other) { __isset_bitfield = other.__isset_bitfield; this.protocol_version = other.protocol_version; if (other.isSetRequestorUserName()) { this.requestorUserName = other.requestorUserName; } if (other.isSetRoleName()) { this.roleName = other.roleName; } if (other.isSetComponent()) { this.component = other.component; } if (other.isSetServiceName()) { this.serviceName = other.serviceName; } if (other.isSetAuthorizables()) { List<TAuthorizable> __this__authorizables = new ArrayList<TAuthorizable>(other.authorizables.size()); for (TAuthorizable other_element : other.authorizables) { __this__authorizables.add(new TAuthorizable(other_element)); } this.authorizables = __this__authorizables; } }
lastComparison = Boolean.valueOf(isSetRequestorUserName()).compareTo(other.isSetRequestorUserName()); if (lastComparison != 0) { return lastComparison; if (isSetRequestorUserName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestorUserName, other.requestorUserName); if (lastComparison != 0) {
/** 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 ROLE_NAME: return isSetRoleName(); case COMPONENT: return isSetComponent(); case SERVICE_NAME: return isSetServiceName(); case AUTHORIZABLES: return isSetAuthorizables(); } throw new IllegalStateException(); }
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))
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 (!isSetRoleName()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString()); } if (!isSetComponent()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'component' is unset! Struct:" + toString()); } if (!isSetServiceName()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'serviceName' is unset! Struct:" + toString()); } // check for sub-struct validity }