com.xiaomi.infra.galaxy.sds.thrift.TableSchema Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.xiaomi.infra.galaxy.sds.thrift;
import libthrift091.scheme.IScheme;
import libthrift091.scheme.SchemeFactory;
import libthrift091.scheme.StandardScheme;
import libthrift091.scheme.TupleScheme;
import libthrift091.protocol.TTupleProtocol;
import libthrift091.protocol.TProtocolException;
import libthrift091.EncodingUtils;
import libthrift091.TException;
import libthrift091.async.AsyncMethodCallback;
import libthrift091.server.AbstractNonblockingServer.*;
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 javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* 表Schema设置
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-8-10")
public class TableSchema implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("TableSchema");
private static final libthrift091.protocol.TField VERSION_FIELD_DESC = new libthrift091.protocol.TField("version", libthrift091.protocol.TType.I32, (short)1);
private static final libthrift091.protocol.TField ENTITY_GROUP_FIELD_DESC = new libthrift091.protocol.TField("entityGroup", libthrift091.protocol.TType.STRUCT, (short)2);
private static final libthrift091.protocol.TField PRIMARY_INDEX_FIELD_DESC = new libthrift091.protocol.TField("primaryIndex", libthrift091.protocol.TType.LIST, (short)3);
private static final libthrift091.protocol.TField SECONDARY_INDEXES_FIELD_DESC = new libthrift091.protocol.TField("secondaryIndexes", libthrift091.protocol.TType.MAP, (short)4);
private static final libthrift091.protocol.TField ATTRIBUTES_FIELD_DESC = new libthrift091.protocol.TField("attributes", libthrift091.protocol.TType.MAP, (short)5);
private static final libthrift091.protocol.TField TTL_FIELD_DESC = new libthrift091.protocol.TField("ttl", libthrift091.protocol.TType.I32, (short)6);
private static final libthrift091.protocol.TField PRE_SPLITS_FIELD_DESC = new libthrift091.protocol.TField("preSplits", libthrift091.protocol.TType.I32, (short)7);
private static final libthrift091.protocol.TField STREAMS_FIELD_DESC = new libthrift091.protocol.TField("streams", libthrift091.protocol.TType.MAP, (short)8);
private static final libthrift091.protocol.TField GLOBAL_SECONDARY_INDEXES_FIELD_DESC = new libthrift091.protocol.TField("globalSecondaryIndexes", libthrift091.protocol.TType.MAP, (short)9);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TableSchemaStandardSchemeFactory());
schemes.put(TupleScheme.class, new TableSchemaTupleSchemeFactory());
}
/**
* Schema版本号,仅作为输出,作为输入不需要设置
*/
public int version; // optional
/**
* Entity group定义, 不设置表示不开启Entity Group支持。
* 开启后自动支持应用用户表空间隔离(需配合相应权限设置),
* 即每个应用用户将看到独立的表空间
*/
public EntityGroupSpec entityGroup; // optional
/**
* 主键定义
*/
public List primaryIndex; // required
/**
* 二级索引定义
*/
public Map secondaryIndexes; // optional
/**
* 属性定义
*/
public Map attributes; // optional
/**
* 记录存活时间,单位为秒。-1表示不会自动删除
*/
public int ttl; // optional
/**
* 表初始分片数目,仅支持Entity Group开启hash分布的表,且仅在建表时起作用
*/
public int preSplits; // optional
/**
* stream定义, TopicName => StreamSpec
*/
public Map streams; // optional
/**
* 全局二级索引定义
*/
public Map globalSecondaryIndexes; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
/**
* Schema版本号,仅作为输出,作为输入不需要设置
*/
VERSION((short)1, "version"),
/**
* Entity group定义, 不设置表示不开启Entity Group支持。
* 开启后自动支持应用用户表空间隔离(需配合相应权限设置),
* 即每个应用用户将看到独立的表空间
*/
ENTITY_GROUP((short)2, "entityGroup"),
/**
* 主键定义
*/
PRIMARY_INDEX((short)3, "primaryIndex"),
/**
* 二级索引定义
*/
SECONDARY_INDEXES((short)4, "secondaryIndexes"),
/**
* 属性定义
*/
ATTRIBUTES((short)5, "attributes"),
/**
* 记录存活时间,单位为秒。-1表示不会自动删除
*/
TTL((short)6, "ttl"),
/**
* 表初始分片数目,仅支持Entity Group开启hash分布的表,且仅在建表时起作用
*/
PRE_SPLITS((short)7, "preSplits"),
/**
* stream定义, TopicName => StreamSpec
*/
STREAMS((short)8, "streams"),
/**
* 全局二级索引定义
*/
GLOBAL_SECONDARY_INDEXES((short)9, "globalSecondaryIndexes");
private static final Map byName = new HashMap();
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: // VERSION
return VERSION;
case 2: // ENTITY_GROUP
return ENTITY_GROUP;
case 3: // PRIMARY_INDEX
return PRIMARY_INDEX;
case 4: // SECONDARY_INDEXES
return SECONDARY_INDEXES;
case 5: // ATTRIBUTES
return ATTRIBUTES;
case 6: // TTL
return TTL;
case 7: // PRE_SPLITS
return PRE_SPLITS;
case 8: // STREAMS
return STREAMS;
case 9: // GLOBAL_SECONDARY_INDEXES
return GLOBAL_SECONDARY_INDEXES;
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 __VERSION_ISSET_ID = 0;
private static final int __TTL_ISSET_ID = 1;
private static final int __PRESPLITS_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.VERSION,_Fields.ENTITY_GROUP,_Fields.SECONDARY_INDEXES,_Fields.ATTRIBUTES,_Fields.TTL,_Fields.PRE_SPLITS,_Fields.STREAMS,_Fields.GLOBAL_SECONDARY_INDEXES};
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.VERSION, new libthrift091.meta_data.FieldMetaData("version", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
tmpMap.put(_Fields.ENTITY_GROUP, new libthrift091.meta_data.FieldMetaData("entityGroup", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, EntityGroupSpec.class)));
tmpMap.put(_Fields.PRIMARY_INDEX, new libthrift091.meta_data.FieldMetaData("primaryIndex", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.LIST , "IndexSpec")));
tmpMap.put(_Fields.SECONDARY_INDEXES, new libthrift091.meta_data.FieldMetaData("secondaryIndexes", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING),
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, LocalSecondaryIndexSpec.class))));
tmpMap.put(_Fields.ATTRIBUTES, new libthrift091.meta_data.FieldMetaData("attributes", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING),
new libthrift091.meta_data.EnumMetaData(libthrift091.protocol.TType.ENUM, DataType.class))));
tmpMap.put(_Fields.TTL, new libthrift091.meta_data.FieldMetaData("ttl", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
tmpMap.put(_Fields.PRE_SPLITS, new libthrift091.meta_data.FieldMetaData("preSplits", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32)));
tmpMap.put(_Fields.STREAMS, new libthrift091.meta_data.FieldMetaData("streams", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING),
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, StreamSpec.class))));
tmpMap.put(_Fields.GLOBAL_SECONDARY_INDEXES, new libthrift091.meta_data.FieldMetaData("globalSecondaryIndexes", libthrift091.TFieldRequirementType.OPTIONAL,
new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING),
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GlobalSecondaryIndexSpec.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(TableSchema.class, metaDataMap);
}
public TableSchema() {
this.ttl = -1;
this.preSplits = 1;
}
public TableSchema(
List primaryIndex)
{
this();
this.primaryIndex = primaryIndex;
}
/**
* Performs a deep copy on other.
*/
public TableSchema(TableSchema other) {
__isset_bitfield = other.__isset_bitfield;
this.version = other.version;
if (other.isSetEntityGroup()) {
this.entityGroup = new EntityGroupSpec(other.entityGroup);
}
if (other.isSetPrimaryIndex()) {
this.primaryIndex = other.primaryIndex;
}
if (other.isSetSecondaryIndexes()) {
Map __this__secondaryIndexes = new HashMap(other.secondaryIndexes.size());
for (Map.Entry other_element : other.secondaryIndexes.entrySet()) {
String other_element_key = other_element.getKey();
LocalSecondaryIndexSpec other_element_value = other_element.getValue();
String __this__secondaryIndexes_copy_key = other_element_key;
LocalSecondaryIndexSpec __this__secondaryIndexes_copy_value = new LocalSecondaryIndexSpec(other_element_value);
__this__secondaryIndexes.put(__this__secondaryIndexes_copy_key, __this__secondaryIndexes_copy_value);
}
this.secondaryIndexes = __this__secondaryIndexes;
}
if (other.isSetAttributes()) {
Map __this__attributes = new HashMap(other.attributes.size());
for (Map.Entry other_element : other.attributes.entrySet()) {
String other_element_key = other_element.getKey();
DataType other_element_value = other_element.getValue();
String __this__attributes_copy_key = other_element_key;
DataType __this__attributes_copy_value = other_element_value;
__this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
}
this.attributes = __this__attributes;
}
this.ttl = other.ttl;
this.preSplits = other.preSplits;
if (other.isSetStreams()) {
Map __this__streams = new HashMap(other.streams.size());
for (Map.Entry other_element : other.streams.entrySet()) {
String other_element_key = other_element.getKey();
StreamSpec other_element_value = other_element.getValue();
String __this__streams_copy_key = other_element_key;
StreamSpec __this__streams_copy_value = new StreamSpec(other_element_value);
__this__streams.put(__this__streams_copy_key, __this__streams_copy_value);
}
this.streams = __this__streams;
}
if (other.isSetGlobalSecondaryIndexes()) {
Map __this__globalSecondaryIndexes = new HashMap(other.globalSecondaryIndexes.size());
for (Map.Entry other_element : other.globalSecondaryIndexes.entrySet()) {
String other_element_key = other_element.getKey();
GlobalSecondaryIndexSpec other_element_value = other_element.getValue();
String __this__globalSecondaryIndexes_copy_key = other_element_key;
GlobalSecondaryIndexSpec __this__globalSecondaryIndexes_copy_value = new GlobalSecondaryIndexSpec(other_element_value);
__this__globalSecondaryIndexes.put(__this__globalSecondaryIndexes_copy_key, __this__globalSecondaryIndexes_copy_value);
}
this.globalSecondaryIndexes = __this__globalSecondaryIndexes;
}
}
public TableSchema deepCopy() {
return new TableSchema(this);
}
@Override
public void clear() {
setVersionIsSet(false);
this.version = 0;
this.entityGroup = null;
this.primaryIndex = null;
this.secondaryIndexes = null;
this.attributes = null;
this.ttl = -1;
this.preSplits = 1;
this.streams = null;
this.globalSecondaryIndexes = null;
}
/**
* Schema版本号,仅作为输出,作为输入不需要设置
*/
public int getVersion() {
return this.version;
}
/**
* Schema版本号,仅作为输出,作为输入不需要设置
*/
public TableSchema setVersion(int version) {
this.version = version;
setVersionIsSet(true);
return this;
}
public void unsetVersion() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void setVersionIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
/**
* Entity group定义, 不设置表示不开启Entity Group支持。
* 开启后自动支持应用用户表空间隔离(需配合相应权限设置),
* 即每个应用用户将看到独立的表空间
*/
public EntityGroupSpec getEntityGroup() {
return this.entityGroup;
}
/**
* Entity group定义, 不设置表示不开启Entity Group支持。
* 开启后自动支持应用用户表空间隔离(需配合相应权限设置),
* 即每个应用用户将看到独立的表空间
*/
public TableSchema setEntityGroup(EntityGroupSpec entityGroup) {
this.entityGroup = entityGroup;
return this;
}
public void unsetEntityGroup() {
this.entityGroup = null;
}
/** Returns true if field entityGroup is set (has been assigned a value) and false otherwise */
public boolean isSetEntityGroup() {
return this.entityGroup != null;
}
public void setEntityGroupIsSet(boolean value) {
if (!value) {
this.entityGroup = null;
}
}
public int getPrimaryIndexSize() {
return (this.primaryIndex == null) ? 0 : this.primaryIndex.size();
}
public java.util.Iterator getPrimaryIndexIterator() {
return (this.primaryIndex == null) ? null : this.primaryIndex.iterator();
}
public void addToPrimaryIndex(KeySpec elem) {
if (this.primaryIndex == null) {
this.primaryIndex = new ArrayList();
}
this.primaryIndex.add(elem);
}
/**
* 主键定义
*/
public List getPrimaryIndex() {
return this.primaryIndex;
}
/**
* 主键定义
*/
public TableSchema setPrimaryIndex(List primaryIndex) {
this.primaryIndex = primaryIndex;
return this;
}
public void unsetPrimaryIndex() {
this.primaryIndex = null;
}
/** Returns true if field primaryIndex is set (has been assigned a value) and false otherwise */
public boolean isSetPrimaryIndex() {
return this.primaryIndex != null;
}
public void setPrimaryIndexIsSet(boolean value) {
if (!value) {
this.primaryIndex = null;
}
}
public int getSecondaryIndexesSize() {
return (this.secondaryIndexes == null) ? 0 : this.secondaryIndexes.size();
}
public void putToSecondaryIndexes(String key, LocalSecondaryIndexSpec val) {
if (this.secondaryIndexes == null) {
this.secondaryIndexes = new HashMap();
}
this.secondaryIndexes.put(key, val);
}
/**
* 二级索引定义
*/
public Map getSecondaryIndexes() {
return this.secondaryIndexes;
}
/**
* 二级索引定义
*/
public TableSchema setSecondaryIndexes(Map secondaryIndexes) {
this.secondaryIndexes = secondaryIndexes;
return this;
}
public void unsetSecondaryIndexes() {
this.secondaryIndexes = null;
}
/** Returns true if field secondaryIndexes is set (has been assigned a value) and false otherwise */
public boolean isSetSecondaryIndexes() {
return this.secondaryIndexes != null;
}
public void setSecondaryIndexesIsSet(boolean value) {
if (!value) {
this.secondaryIndexes = null;
}
}
public int getAttributesSize() {
return (this.attributes == null) ? 0 : this.attributes.size();
}
public void putToAttributes(String key, DataType val) {
if (this.attributes == null) {
this.attributes = new HashMap();
}
this.attributes.put(key, val);
}
/**
* 属性定义
*/
public Map getAttributes() {
return this.attributes;
}
/**
* 属性定义
*/
public TableSchema setAttributes(Map attributes) {
this.attributes = attributes;
return this;
}
public void unsetAttributes() {
this.attributes = null;
}
/** Returns true if field attributes is set (has been assigned a value) and false otherwise */
public boolean isSetAttributes() {
return this.attributes != null;
}
public void setAttributesIsSet(boolean value) {
if (!value) {
this.attributes = null;
}
}
/**
* 记录存活时间,单位为秒。-1表示不会自动删除
*/
public int getTtl() {
return this.ttl;
}
/**
* 记录存活时间,单位为秒。-1表示不会自动删除
*/
public TableSchema setTtl(int ttl) {
this.ttl = ttl;
setTtlIsSet(true);
return this;
}
public void unsetTtl() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TTL_ISSET_ID);
}
/** Returns true if field ttl is set (has been assigned a value) and false otherwise */
public boolean isSetTtl() {
return EncodingUtils.testBit(__isset_bitfield, __TTL_ISSET_ID);
}
public void setTtlIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TTL_ISSET_ID, value);
}
/**
* 表初始分片数目,仅支持Entity Group开启hash分布的表,且仅在建表时起作用
*/
public int getPreSplits() {
return this.preSplits;
}
/**
* 表初始分片数目,仅支持Entity Group开启hash分布的表,且仅在建表时起作用
*/
public TableSchema setPreSplits(int preSplits) {
this.preSplits = preSplits;
setPreSplitsIsSet(true);
return this;
}
public void unsetPreSplits() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRESPLITS_ISSET_ID);
}
/** Returns true if field preSplits is set (has been assigned a value) and false otherwise */
public boolean isSetPreSplits() {
return EncodingUtils.testBit(__isset_bitfield, __PRESPLITS_ISSET_ID);
}
public void setPreSplitsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRESPLITS_ISSET_ID, value);
}
public int getStreamsSize() {
return (this.streams == null) ? 0 : this.streams.size();
}
public void putToStreams(String key, StreamSpec val) {
if (this.streams == null) {
this.streams = new HashMap();
}
this.streams.put(key, val);
}
/**
* stream定义, TopicName => StreamSpec
*/
public Map getStreams() {
return this.streams;
}
/**
* stream定义, TopicName => StreamSpec
*/
public TableSchema setStreams(Map streams) {
this.streams = streams;
return this;
}
public void unsetStreams() {
this.streams = null;
}
/** Returns true if field streams is set (has been assigned a value) and false otherwise */
public boolean isSetStreams() {
return this.streams != null;
}
public void setStreamsIsSet(boolean value) {
if (!value) {
this.streams = null;
}
}
public int getGlobalSecondaryIndexesSize() {
return (this.globalSecondaryIndexes == null) ? 0 : this.globalSecondaryIndexes.size();
}
public void putToGlobalSecondaryIndexes(String key, GlobalSecondaryIndexSpec val) {
if (this.globalSecondaryIndexes == null) {
this.globalSecondaryIndexes = new HashMap();
}
this.globalSecondaryIndexes.put(key, val);
}
/**
* 全局二级索引定义
*/
public Map getGlobalSecondaryIndexes() {
return this.globalSecondaryIndexes;
}
/**
* 全局二级索引定义
*/
public TableSchema setGlobalSecondaryIndexes(Map globalSecondaryIndexes) {
this.globalSecondaryIndexes = globalSecondaryIndexes;
return this;
}
public void unsetGlobalSecondaryIndexes() {
this.globalSecondaryIndexes = null;
}
/** Returns true if field globalSecondaryIndexes is set (has been assigned a value) and false otherwise */
public boolean isSetGlobalSecondaryIndexes() {
return this.globalSecondaryIndexes != null;
}
public void setGlobalSecondaryIndexesIsSet(boolean value) {
if (!value) {
this.globalSecondaryIndexes = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case VERSION:
if (value == null) {
unsetVersion();
} else {
setVersion((Integer)value);
}
break;
case ENTITY_GROUP:
if (value == null) {
unsetEntityGroup();
} else {
setEntityGroup((EntityGroupSpec)value);
}
break;
case PRIMARY_INDEX:
if (value == null) {
unsetPrimaryIndex();
} else {
setPrimaryIndex((List)value);
}
break;
case SECONDARY_INDEXES:
if (value == null) {
unsetSecondaryIndexes();
} else {
setSecondaryIndexes((Map)value);
}
break;
case ATTRIBUTES:
if (value == null) {
unsetAttributes();
} else {
setAttributes((Map)value);
}
break;
case TTL:
if (value == null) {
unsetTtl();
} else {
setTtl((Integer)value);
}
break;
case PRE_SPLITS:
if (value == null) {
unsetPreSplits();
} else {
setPreSplits((Integer)value);
}
break;
case STREAMS:
if (value == null) {
unsetStreams();
} else {
setStreams((Map)value);
}
break;
case GLOBAL_SECONDARY_INDEXES:
if (value == null) {
unsetGlobalSecondaryIndexes();
} else {
setGlobalSecondaryIndexes((Map)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case VERSION:
return Integer.valueOf(getVersion());
case ENTITY_GROUP:
return getEntityGroup();
case PRIMARY_INDEX:
return getPrimaryIndex();
case SECONDARY_INDEXES:
return getSecondaryIndexes();
case ATTRIBUTES:
return getAttributes();
case TTL:
return Integer.valueOf(getTtl());
case PRE_SPLITS:
return Integer.valueOf(getPreSplits());
case STREAMS:
return getStreams();
case GLOBAL_SECONDARY_INDEXES:
return getGlobalSecondaryIndexes();
}
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 VERSION:
return isSetVersion();
case ENTITY_GROUP:
return isSetEntityGroup();
case PRIMARY_INDEX:
return isSetPrimaryIndex();
case SECONDARY_INDEXES:
return isSetSecondaryIndexes();
case ATTRIBUTES:
return isSetAttributes();
case TTL:
return isSetTtl();
case PRE_SPLITS:
return isSetPreSplits();
case STREAMS:
return isSetStreams();
case GLOBAL_SECONDARY_INDEXES:
return isSetGlobalSecondaryIndexes();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof TableSchema)
return this.equals((TableSchema)that);
return false;
}
public boolean equals(TableSchema that) {
if (that == null)
return false;
boolean this_present_version = true && this.isSetVersion();
boolean that_present_version = true && that.isSetVersion();
if (this_present_version || that_present_version) {
if (!(this_present_version && that_present_version))
return false;
if (this.version != that.version)
return false;
}
boolean this_present_entityGroup = true && this.isSetEntityGroup();
boolean that_present_entityGroup = true && that.isSetEntityGroup();
if (this_present_entityGroup || that_present_entityGroup) {
if (!(this_present_entityGroup && that_present_entityGroup))
return false;
if (!this.entityGroup.equals(that.entityGroup))
return false;
}
boolean this_present_primaryIndex = true && this.isSetPrimaryIndex();
boolean that_present_primaryIndex = true && that.isSetPrimaryIndex();
if (this_present_primaryIndex || that_present_primaryIndex) {
if (!(this_present_primaryIndex && that_present_primaryIndex))
return false;
if (!this.primaryIndex.equals(that.primaryIndex))
return false;
}
boolean this_present_secondaryIndexes = true && this.isSetSecondaryIndexes();
boolean that_present_secondaryIndexes = true && that.isSetSecondaryIndexes();
if (this_present_secondaryIndexes || that_present_secondaryIndexes) {
if (!(this_present_secondaryIndexes && that_present_secondaryIndexes))
return false;
if (!this.secondaryIndexes.equals(that.secondaryIndexes))
return false;
}
boolean this_present_attributes = true && this.isSetAttributes();
boolean that_present_attributes = true && that.isSetAttributes();
if (this_present_attributes || that_present_attributes) {
if (!(this_present_attributes && that_present_attributes))
return false;
if (!this.attributes.equals(that.attributes))
return false;
}
boolean this_present_ttl = true && this.isSetTtl();
boolean that_present_ttl = true && that.isSetTtl();
if (this_present_ttl || that_present_ttl) {
if (!(this_present_ttl && that_present_ttl))
return false;
if (this.ttl != that.ttl)
return false;
}
boolean this_present_preSplits = true && this.isSetPreSplits();
boolean that_present_preSplits = true && that.isSetPreSplits();
if (this_present_preSplits || that_present_preSplits) {
if (!(this_present_preSplits && that_present_preSplits))
return false;
if (this.preSplits != that.preSplits)
return false;
}
boolean this_present_streams = true && this.isSetStreams();
boolean that_present_streams = true && that.isSetStreams();
if (this_present_streams || that_present_streams) {
if (!(this_present_streams && that_present_streams))
return false;
if (!this.streams.equals(that.streams))
return false;
}
boolean this_present_globalSecondaryIndexes = true && this.isSetGlobalSecondaryIndexes();
boolean that_present_globalSecondaryIndexes = true && that.isSetGlobalSecondaryIndexes();
if (this_present_globalSecondaryIndexes || that_present_globalSecondaryIndexes) {
if (!(this_present_globalSecondaryIndexes && that_present_globalSecondaryIndexes))
return false;
if (!this.globalSecondaryIndexes.equals(that.globalSecondaryIndexes))
return false;
}
return true;
}
@Override
public int hashCode() {
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy