@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_status = true && (isSetStatus()); list.add(present_status); if (present_status) list.add(status); boolean present_privilegesMapByAuth = true && (isSetPrivilegesMapByAuth()); list.add(present_privilegesMapByAuth); if (present_privilegesMapByAuth) list.add(privilegesMapByAuth); boolean present_privilegesMapByAuthForUsers = true && (isSetPrivilegesMapByAuthForUsers()); list.add(present_privilegesMapByAuthForUsers); if (present_privilegesMapByAuthForUsers) list.add(privilegesMapByAuthForUsers); return list.hashCode(); }
/** 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 STATUS: return isSetStatus(); case PRIVILEGES_MAP_BY_AUTH: return isSetPrivilegesMapByAuth(); case PRIVILEGES_MAP_BY_AUTH_FOR_USERS: return isSetPrivilegesMapByAuthForUsers(); } throw new IllegalStateException(); }
lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; if (isSetStatus()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) {
/** * Performs a deep copy on <i>other</i>. */ public TListSentryPrivilegesByAuthResponse(TListSentryPrivilegesByAuthResponse other) { if (other.isSetStatus()) { this.status = new org.apache.sentry.service.thrift.TSentryResponseStatus(other.status); } if (other.isSetPrivilegesMapByAuth()) { Map<TSentryAuthorizable,TSentryPrivilegeMap> __this__privilegesMapByAuth = new HashMap<TSentryAuthorizable,TSentryPrivilegeMap>(other.privilegesMapByAuth.size()); for (Map.Entry<TSentryAuthorizable, TSentryPrivilegeMap> other_element : other.privilegesMapByAuth.entrySet()) { TSentryAuthorizable other_element_key = other_element.getKey(); TSentryPrivilegeMap other_element_value = other_element.getValue(); TSentryAuthorizable __this__privilegesMapByAuth_copy_key = new TSentryAuthorizable(other_element_key); TSentryPrivilegeMap __this__privilegesMapByAuth_copy_value = new TSentryPrivilegeMap(other_element_value); __this__privilegesMapByAuth.put(__this__privilegesMapByAuth_copy_key, __this__privilegesMapByAuth_copy_value); } this.privilegesMapByAuth = __this__privilegesMapByAuth; } if (other.isSetPrivilegesMapByAuthForUsers()) { Map<TSentryAuthorizable,TSentryPrivilegeMap> __this__privilegesMapByAuthForUsers = new HashMap<TSentryAuthorizable,TSentryPrivilegeMap>(other.privilegesMapByAuthForUsers.size()); for (Map.Entry<TSentryAuthorizable, TSentryPrivilegeMap> other_element : other.privilegesMapByAuthForUsers.entrySet()) { TSentryAuthorizable other_element_key = other_element.getKey(); TSentryPrivilegeMap other_element_value = other_element.getValue(); TSentryAuthorizable __this__privilegesMapByAuthForUsers_copy_key = new TSentryAuthorizable(other_element_key); TSentryPrivilegeMap __this__privilegesMapByAuthForUsers_copy_value = new TSentryPrivilegeMap(other_element_value); __this__privilegesMapByAuthForUsers.put(__this__privilegesMapByAuthForUsers_copy_key, __this__privilegesMapByAuthForUsers_copy_value); } this.privilegesMapByAuthForUsers = __this__privilegesMapByAuthForUsers; } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetStatus()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString()); } // check for sub-struct validity if (status != null) { status.validate(); } }
public boolean equals(TListSentryPrivilegesByAuthResponse that) { if (that == null) return false; boolean this_present_status = true && this.isSetStatus(); boolean that_present_status = true && that.isSetStatus(); if (this_present_status || that_present_status) { if (!(this_present_status && that_present_status)) return false; if (!this.status.equals(that.status)) return false; } boolean this_present_privilegesMapByAuth = true && this.isSetPrivilegesMapByAuth(); boolean that_present_privilegesMapByAuth = true && that.isSetPrivilegesMapByAuth(); if (this_present_privilegesMapByAuth || that_present_privilegesMapByAuth) { if (!(this_present_privilegesMapByAuth && that_present_privilegesMapByAuth)) return false; if (!this.privilegesMapByAuth.equals(that.privilegesMapByAuth)) return false; } boolean this_present_privilegesMapByAuthForUsers = true && this.isSetPrivilegesMapByAuthForUsers(); boolean that_present_privilegesMapByAuthForUsers = true && that.isSetPrivilegesMapByAuthForUsers(); if (this_present_privilegesMapByAuthForUsers || that_present_privilegesMapByAuthForUsers) { if (!(this_present_privilegesMapByAuthForUsers && that_present_privilegesMapByAuthForUsers)) return false; if (!this.privilegesMapByAuthForUsers.equals(that.privilegesMapByAuthForUsers)) return false; } return true; }