http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/c8c88786/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TStorePrivilege.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TStorePrivilege.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TStorePrivilege.java new file mode 100644 index 0000000..3ce595d --- /dev/null +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TStorePrivilege.java @@ -0,0 +1,496 @@ +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.sentry.provider.db.service.thrift; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TStorePrivilege implements org.apache.thrift.TBase<TStorePrivilege, TStorePrivilege._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TStorePrivilege"); + + private static final org.apache.thrift.protocol.TField GRANT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("grantOption", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField PRIVILEGE_FIELD_DESC = new org.apache.thrift.protocol.TField("privilege", org.apache.thrift.protocol.TType.I16, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TStorePrivilegeStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TStorePrivilegeTupleSchemeFactory()); + } + + private TSentryGrantOption grantOption; // required + private short privilege; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see TSentryGrantOption + */ + GRANT_OPTION((short)1, "grantOption"), + PRIVILEGE((short)2, "privilege"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // GRANT_OPTION + return GRANT_OPTION; + case 2: // PRIVILEGE + return PRIVILEGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __PRIVILEGE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.GRANT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("grantOption", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TSentryGrantOption.class))); + tmpMap.put(_Fields.PRIVILEGE, new org.apache.thrift.meta_data.FieldMetaData("privilege", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TStorePrivilege.class, metaDataMap); + } + + public TStorePrivilege() { + } + + public TStorePrivilege( + TSentryGrantOption grantOption, + short privilege) + { + this(); + this.grantOption = grantOption; + this.privilege = privilege; + setPrivilegeIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public TStorePrivilege(TStorePrivilege other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetGrantOption()) { + this.grantOption = other.grantOption; + } + this.privilege = other.privilege; + } + + public TStorePrivilege deepCopy() { + return new TStorePrivilege(this); + } + + @Override + public void clear() { + this.grantOption = null; + setPrivilegeIsSet(false); + this.privilege = 0; + } + + /** + * + * @see TSentryGrantOption + */ + public TSentryGrantOption getGrantOption() { + return this.grantOption; + } + + /** + * + * @see TSentryGrantOption + */ + public void setGrantOption(TSentryGrantOption grantOption) { + this.grantOption = grantOption; + } + + public void unsetGrantOption() { + this.grantOption = null; + } + + /** Returns true if field grantOption is set (has been assigned a value) and false otherwise */ + public boolean isSetGrantOption() { + return this.grantOption != null; + } + + public void setGrantOptionIsSet(boolean value) { + if (!value) { + this.grantOption = null; + } + } + + public short getPrivilege() { + return this.privilege; + } + + public void setPrivilege(short privilege) { + this.privilege = privilege; + setPrivilegeIsSet(true); + } + + public void unsetPrivilege() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRIVILEGE_ISSET_ID); + } + + /** Returns true if field privilege is set (has been assigned a value) and false otherwise */ + public boolean isSetPrivilege() { + return EncodingUtils.testBit(__isset_bitfield, __PRIVILEGE_ISSET_ID); + } + + public void setPrivilegeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRIVILEGE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case GRANT_OPTION: + if (value == null) { + unsetGrantOption(); + } else { + setGrantOption((TSentryGrantOption)value); + } + break; + + case PRIVILEGE: + if (value == null) { + unsetPrivilege(); + } else { + setPrivilege((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case GRANT_OPTION: + return getGrantOption(); + + case PRIVILEGE: + return Short.valueOf(getPrivilege()); + + } + throw new IllegalStateException(); + } + + /** 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 GRANT_OPTION: + return isSetGrantOption(); + case PRIVILEGE: + return isSetPrivilege(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TStorePrivilege) + return this.equals((TStorePrivilege)that); + return false; + } + + public boolean equals(TStorePrivilege that) { + if (that == null) + return false; + + boolean this_present_grantOption = true && this.isSetGrantOption(); + boolean that_present_grantOption = true && that.isSetGrantOption(); + if (this_present_grantOption || that_present_grantOption) { + if (!(this_present_grantOption && that_present_grantOption)) + return false; + if (!this.grantOption.equals(that.grantOption)) + return false; + } + + boolean this_present_privilege = true; + boolean that_present_privilege = true; + if (this_present_privilege || that_present_privilege) { + if (!(this_present_privilege && that_present_privilege)) + return false; + if (this.privilege != that.privilege) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_grantOption = true && (isSetGrantOption()); + builder.append(present_grantOption); + if (present_grantOption) + builder.append(grantOption.getValue()); + + boolean present_privilege = true; + builder.append(present_privilege); + if (present_privilege) + builder.append(privilege); + + return builder.toHashCode(); + } + + public int compareTo(TStorePrivilege other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + TStorePrivilege typedOther = (TStorePrivilege)other; + + lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(typedOther.isSetGrantOption()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetGrantOption()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantOption, typedOther.grantOption); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPrivilege()).compareTo(typedOther.isSetPrivilege()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPrivilege()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privilege, typedOther.privilege); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TStorePrivilege("); + boolean first = true; + + sb.append("grantOption:"); + if (this.grantOption == null) { + sb.append("null"); + } else { + sb.append(this.grantOption); + } + first = false; + if (!first) sb.append(", "); + sb.append("privilege:"); + sb.append(this.privilege); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetGrantOption()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'grantOption' is unset! Struct:" + toString()); + } + + if (!isSetPrivilege()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'privilege' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TStorePrivilegeStandardSchemeFactory implements SchemeFactory { + public TStorePrivilegeStandardScheme getScheme() { + return new TStorePrivilegeStandardScheme(); + } + } + + private static class TStorePrivilegeStandardScheme extends StandardScheme<TStorePrivilege> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TStorePrivilege struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // GRANT_OPTION + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.grantOption = TSentryGrantOption.findByValue(iprot.readI32()); + struct.setGrantOptionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PRIVILEGE + if (schemeField.type == org.apache.thrift.protocol.TType.I16) { + struct.privilege = iprot.readI16(); + struct.setPrivilegeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TStorePrivilege struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.grantOption != null) { + oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC); + oprot.writeI32(struct.grantOption.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(PRIVILEGE_FIELD_DESC); + oprot.writeI16(struct.privilege); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TStorePrivilegeTupleSchemeFactory implements SchemeFactory { + public TStorePrivilegeTupleScheme getScheme() { + return new TStorePrivilegeTupleScheme(); + } + } + + private static class TStorePrivilegeTupleScheme extends TupleScheme<TStorePrivilege> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TStorePrivilege struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI32(struct.grantOption.getValue()); + oprot.writeI16(struct.privilege); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TStorePrivilege struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.grantOption = TSentryGrantOption.findByValue(iprot.readI32()); + struct.setGrantOptionIsSet(true); + struct.privilege = iprot.readI16(); + struct.setPrivilegeIsSet(true); + } + } + +} +
http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/c8c88786/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TStoreSnapshot.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TStoreSnapshot.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TStoreSnapshot.java new file mode 100644 index 0000000..6c9bbe0 --- /dev/null +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TStoreSnapshot.java @@ -0,0 +1,816 @@ +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.sentry.provider.db.service.thrift; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TStoreSnapshot implements org.apache.thrift.TBase<TStoreSnapshot, TStoreSnapshot._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TStoreSnapshot"); + + private static final org.apache.thrift.protocol.TField ROOT_AUTHORIZABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("rootAuthorizable", org.apache.thrift.protocol.TType.MAP, (short)1); + private static final org.apache.thrift.protocol.TField ROLE_TO_GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("roleToGroups", org.apache.thrift.protocol.TType.MAP, (short)2); + private static final org.apache.thrift.protocol.TField OBJ_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("objIds", org.apache.thrift.protocol.TType.MAP, (short)3); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TStoreSnapshotStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TStoreSnapshotTupleSchemeFactory()); + } + + private Map<String,TStoreAuthorizable> rootAuthorizable; // required + private Map<String,Set<String>> roleToGroups; // required + private Map<Integer,TStoreAuthorizable> objIds; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ROOT_AUTHORIZABLE((short)1, "rootAuthorizable"), + ROLE_TO_GROUPS((short)2, "roleToGroups"), + OBJ_IDS((short)3, "objIds"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROOT_AUTHORIZABLE + return ROOT_AUTHORIZABLE; + case 2: // ROLE_TO_GROUPS + return ROLE_TO_GROUPS; + case 3: // OBJ_IDS + return OBJ_IDS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ROOT_AUTHORIZABLE, new org.apache.thrift.meta_data.FieldMetaData("rootAuthorizable", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStoreAuthorizable.class)))); + tmpMap.put(_Fields.ROLE_TO_GROUPS, new org.apache.thrift.meta_data.FieldMetaData("roleToGroups", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); + tmpMap.put(_Fields.OBJ_IDS, new org.apache.thrift.meta_data.FieldMetaData("objIds", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStoreAuthorizable.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TStoreSnapshot.class, metaDataMap); + } + + public TStoreSnapshot() { + } + + public TStoreSnapshot( + Map<String,TStoreAuthorizable> rootAuthorizable, + Map<String,Set<String>> roleToGroups, + Map<Integer,TStoreAuthorizable> objIds) + { + this(); + this.rootAuthorizable = rootAuthorizable; + this.roleToGroups = roleToGroups; + this.objIds = objIds; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public TStoreSnapshot(TStoreSnapshot other) { + if (other.isSetRootAuthorizable()) { + Map<String,TStoreAuthorizable> __this__rootAuthorizable = new HashMap<String,TStoreAuthorizable>(); + for (Map.Entry<String, TStoreAuthorizable> other_element : other.rootAuthorizable.entrySet()) { + + String other_element_key = other_element.getKey(); + TStoreAuthorizable other_element_value = other_element.getValue(); + + String __this__rootAuthorizable_copy_key = other_element_key; + + TStoreAuthorizable __this__rootAuthorizable_copy_value = new TStoreAuthorizable(other_element_value); + + __this__rootAuthorizable.put(__this__rootAuthorizable_copy_key, __this__rootAuthorizable_copy_value); + } + this.rootAuthorizable = __this__rootAuthorizable; + } + if (other.isSetRoleToGroups()) { + Map<String,Set<String>> __this__roleToGroups = new HashMap<String,Set<String>>(); + for (Map.Entry<String, Set<String>> other_element : other.roleToGroups.entrySet()) { + + String other_element_key = other_element.getKey(); + Set<String> other_element_value = other_element.getValue(); + + String __this__roleToGroups_copy_key = other_element_key; + + Set<String> __this__roleToGroups_copy_value = new HashSet<String>(); + for (String other_element_value_element : other_element_value) { + __this__roleToGroups_copy_value.add(other_element_value_element); + } + + __this__roleToGroups.put(__this__roleToGroups_copy_key, __this__roleToGroups_copy_value); + } + this.roleToGroups = __this__roleToGroups; + } + if (other.isSetObjIds()) { + Map<Integer,TStoreAuthorizable> __this__objIds = new HashMap<Integer,TStoreAuthorizable>(); + for (Map.Entry<Integer, TStoreAuthorizable> other_element : other.objIds.entrySet()) { + + Integer other_element_key = other_element.getKey(); + TStoreAuthorizable other_element_value = other_element.getValue(); + + Integer __this__objIds_copy_key = other_element_key; + + TStoreAuthorizable __this__objIds_copy_value = new TStoreAuthorizable(other_element_value); + + __this__objIds.put(__this__objIds_copy_key, __this__objIds_copy_value); + } + this.objIds = __this__objIds; + } + } + + public TStoreSnapshot deepCopy() { + return new TStoreSnapshot(this); + } + + @Override + public void clear() { + this.rootAuthorizable = null; + this.roleToGroups = null; + this.objIds = null; + } + + public int getRootAuthorizableSize() { + return (this.rootAuthorizable == null) ? 0 : this.rootAuthorizable.size(); + } + + public void putToRootAuthorizable(String key, TStoreAuthorizable val) { + if (this.rootAuthorizable == null) { + this.rootAuthorizable = new HashMap<String,TStoreAuthorizable>(); + } + this.rootAuthorizable.put(key, val); + } + + public Map<String,TStoreAuthorizable> getRootAuthorizable() { + return this.rootAuthorizable; + } + + public void setRootAuthorizable(Map<String,TStoreAuthorizable> rootAuthorizable) { + this.rootAuthorizable = rootAuthorizable; + } + + public void unsetRootAuthorizable() { + this.rootAuthorizable = null; + } + + /** Returns true if field rootAuthorizable is set (has been assigned a value) and false otherwise */ + public boolean isSetRootAuthorizable() { + return this.rootAuthorizable != null; + } + + public void setRootAuthorizableIsSet(boolean value) { + if (!value) { + this.rootAuthorizable = null; + } + } + + public int getRoleToGroupsSize() { + return (this.roleToGroups == null) ? 0 : this.roleToGroups.size(); + } + + public void putToRoleToGroups(String key, Set<String> val) { + if (this.roleToGroups == null) { + this.roleToGroups = new HashMap<String,Set<String>>(); + } + this.roleToGroups.put(key, val); + } + + public Map<String,Set<String>> getRoleToGroups() { + return this.roleToGroups; + } + + public void setRoleToGroups(Map<String,Set<String>> roleToGroups) { + this.roleToGroups = roleToGroups; + } + + public void unsetRoleToGroups() { + this.roleToGroups = null; + } + + /** Returns true if field roleToGroups is set (has been assigned a value) and false otherwise */ + public boolean isSetRoleToGroups() { + return this.roleToGroups != null; + } + + public void setRoleToGroupsIsSet(boolean value) { + if (!value) { + this.roleToGroups = null; + } + } + + public int getObjIdsSize() { + return (this.objIds == null) ? 0 : this.objIds.size(); + } + + public void putToObjIds(int key, TStoreAuthorizable val) { + if (this.objIds == null) { + this.objIds = new HashMap<Integer,TStoreAuthorizable>(); + } + this.objIds.put(key, val); + } + + public Map<Integer,TStoreAuthorizable> getObjIds() { + return this.objIds; + } + + public void setObjIds(Map<Integer,TStoreAuthorizable> objIds) { + this.objIds = objIds; + } + + public void unsetObjIds() { + this.objIds = null; + } + + /** Returns true if field objIds is set (has been assigned a value) and false otherwise */ + public boolean isSetObjIds() { + return this.objIds != null; + } + + public void setObjIdsIsSet(boolean value) { + if (!value) { + this.objIds = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROOT_AUTHORIZABLE: + if (value == null) { + unsetRootAuthorizable(); + } else { + setRootAuthorizable((Map<String,TStoreAuthorizable>)value); + } + break; + + case ROLE_TO_GROUPS: + if (value == null) { + unsetRoleToGroups(); + } else { + setRoleToGroups((Map<String,Set<String>>)value); + } + break; + + case OBJ_IDS: + if (value == null) { + unsetObjIds(); + } else { + setObjIds((Map<Integer,TStoreAuthorizable>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROOT_AUTHORIZABLE: + return getRootAuthorizable(); + + case ROLE_TO_GROUPS: + return getRoleToGroups(); + + case OBJ_IDS: + return getObjIds(); + + } + throw new IllegalStateException(); + } + + /** 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 ROOT_AUTHORIZABLE: + return isSetRootAuthorizable(); + case ROLE_TO_GROUPS: + return isSetRoleToGroups(); + case OBJ_IDS: + return isSetObjIds(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TStoreSnapshot) + return this.equals((TStoreSnapshot)that); + return false; + } + + public boolean equals(TStoreSnapshot that) { + if (that == null) + return false; + + boolean this_present_rootAuthorizable = true && this.isSetRootAuthorizable(); + boolean that_present_rootAuthorizable = true && that.isSetRootAuthorizable(); + if (this_present_rootAuthorizable || that_present_rootAuthorizable) { + if (!(this_present_rootAuthorizable && that_present_rootAuthorizable)) + return false; + if (!this.rootAuthorizable.equals(that.rootAuthorizable)) + return false; + } + + boolean this_present_roleToGroups = true && this.isSetRoleToGroups(); + boolean that_present_roleToGroups = true && that.isSetRoleToGroups(); + if (this_present_roleToGroups || that_present_roleToGroups) { + if (!(this_present_roleToGroups && that_present_roleToGroups)) + return false; + if (!this.roleToGroups.equals(that.roleToGroups)) + return false; + } + + boolean this_present_objIds = true && this.isSetObjIds(); + boolean that_present_objIds = true && that.isSetObjIds(); + if (this_present_objIds || that_present_objIds) { + if (!(this_present_objIds && that_present_objIds)) + return false; + if (!this.objIds.equals(that.objIds)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_rootAuthorizable = true && (isSetRootAuthorizable()); + builder.append(present_rootAuthorizable); + if (present_rootAuthorizable) + builder.append(rootAuthorizable); + + boolean present_roleToGroups = true && (isSetRoleToGroups()); + builder.append(present_roleToGroups); + if (present_roleToGroups) + builder.append(roleToGroups); + + boolean present_objIds = true && (isSetObjIds()); + builder.append(present_objIds); + if (present_objIds) + builder.append(objIds); + + return builder.toHashCode(); + } + + public int compareTo(TStoreSnapshot other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + TStoreSnapshot typedOther = (TStoreSnapshot)other; + + lastComparison = Boolean.valueOf(isSetRootAuthorizable()).compareTo(typedOther.isSetRootAuthorizable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRootAuthorizable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rootAuthorizable, typedOther.rootAuthorizable); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRoleToGroups()).compareTo(typedOther.isSetRoleToGroups()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRoleToGroups()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleToGroups, typedOther.roleToGroups); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetObjIds()).compareTo(typedOther.isSetObjIds()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetObjIds()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objIds, typedOther.objIds); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TStoreSnapshot("); + boolean first = true; + + sb.append("rootAuthorizable:"); + if (this.rootAuthorizable == null) { + sb.append("null"); + } else { + sb.append(this.rootAuthorizable); + } + first = false; + if (!first) sb.append(", "); + sb.append("roleToGroups:"); + if (this.roleToGroups == null) { + sb.append("null"); + } else { + sb.append(this.roleToGroups); + } + first = false; + if (!first) sb.append(", "); + sb.append("objIds:"); + if (this.objIds == null) { + sb.append("null"); + } else { + sb.append(this.objIds); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetRootAuthorizable()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'rootAuthorizable' is unset! Struct:" + toString()); + } + + if (!isSetRoleToGroups()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleToGroups' is unset! Struct:" + toString()); + } + + if (!isSetObjIds()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'objIds' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TStoreSnapshotStandardSchemeFactory implements SchemeFactory { + public TStoreSnapshotStandardScheme getScheme() { + return new TStoreSnapshotStandardScheme(); + } + } + + private static class TStoreSnapshotStandardScheme extends StandardScheme<TStoreSnapshot> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TStoreSnapshot struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROOT_AUTHORIZABLE + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map18 = iprot.readMapBegin(); + struct.rootAuthorizable = new HashMap<String,TStoreAuthorizable>(2*_map18.size); + for (int _i19 = 0; _i19 < _map18.size; ++_i19) + { + String _key20; // required + TStoreAuthorizable _val21; // required + _key20 = iprot.readString(); + _val21 = new TStoreAuthorizable(); + _val21.read(iprot); + struct.rootAuthorizable.put(_key20, _val21); + } + iprot.readMapEnd(); + } + struct.setRootAuthorizableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROLE_TO_GROUPS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map22 = iprot.readMapBegin(); + struct.roleToGroups = new HashMap<String,Set<String>>(2*_map22.size); + for (int _i23 = 0; _i23 < _map22.size; ++_i23) + { + String _key24; // required + Set<String> _val25; // required + _key24 = iprot.readString(); + { + org.apache.thrift.protocol.TSet _set26 = iprot.readSetBegin(); + _val25 = new HashSet<String>(2*_set26.size); + for (int _i27 = 0; _i27 < _set26.size; ++_i27) + { + String _elem28; // required + _elem28 = iprot.readString(); + _val25.add(_elem28); + } + iprot.readSetEnd(); + } + struct.roleToGroups.put(_key24, _val25); + } + iprot.readMapEnd(); + } + struct.setRoleToGroupsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // OBJ_IDS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map29 = iprot.readMapBegin(); + struct.objIds = new HashMap<Integer,TStoreAuthorizable>(2*_map29.size); + for (int _i30 = 0; _i30 < _map29.size; ++_i30) + { + int _key31; // required + TStoreAuthorizable _val32; // required + _key31 = iprot.readI32(); + _val32 = new TStoreAuthorizable(); + _val32.read(iprot); + struct.objIds.put(_key31, _val32); + } + iprot.readMapEnd(); + } + struct.setObjIdsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TStoreSnapshot struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rootAuthorizable != null) { + oprot.writeFieldBegin(ROOT_AUTHORIZABLE_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.rootAuthorizable.size())); + for (Map.Entry<String, TStoreAuthorizable> _iter33 : struct.rootAuthorizable.entrySet()) + { + oprot.writeString(_iter33.getKey()); + _iter33.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.roleToGroups != null) { + oprot.writeFieldBegin(ROLE_TO_GROUPS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, struct.roleToGroups.size())); + for (Map.Entry<String, Set<String>> _iter34 : struct.roleToGroups.entrySet()) + { + oprot.writeString(_iter34.getKey()); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, _iter34.getValue().size())); + for (String _iter35 : _iter34.getValue()) + { + oprot.writeString(_iter35); + } + oprot.writeSetEnd(); + } + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.objIds != null) { + oprot.writeFieldBegin(OBJ_IDS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, struct.objIds.size())); + for (Map.Entry<Integer, TStoreAuthorizable> _iter36 : struct.objIds.entrySet()) + { + oprot.writeI32(_iter36.getKey()); + _iter36.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TStoreSnapshotTupleSchemeFactory implements SchemeFactory { + public TStoreSnapshotTupleScheme getScheme() { + return new TStoreSnapshotTupleScheme(); + } + } + + private static class TStoreSnapshotTupleScheme extends TupleScheme<TStoreSnapshot> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TStoreSnapshot struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.rootAuthorizable.size()); + for (Map.Entry<String, TStoreAuthorizable> _iter37 : struct.rootAuthorizable.entrySet()) + { + oprot.writeString(_iter37.getKey()); + _iter37.getValue().write(oprot); + } + } + { + oprot.writeI32(struct.roleToGroups.size()); + for (Map.Entry<String, Set<String>> _iter38 : struct.roleToGroups.entrySet()) + { + oprot.writeString(_iter38.getKey()); + { + oprot.writeI32(_iter38.getValue().size()); + for (String _iter39 : _iter38.getValue()) + { + oprot.writeString(_iter39); + } + } + } + } + { + oprot.writeI32(struct.objIds.size()); + for (Map.Entry<Integer, TStoreAuthorizable> _iter40 : struct.objIds.entrySet()) + { + oprot.writeI32(_iter40.getKey()); + _iter40.getValue().write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TStoreSnapshot struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TMap _map41 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.rootAuthorizable = new HashMap<String,TStoreAuthorizable>(2*_map41.size); + for (int _i42 = 0; _i42 < _map41.size; ++_i42) + { + String _key43; // required + TStoreAuthorizable _val44; // required + _key43 = iprot.readString(); + _val44 = new TStoreAuthorizable(); + _val44.read(iprot); + struct.rootAuthorizable.put(_key43, _val44); + } + } + struct.setRootAuthorizableIsSet(true); + { + org.apache.thrift.protocol.TMap _map45 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, iprot.readI32()); + struct.roleToGroups = new HashMap<String,Set<String>>(2*_map45.size); + for (int _i46 = 0; _i46 < _map45.size; ++_i46) + { + String _key47; // required + Set<String> _val48; // required + _key47 = iprot.readString(); + { + org.apache.thrift.protocol.TSet _set49 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + _val48 = new HashSet<String>(2*_set49.size); + for (int _i50 = 0; _i50 < _set49.size; ++_i50) + { + String _elem51; // required + _elem51 = iprot.readString(); + _val48.add(_elem51); + } + } + struct.roleToGroups.put(_key47, _val48); + } + } + struct.setRoleToGroupsIsSet(true); + { + org.apache.thrift.protocol.TMap _map52 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.objIds = new HashMap<Integer,TStoreAuthorizable>(2*_map52.size); + for (int _i53 = 0; _i53 < _map52.size; ++_i53) + { + int _key54; // required + TStoreAuthorizable _val55; // required + _key54 = iprot.readI32(); + _val55 = new TStoreAuthorizable(); + _val55.read(iprot); + struct.objIds.put(_key54, _val55); + } + } + struct.setObjIdsIsSet(true); + } + } + +} + http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/c8c88786/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPrivilege.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPrivilege.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPrivilege.java index 1c68a0f..1da45a5 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPrivilege.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPrivilege.java @@ -25,7 +25,8 @@ import javax.jdo.annotations.PersistenceCapable; import org.apache.sentry.core.common.utils.PathUtils; import org.apache.sentry.core.model.db.AccessConstants; -import org.apache.sentry.provider.db.service.persistent.SentryStore; +import org.apache.sentry.provider.db.service.persistent.DbSentryStore; +import org.apache.sentry.provider.db.service.persistent.StoreUtils; /** * Database backed Sentry Privilege. Any changes to this object @@ -58,11 +59,11 @@ public class MSentryPrivilege { String URI, String action, Boolean grantOption) { this.privilegeScope = privilegeScope; this.serverName = serverName; - this.dbName = SentryStore.toNULLCol(dbName); - this.tableName = SentryStore.toNULLCol(tableName); - this.columnName = SentryStore.toNULLCol(columnName); - this.URI = SentryStore.toNULLCol(URI); - this.action = SentryStore.toNULLCol(action); + this.dbName = StoreUtils.toNULLCol(dbName); + this.tableName = StoreUtils.toNULLCol(tableName); + this.columnName = StoreUtils.toNULLCol(columnName); + this.URI = StoreUtils.toNULLCol(URI); + this.action = StoreUtils.toNULLCol(action); this.grantOption = grantOption; this.roles = new HashSet<MSentryRole>(); } @@ -77,11 +78,11 @@ public class MSentryPrivilege { public MSentryPrivilege(MSentryPrivilege other) { this.privilegeScope = other.privilegeScope; this.serverName = other.serverName; - this.dbName = SentryStore.toNULLCol(other.dbName); - this.tableName = SentryStore.toNULLCol(other.tableName); - this.columnName = SentryStore.toNULLCol(other.columnName); - this.URI = SentryStore.toNULLCol(other.URI); - this.action = SentryStore.toNULLCol(other.action); + this.dbName = StoreUtils.toNULLCol(other.dbName); + this.tableName = StoreUtils.toNULLCol(other.tableName); + this.columnName = StoreUtils.toNULLCol(other.columnName); + this.URI = StoreUtils.toNULLCol(other.URI); + this.action = StoreUtils.toNULLCol(other.action); this.grantOption = other.grantOption; this.roles = new HashSet<MSentryRole>(); for (MSentryRole role : other.roles) { @@ -304,7 +305,7 @@ public class MSentryPrivilege { } private boolean isNULL(String s) { - return SentryStore.isNULL(s); + return StoreUtils.isNULL(s); } public boolean isActionALL() {
