@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_hasfullImage = true; builder.append(present_hasfullImage); if (present_hasfullImage) builder.append(hasfullImage); boolean present_seqNum = true; builder.append(present_seqNum); if (present_seqNum) builder.append(seqNum); boolean present_privilegeChanges = true && (isSetPrivilegeChanges()); builder.append(present_privilegeChanges); if (present_privilegeChanges) builder.append(privilegeChanges); boolean present_roleChanges = true && (isSetRoleChanges()); builder.append(present_roleChanges); if (present_roleChanges) builder.append(roleChanges); return builder.toHashCode(); }
boolean this_present_privilegeChanges = true && this.isSetPrivilegeChanges(); boolean that_present_privilegeChanges = true && that.isSetPrivilegeChanges(); if (this_present_privilegeChanges || that_present_privilegeChanges) { if (!(this_present_privilegeChanges && that_present_privilegeChanges))
/** * Performs a deep copy on <i>other</i>. */ public TPermissionsUpdate(TPermissionsUpdate other) { __isset_bitfield = other.__isset_bitfield; this.hasfullImage = other.hasfullImage; this.seqNum = other.seqNum; if (other.isSetPrivilegeChanges()) { Map<String,TPrivilegeChanges> __this__privilegeChanges = new HashMap<String,TPrivilegeChanges>(); for (Map.Entry<String, TPrivilegeChanges> other_element : other.privilegeChanges.entrySet()) { String other_element_key = other_element.getKey(); TPrivilegeChanges other_element_value = other_element.getValue(); String __this__privilegeChanges_copy_key = other_element_key; TPrivilegeChanges __this__privilegeChanges_copy_value = new TPrivilegeChanges(other_element_value); __this__privilegeChanges.put(__this__privilegeChanges_copy_key, __this__privilegeChanges_copy_value); } this.privilegeChanges = __this__privilegeChanges; } if (other.isSetRoleChanges()) { Map<String,TRoleChanges> __this__roleChanges = new HashMap<String,TRoleChanges>(); for (Map.Entry<String, TRoleChanges> other_element : other.roleChanges.entrySet()) { String other_element_key = other_element.getKey(); TRoleChanges other_element_value = other_element.getValue(); String __this__roleChanges_copy_key = other_element_key; TRoleChanges __this__roleChanges_copy_value = new TRoleChanges(other_element_value); __this__roleChanges.put(__this__roleChanges_copy_key, __this__roleChanges_copy_value); } this.roleChanges = __this__roleChanges; } }
/** 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 HASFULL_IMAGE: return isSetHasfullImage(); case SEQ_NUM: return isSetSeqNum(); case PRIVILEGE_CHANGES: return isSetPrivilegeChanges(); case ROLE_CHANGES: return isSetRoleChanges(); } throw new IllegalStateException(); }
lastComparison = Boolean.valueOf(isSetPrivilegeChanges()).compareTo(typedOther.isSetPrivilegeChanges()); if (lastComparison != 0) { return lastComparison; if (isSetPrivilegeChanges()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privilegeChanges, typedOther.privilegeChanges); if (lastComparison != 0) {
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetHasfullImage()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasfullImage' is unset! Struct:" + toString()); } if (!isSetSeqNum()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'seqNum' is unset! Struct:" + toString()); } if (!isSetPrivilegeChanges()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'privilegeChanges' is unset! Struct:" + toString()); } if (!isSetRoleChanges()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleChanges' is unset! Struct:" + toString()); } // check for sub-struct validity }