/** * Performs a deep copy on <i>other</i>. */ public TSentryActiveRoleSet(TSentryActiveRoleSet other) { __isset_bitfield = other.__isset_bitfield; this.all = other.all; if (other.isSetRoles()) { Set<String> __this__roles = new HashSet<String>(other.roles); this.roles = __this__roles; } }
public boolean equals(TSentryActiveRoleSet that) { if (that == null) return false; boolean this_present_all = true; boolean that_present_all = true; if (this_present_all || that_present_all) { if (!(this_present_all && that_present_all)) return false; if (this.all != that.all) return false; } boolean this_present_roles = true && this.isSetRoles(); boolean that_present_roles = true && that.isSetRoles(); if (this_present_roles || that_present_roles) { if (!(this_present_roles && that_present_roles)) return false; if (!this.roles.equals(that.roles)) return false; } return true; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_all = true; list.add(present_all); if (present_all) list.add(all); boolean present_roles = true && (isSetRoles()); list.add(present_roles); if (present_roles) list.add(roles); 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 ALL: return isSetAll(); case ROLES: return isSetRoles(); } throw new IllegalStateException(); }
@Override public int compareTo(TSentryActiveRoleSet other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetAll()).compareTo(other.isSetAll()); if (lastComparison != 0) { return lastComparison; } if (isSetAll()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.all, other.all); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRoles()).compareTo(other.isSetRoles()); if (lastComparison != 0) { return lastComparison; } if (isSetRoles()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roles, other.roles); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetAll()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'all' is unset! Struct:" + toString()); } if (!isSetRoles()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'roles' is unset! Struct:" + toString()); } // check for sub-struct validity }