/** 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 }