@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_roleName = true && (isSetRoleName()); builder.append(present_roleName); if (present_roleName) builder.append(roleName); boolean present_groups = true && (isSetGroups()); builder.append(present_groups); if (present_groups) builder.append(groups); boolean present_grantorPrincipal = true && (isSetGrantorPrincipal()); builder.append(present_grantorPrincipal); if (present_grantorPrincipal) builder.append(grantorPrincipal); 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 ROLE_NAME: return isSetRoleName(); case GROUPS: return isSetGroups(); case GRANTOR_PRINCIPAL: return isSetGrantorPrincipal(); } throw new IllegalStateException(); }
lastComparison = Boolean.valueOf(isSetGroups()).compareTo(typedOther.isSetGroups()); if (lastComparison != 0) { return lastComparison; if (isSetGroups()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groups, typedOther.groups); if (lastComparison != 0) {
/** * Performs a deep copy on <i>other</i>. */ public TSentryRole(TSentryRole other) { if (other.isSetRoleName()) { this.roleName = other.roleName; } if (other.isSetGroups()) { Set<TSentryGroup> __this__groups = new HashSet<TSentryGroup>(); for (TSentryGroup other_element : other.groups) { __this__groups.add(new TSentryGroup(other_element)); } this.groups = __this__groups; } if (other.isSetGrantorPrincipal()) { this.grantorPrincipal = other.grantorPrincipal; } }
public boolean equals(TSentryRole that) { if (that == null) return false; boolean this_present_roleName = true && this.isSetRoleName(); boolean that_present_roleName = true && that.isSetRoleName(); if (this_present_roleName || that_present_roleName) { if (!(this_present_roleName && that_present_roleName)) return false; if (!this.roleName.equals(that.roleName)) return false; } boolean this_present_groups = true && this.isSetGroups(); boolean that_present_groups = true && that.isSetGroups(); if (this_present_groups || that_present_groups) { if (!(this_present_groups && that_present_groups)) return false; if (!this.groups.equals(that.groups)) return false; } boolean this_present_grantorPrincipal = true && this.isSetGrantorPrincipal(); boolean that_present_grantorPrincipal = true && that.isSetGrantorPrincipal(); if (this_present_grantorPrincipal || that_present_grantorPrincipal) { if (!(this_present_grantorPrincipal && that_present_grantorPrincipal)) return false; if (!this.grantorPrincipal.equals(that.grantorPrincipal)) return false; } return true; }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetRoleName()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString()); } if (!isSetGroups()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'groups' is unset! Struct:" + toString()); } if (!isSetGrantorPrincipal()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'grantorPrincipal' is unset! Struct:" + toString()); } // check for sub-struct validity }