/**
* Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.yahoo.ycsb.db.tpcc.helper.rows;
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 StockRow implements org.apache.thrift.TBase<StockRow, StockRow._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StockRow");
private static final org.apache.thrift.protocol.TField S_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("s_quantity", org.apache.thrift.protocol.TType.I16, (short)3);
private static final org.apache.thrift.protocol.TField S_DIST_01_FIELD_DESC = new org.apache.thrift.protocol.TField("s_dist_01", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField S_DIST_02_FIELD_DESC = new org.apache.thrift.protocol.TField("s_dist_02", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField S_DIST_03_FIELD_DESC = new org.apache.thrift.protocol.TField("s_dist_03", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField S_DIST_04_FIELD_DESC = new org.apache.thrift.protocol.TField("s_dist_04", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField S_DIST_05_FIELD_DESC = new org.apache.thrift.protocol.TField("s_dist_05", org.apache.thrift.protocol.TType.STRING, (short)8);
private static final org.apache.thrift.protocol.TField S_DIST_06_FIELD_DESC = new org.apache.thrift.protocol.TField("s_dist_06", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final org.apache.thrift.protocol.TField S_DIST_07_FIELD_DESC = new org.apache.thrift.protocol.TField("s_dist_07", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField S_DIST_08_FIELD_DESC = new org.apache.thrift.protocol.TField("s_dist_08", org.apache.thrift.protocol.TType.STRING, (short)11);
private static final org.apache.thrift.protocol.TField S_DIST_09_FIELD_DESC = new org.apache.thrift.protocol.TField("s_dist_09", org.apache.thrift.protocol.TType.STRING, (short)12);
private static final org.apache.thrift.protocol.TField S_DIST_10_FIELD_DESC = new org.apache.thrift.protocol.TField("s_dist_10", org.apache.thrift.protocol.TType.STRING, (short)13);
private static final org.apache.thrift.protocol.TField S_YTD_FIELD_DESC = new org.apache.thrift.protocol.TField("s_ytd", org.apache.thrift.protocol.TType.I32, (short)14);
private static final org.apache.thrift.protocol.TField S_ORDER_CNT_FIELD_DESC = new org.apache.thrift.protocol.TField("s_order_cnt", org.apache.thrift.protocol.TType.I32, (short)15);
private static final org.apache.thrift.protocol.TField S_REMOTE_CNT_FIELD_DESC = new org.apache.thrift.protocol.TField("s_remote_cnt", org.apache.thrift.protocol.TType.I32, (short)16);
private static final org.apache.thrift.protocol.TField S_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("s_data", org.apache.thrift.protocol.TType.STRING, (short)17);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new StockRowStandardSchemeFactory());
schemes.put(TupleScheme.class, new StockRowTupleSchemeFactory());
}
public short s_quantity; // required
public String s_dist_01; // required
public String s_dist_02; // required
public String s_dist_03; // required
public String s_dist_04; // required
public String s_dist_05; // required
public String s_dist_06; // required
public String s_dist_07; // required
public String s_dist_08; // required
public String s_dist_09; // required
public String s_dist_10; // required
public int s_ytd; // required
public int s_order_cnt; // required
public int s_remote_cnt; // required
public String s_data; // 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 {
S_QUANTITY((short)3, "s_quantity"),
S_DIST_01((short)4, "s_dist_01"),
S_DIST_02((short)5, "s_dist_02"),
S_DIST_03((short)6, "s_dist_03"),
S_DIST_04((short)7, "s_dist_04"),
S_DIST_05((short)8, "s_dist_05"),
S_DIST_06((short)9, "s_dist_06"),
S_DIST_07((short)10, "s_dist_07"),
S_DIST_08((short)11, "s_dist_08"),
S_DIST_09((short)12, "s_dist_09"),
S_DIST_10((short)13, "s_dist_10"),
S_YTD((short)14, "s_ytd"),
S_ORDER_CNT((short)15, "s_order_cnt"),
S_REMOTE_CNT((short)16, "s_remote_cnt"),
S_DATA((short)17, "s_data");
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 3: // S_QUANTITY
return S_QUANTITY;
case 4: // S_DIST_01
return S_DIST_01;
case 5: // S_DIST_02
return S_DIST_02;
case 6: // S_DIST_03
return S_DIST_03;
case 7: // S_DIST_04
return S_DIST_04;
case 8: // S_DIST_05
return S_DIST_05;
case 9: // S_DIST_06
return S_DIST_06;
case 10: // S_DIST_07
return S_DIST_07;
case 11: // S_DIST_08
return S_DIST_08;
case 12: // S_DIST_09
return S_DIST_09;
case 13: // S_DIST_10
return S_DIST_10;
case 14: // S_YTD
return S_YTD;
case 15: // S_ORDER_CNT
return S_ORDER_CNT;
case 16: // S_REMOTE_CNT
return S_REMOTE_CNT;
case 17: // S_DATA
return S_DATA;
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 __S_QUANTITY_ISSET_ID = 0;
private static final int __S_YTD_ISSET_ID = 1;
private static final int __S_ORDER_CNT_ISSET_ID = 2;
private static final int __S_REMOTE_CNT_ISSET_ID = 3;
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.S_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("s_quantity", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
tmpMap.put(_Fields.S_DIST_01, new org.apache.thrift.meta_data.FieldMetaData("s_dist_01", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.S_DIST_02, new org.apache.thrift.meta_data.FieldMetaData("s_dist_02", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.S_DIST_03, new org.apache.thrift.meta_data.FieldMetaData("s_dist_03", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.S_DIST_04, new org.apache.thrift.meta_data.FieldMetaData("s_dist_04", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.S_DIST_05, new org.apache.thrift.meta_data.FieldMetaData("s_dist_05", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.S_DIST_06, new org.apache.thrift.meta_data.FieldMetaData("s_dist_06", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.S_DIST_07, new org.apache.thrift.meta_data.FieldMetaData("s_dist_07", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.S_DIST_08, new org.apache.thrift.meta_data.FieldMetaData("s_dist_08", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.S_DIST_09, new org.apache.thrift.meta_data.FieldMetaData("s_dist_09", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.S_DIST_10, new org.apache.thrift.meta_data.FieldMetaData("s_dist_10", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.S_YTD, new org.apache.thrift.meta_data.FieldMetaData("s_ytd", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.S_ORDER_CNT, new org.apache.thrift.meta_data.FieldMetaData("s_order_cnt", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.S_REMOTE_CNT, new org.apache.thrift.meta_data.FieldMetaData("s_remote_cnt", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.S_DATA, new org.apache.thrift.meta_data.FieldMetaData("s_data", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StockRow.class, metaDataMap);
}
public StockRow() {
}
public StockRow(
short s_quantity,
String s_dist_01,
String s_dist_02,
String s_dist_03,
String s_dist_04,
String s_dist_05,
String s_dist_06,
String s_dist_07,
String s_dist_08,
String s_dist_09,
String s_dist_10,
int s_ytd,
int s_order_cnt,
int s_remote_cnt,
String s_data)
{
this();
this.s_quantity = s_quantity;
setS_quantityIsSet(true);
this.s_dist_01 = s_dist_01;
this.s_dist_02 = s_dist_02;
this.s_dist_03 = s_dist_03;
this.s_dist_04 = s_dist_04;
this.s_dist_05 = s_dist_05;
this.s_dist_06 = s_dist_06;
this.s_dist_07 = s_dist_07;
this.s_dist_08 = s_dist_08;
this.s_dist_09 = s_dist_09;
this.s_dist_10 = s_dist_10;
this.s_ytd = s_ytd;
setS_ytdIsSet(true);
this.s_order_cnt = s_order_cnt;
setS_order_cntIsSet(true);
this.s_remote_cnt = s_remote_cnt;
setS_remote_cntIsSet(true);
this.s_data = s_data;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public StockRow(StockRow other) {
__isset_bitfield = other.__isset_bitfield;
this.s_quantity = other.s_quantity;
if (other.isSetS_dist_01()) {
this.s_dist_01 = other.s_dist_01;
}
if (other.isSetS_dist_02()) {
this.s_dist_02 = other.s_dist_02;
}
if (other.isSetS_dist_03()) {
this.s_dist_03 = other.s_dist_03;
}
if (other.isSetS_dist_04()) {
this.s_dist_04 = other.s_dist_04;
}
if (other.isSetS_dist_05()) {
this.s_dist_05 = other.s_dist_05;
}
if (other.isSetS_dist_06()) {
this.s_dist_06 = other.s_dist_06;
}
if (other.isSetS_dist_07()) {
this.s_dist_07 = other.s_dist_07;
}
if (other.isSetS_dist_08()) {
this.s_dist_08 = other.s_dist_08;
}
if (other.isSetS_dist_09()) {
this.s_dist_09 = other.s_dist_09;
}
if (other.isSetS_dist_10()) {
this.s_dist_10 = other.s_dist_10;
}
this.s_ytd = other.s_ytd;
this.s_order_cnt = other.s_order_cnt;
this.s_remote_cnt = other.s_remote_cnt;
if (other.isSetS_data()) {
this.s_data = other.s_data;
}
}
public StockRow deepCopy() {
return new StockRow(this);
}
@Override
public void clear() {
setS_quantityIsSet(false);
this.s_quantity = 0;
this.s_dist_01 = null;
this.s_dist_02 = null;
this.s_dist_03 = null;
this.s_dist_04 = null;
this.s_dist_05 = null;
this.s_dist_06 = null;
this.s_dist_07 = null;
this.s_dist_08 = null;
this.s_dist_09 = null;
this.s_dist_10 = null;
setS_ytdIsSet(false);
this.s_ytd = 0;
setS_order_cntIsSet(false);
this.s_order_cnt = 0;
setS_remote_cntIsSet(false);
this.s_remote_cnt = 0;
this.s_data = null;
}
public short getS_quantity() {
return this.s_quantity;
}
public StockRow setS_quantity(short s_quantity) {
this.s_quantity = s_quantity;
setS_quantityIsSet(true);
return this;
}
public void unsetS_quantity() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __S_QUANTITY_ISSET_ID);
}
/** Returns true if field s_quantity is set (has been assigned a value) and false otherwise */
public boolean isSetS_quantity() {
return EncodingUtils.testBit(__isset_bitfield, __S_QUANTITY_ISSET_ID);
}
public void setS_quantityIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __S_QUANTITY_ISSET_ID, value);
}
public String getS_dist_01() {
return this.s_dist_01;
}
public StockRow setS_dist_01(String s_dist_01) {
this.s_dist_01 = s_dist_01;
return this;
}
public void unsetS_dist_01() {
this.s_dist_01 = null;
}
/** Returns true if field s_dist_01 is set (has been assigned a value) and false otherwise */
public boolean isSetS_dist_01() {
return this.s_dist_01 != null;
}
public void setS_dist_01IsSet(boolean value) {
if (!value) {
this.s_dist_01 = null;
}
}
public String getS_dist_02() {
return this.s_dist_02;
}
public StockRow setS_dist_02(String s_dist_02) {
this.s_dist_02 = s_dist_02;
return this;
}
public void unsetS_dist_02() {
this.s_dist_02 = null;
}
/** Returns true if field s_dist_02 is set (has been assigned a value) and false otherwise */
public boolean isSetS_dist_02() {
return this.s_dist_02 != null;
}
public void setS_dist_02IsSet(boolean value) {
if (!value) {
this.s_dist_02 = null;
}
}
public String getS_dist_03() {
return this.s_dist_03;
}
public StockRow setS_dist_03(String s_dist_03) {
this.s_dist_03 = s_dist_03;
return this;
}
public void unsetS_dist_03() {
this.s_dist_03 = null;
}
/** Returns true if field s_dist_03 is set (has been assigned a value) and false otherwise */
public boolean isSetS_dist_03() {
return this.s_dist_03 != null;
}
public void setS_dist_03IsSet(boolean value) {
if (!value) {
this.s_dist_03 = null;
}
}
public String getS_dist_04() {
return this.s_dist_04;
}
public StockRow setS_dist_04(String s_dist_04) {
this.s_dist_04 = s_dist_04;
return this;
}
public void unsetS_dist_04() {
this.s_dist_04 = null;
}
/** Returns true if field s_dist_04 is set (has been assigned a value) and false otherwise */
public boolean isSetS_dist_04() {
return this.s_dist_04 != null;
}
public void setS_dist_04IsSet(boolean value) {
if (!value) {
this.s_dist_04 = null;
}
}
public String getS_dist_05() {
return this.s_dist_05;
}
public StockRow setS_dist_05(String s_dist_05) {
this.s_dist_05 = s_dist_05;
return this;
}
public void unsetS_dist_05() {
this.s_dist_05 = null;
}
/** Returns true if field s_dist_05 is set (has been assigned a value) and false otherwise */
public boolean isSetS_dist_05() {
return this.s_dist_05 != null;
}
public void setS_dist_05IsSet(boolean value) {
if (!value) {
this.s_dist_05 = null;
}
}
public String getS_dist_06() {
return this.s_dist_06;
}
public StockRow setS_dist_06(String s_dist_06) {
this.s_dist_06 = s_dist_06;
return this;
}
public void unsetS_dist_06() {
this.s_dist_06 = null;
}
/** Returns true if field s_dist_06 is set (has been assigned a value) and false otherwise */
public boolean isSetS_dist_06() {
return this.s_dist_06 != null;
}
public void setS_dist_06IsSet(boolean value) {
if (!value) {
this.s_dist_06 = null;
}
}
public String getS_dist_07() {
return this.s_dist_07;
}
public StockRow setS_dist_07(String s_dist_07) {
this.s_dist_07 = s_dist_07;
return this;
}
public void unsetS_dist_07() {
this.s_dist_07 = null;
}
/** Returns true if field s_dist_07 is set (has been assigned a value) and false otherwise */
public boolean isSetS_dist_07() {
return this.s_dist_07 != null;
}
public void setS_dist_07IsSet(boolean value) {
if (!value) {
this.s_dist_07 = null;
}
}
public String getS_dist_08() {
return this.s_dist_08;
}
public StockRow setS_dist_08(String s_dist_08) {
this.s_dist_08 = s_dist_08;
return this;
}
public void unsetS_dist_08() {
this.s_dist_08 = null;
}
/** Returns true if field s_dist_08 is set (has been assigned a value) and false otherwise */
public boolean isSetS_dist_08() {
return this.s_dist_08 != null;
}
public void setS_dist_08IsSet(boolean value) {
if (!value) {
this.s_dist_08 = null;
}
}
public String getS_dist_09() {
return this.s_dist_09;
}
public StockRow setS_dist_09(String s_dist_09) {
this.s_dist_09 = s_dist_09;
return this;
}
public void unsetS_dist_09() {
this.s_dist_09 = null;
}
/** Returns true if field s_dist_09 is set (has been assigned a value) and false otherwise */
public boolean isSetS_dist_09() {
return this.s_dist_09 != null;
}
public void setS_dist_09IsSet(boolean value) {
if (!value) {
this.s_dist_09 = null;
}
}
public String getS_dist_10() {
return this.s_dist_10;
}
public StockRow setS_dist_10(String s_dist_10) {
this.s_dist_10 = s_dist_10;
return this;
}
public void unsetS_dist_10() {
this.s_dist_10 = null;
}
/** Returns true if field s_dist_10 is set (has been assigned a value) and false otherwise */
public boolean isSetS_dist_10() {
return this.s_dist_10 != null;
}
public void setS_dist_10IsSet(boolean value) {
if (!value) {
this.s_dist_10 = null;
}
}
public int getS_ytd() {
return this.s_ytd;
}
public StockRow setS_ytd(int s_ytd) {
this.s_ytd = s_ytd;
setS_ytdIsSet(true);
return this;
}
public void unsetS_ytd() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __S_YTD_ISSET_ID);
}
/** Returns true if field s_ytd is set (has been assigned a value) and false otherwise */
public boolean isSetS_ytd() {
return EncodingUtils.testBit(__isset_bitfield, __S_YTD_ISSET_ID);
}
public void setS_ytdIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __S_YTD_ISSET_ID, value);
}
public int getS_order_cnt() {
return this.s_order_cnt;
}
public StockRow setS_order_cnt(int s_order_cnt) {
this.s_order_cnt = s_order_cnt;
setS_order_cntIsSet(true);
return this;
}
public void unsetS_order_cnt() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __S_ORDER_CNT_ISSET_ID);
}
/** Returns true if field s_order_cnt is set (has been assigned a value) and false otherwise */
public boolean isSetS_order_cnt() {
return EncodingUtils.testBit(__isset_bitfield, __S_ORDER_CNT_ISSET_ID);
}
public void setS_order_cntIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __S_ORDER_CNT_ISSET_ID, value);
}
public int getS_remote_cnt() {
return this.s_remote_cnt;
}
public StockRow setS_remote_cnt(int s_remote_cnt) {
this.s_remote_cnt = s_remote_cnt;
setS_remote_cntIsSet(true);
return this;
}
public void unsetS_remote_cnt() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __S_REMOTE_CNT_ISSET_ID);
}
/** Returns true if field s_remote_cnt is set (has been assigned a value) and false otherwise */
public boolean isSetS_remote_cnt() {
return EncodingUtils.testBit(__isset_bitfield, __S_REMOTE_CNT_ISSET_ID);
}
public void setS_remote_cntIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __S_REMOTE_CNT_ISSET_ID, value);
}
public String getS_data() {
return this.s_data;
}
public StockRow setS_data(String s_data) {
this.s_data = s_data;
return this;
}
public void unsetS_data() {
this.s_data = null;
}
/** Returns true if field s_data is set (has been assigned a value) and false otherwise */
public boolean isSetS_data() {
return this.s_data != null;
}
public void setS_dataIsSet(boolean value) {
if (!value) {
this.s_data = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case S_QUANTITY:
if (value == null) {
unsetS_quantity();
} else {
setS_quantity((Short)value);
}
break;
case S_DIST_01:
if (value == null) {
unsetS_dist_01();
} else {
setS_dist_01((String)value);
}
break;
case S_DIST_02:
if (value == null) {
unsetS_dist_02();
} else {
setS_dist_02((String)value);
}
break;
case S_DIST_03:
if (value == null) {
unsetS_dist_03();
} else {
setS_dist_03((String)value);
}
break;
case S_DIST_04:
if (value == null) {
unsetS_dist_04();
} else {
setS_dist_04((String)value);
}
break;
case S_DIST_05:
if (value == null) {
unsetS_dist_05();
} else {
setS_dist_05((String)value);
}
break;
case S_DIST_06:
if (value == null) {
unsetS_dist_06();
} else {
setS_dist_06((String)value);
}
break;
case S_DIST_07:
if (value == null) {
unsetS_dist_07();
} else {
setS_dist_07((String)value);
}
break;
case S_DIST_08:
if (value == null) {
unsetS_dist_08();
} else {
setS_dist_08((String)value);
}
break;
case S_DIST_09:
if (value == null) {
unsetS_dist_09();
} else {
setS_dist_09((String)value);
}
break;
case S_DIST_10:
if (value == null) {
unsetS_dist_10();
} else {
setS_dist_10((String)value);
}
break;
case S_YTD:
if (value == null) {
unsetS_ytd();
} else {
setS_ytd((Integer)value);
}
break;
case S_ORDER_CNT:
if (value == null) {
unsetS_order_cnt();
} else {
setS_order_cnt((Integer)value);
}
break;
case S_REMOTE_CNT:
if (value == null) {
unsetS_remote_cnt();
} else {
setS_remote_cnt((Integer)value);
}
break;
case S_DATA:
if (value == null) {
unsetS_data();
} else {
setS_data((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case S_QUANTITY:
return Short.valueOf(getS_quantity());
case S_DIST_01:
return getS_dist_01();
case S_DIST_02:
return getS_dist_02();
case S_DIST_03:
return getS_dist_03();
case S_DIST_04:
return getS_dist_04();
case S_DIST_05:
return getS_dist_05();
case S_DIST_06:
return getS_dist_06();
case S_DIST_07:
return getS_dist_07();
case S_DIST_08:
return getS_dist_08();
case S_DIST_09:
return getS_dist_09();
case S_DIST_10:
return getS_dist_10();
case S_YTD:
return Integer.valueOf(getS_ytd());
case S_ORDER_CNT:
return Integer.valueOf(getS_order_cnt());
case S_REMOTE_CNT:
return Integer.valueOf(getS_remote_cnt());
case S_DATA:
return getS_data();
}
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 S_QUANTITY:
return isSetS_quantity();
case S_DIST_01:
return isSetS_dist_01();
case S_DIST_02:
return isSetS_dist_02();
case S_DIST_03:
return isSetS_dist_03();
case S_DIST_04:
return isSetS_dist_04();
case S_DIST_05:
return isSetS_dist_05();
case S_DIST_06:
return isSetS_dist_06();
case S_DIST_07:
return isSetS_dist_07();
case S_DIST_08:
return isSetS_dist_08();
case S_DIST_09:
return isSetS_dist_09();
case S_DIST_10:
return isSetS_dist_10();
case S_YTD:
return isSetS_ytd();
case S_ORDER_CNT:
return isSetS_order_cnt();
case S_REMOTE_CNT:
return isSetS_remote_cnt();
case S_DATA:
return isSetS_data();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof StockRow)
return this.equals((StockRow)that);
return false;
}
public boolean equals(StockRow that) {
if (that == null)
return false;
boolean this_present_s_quantity = true;
boolean that_present_s_quantity = true;
if (this_present_s_quantity || that_present_s_quantity) {
if (!(this_present_s_quantity && that_present_s_quantity))
return false;
if (this.s_quantity != that.s_quantity)
return false;
}
boolean this_present_s_dist_01 = true && this.isSetS_dist_01();
boolean that_present_s_dist_01 = true && that.isSetS_dist_01();
if (this_present_s_dist_01 || that_present_s_dist_01) {
if (!(this_present_s_dist_01 && that_present_s_dist_01))
return false;
if (!this.s_dist_01.equals(that.s_dist_01))
return false;
}
boolean this_present_s_dist_02 = true && this.isSetS_dist_02();
boolean that_present_s_dist_02 = true && that.isSetS_dist_02();
if (this_present_s_dist_02 || that_present_s_dist_02) {
if (!(this_present_s_dist_02 && that_present_s_dist_02))
return false;
if (!this.s_dist_02.equals(that.s_dist_02))
return false;
}
boolean this_present_s_dist_03 = true && this.isSetS_dist_03();
boolean that_present_s_dist_03 = true && that.isSetS_dist_03();
if (this_present_s_dist_03 || that_present_s_dist_03) {
if (!(this_present_s_dist_03 && that_present_s_dist_03))
return false;
if (!this.s_dist_03.equals(that.s_dist_03))
return false;
}
boolean this_present_s_dist_04 = true && this.isSetS_dist_04();
boolean that_present_s_dist_04 = true && that.isSetS_dist_04();
if (this_present_s_dist_04 || that_present_s_dist_04) {
if (!(this_present_s_dist_04 && that_present_s_dist_04))
return false;
if (!this.s_dist_04.equals(that.s_dist_04))
return false;
}
boolean this_present_s_dist_05 = true && this.isSetS_dist_05();
boolean that_present_s_dist_05 = true && that.isSetS_dist_05();
if (this_present_s_dist_05 || that_present_s_dist_05) {
if (!(this_present_s_dist_05 && that_present_s_dist_05))
return false;
if (!this.s_dist_05.equals(that.s_dist_05))
return false;
}
boolean this_present_s_dist_06 = true && this.isSetS_dist_06();
boolean that_present_s_dist_06 = true && that.isSetS_dist_06();
if (this_present_s_dist_06 || that_present_s_dist_06) {
if (!(this_present_s_dist_06 && that_present_s_dist_06))
return false;
if (!this.s_dist_06.equals(that.s_dist_06))
return false;
}
boolean this_present_s_dist_07 = true && this.isSetS_dist_07();
boolean that_present_s_dist_07 = true && that.isSetS_dist_07();
if (this_present_s_dist_07 || that_present_s_dist_07) {
if (!(this_present_s_dist_07 && that_present_s_dist_07))
return false;
if (!this.s_dist_07.equals(that.s_dist_07))
return false;
}
boolean this_present_s_dist_08 = true && this.isSetS_dist_08();
boolean that_present_s_dist_08 = true && that.isSetS_dist_08();
if (this_present_s_dist_08 || that_present_s_dist_08) {
if (!(this_present_s_dist_08 && that_present_s_dist_08))
return false;
if (!this.s_dist_08.equals(that.s_dist_08))
return false;
}
boolean this_present_s_dist_09 = true && this.isSetS_dist_09();
boolean that_present_s_dist_09 = true && that.isSetS_dist_09();
if (this_present_s_dist_09 || that_present_s_dist_09) {
if (!(this_present_s_dist_09 && that_present_s_dist_09))
return false;
if (!this.s_dist_09.equals(that.s_dist_09))
return false;
}
boolean this_present_s_dist_10 = true && this.isSetS_dist_10();
boolean that_present_s_dist_10 = true && that.isSetS_dist_10();
if (this_present_s_dist_10 || that_present_s_dist_10) {
if (!(this_present_s_dist_10 && that_present_s_dist_10))
return false;
if (!this.s_dist_10.equals(that.s_dist_10))
return false;
}
boolean this_present_s_ytd = true;
boolean that_present_s_ytd = true;
if (this_present_s_ytd || that_present_s_ytd) {
if (!(this_present_s_ytd && that_present_s_ytd))
return false;
if (this.s_ytd != that.s_ytd)
return false;
}
boolean this_present_s_order_cnt = true;
boolean that_present_s_order_cnt = true;
if (this_present_s_order_cnt || that_present_s_order_cnt) {
if (!(this_present_s_order_cnt && that_present_s_order_cnt))
return false;
if (this.s_order_cnt != that.s_order_cnt)
return false;
}
boolean this_present_s_remote_cnt = true;
boolean that_present_s_remote_cnt = true;
if (this_present_s_remote_cnt || that_present_s_remote_cnt) {
if (!(this_present_s_remote_cnt && that_present_s_remote_cnt))
return false;
if (this.s_remote_cnt != that.s_remote_cnt)
return false;
}
boolean this_present_s_data = true && this.isSetS_data();
boolean that_present_s_data = true && that.isSetS_data();
if (this_present_s_data || that_present_s_data) {
if (!(this_present_s_data && that_present_s_data))
return false;
if (!this.s_data.equals(that.s_data))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(StockRow other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
StockRow typedOther = (StockRow)other;
lastComparison = Boolean.valueOf(isSetS_quantity()).compareTo(typedOther.isSetS_quantity());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_quantity()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_quantity, typedOther.s_quantity);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_dist_01()).compareTo(typedOther.isSetS_dist_01());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_dist_01()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_dist_01, typedOther.s_dist_01);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_dist_02()).compareTo(typedOther.isSetS_dist_02());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_dist_02()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_dist_02, typedOther.s_dist_02);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_dist_03()).compareTo(typedOther.isSetS_dist_03());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_dist_03()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_dist_03, typedOther.s_dist_03);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_dist_04()).compareTo(typedOther.isSetS_dist_04());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_dist_04()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_dist_04, typedOther.s_dist_04);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_dist_05()).compareTo(typedOther.isSetS_dist_05());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_dist_05()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_dist_05, typedOther.s_dist_05);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_dist_06()).compareTo(typedOther.isSetS_dist_06());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_dist_06()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_dist_06, typedOther.s_dist_06);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_dist_07()).compareTo(typedOther.isSetS_dist_07());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_dist_07()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_dist_07, typedOther.s_dist_07);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_dist_08()).compareTo(typedOther.isSetS_dist_08());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_dist_08()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_dist_08, typedOther.s_dist_08);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_dist_09()).compareTo(typedOther.isSetS_dist_09());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_dist_09()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_dist_09, typedOther.s_dist_09);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_dist_10()).compareTo(typedOther.isSetS_dist_10());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_dist_10()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_dist_10, typedOther.s_dist_10);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_ytd()).compareTo(typedOther.isSetS_ytd());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_ytd()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_ytd, typedOther.s_ytd);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_order_cnt()).compareTo(typedOther.isSetS_order_cnt());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_order_cnt()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_order_cnt, typedOther.s_order_cnt);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_remote_cnt()).compareTo(typedOther.isSetS_remote_cnt());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_remote_cnt()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_remote_cnt, typedOther.s_remote_cnt);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetS_data()).compareTo(typedOther.isSetS_data());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS_data()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_data, typedOther.s_data);
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("StockRow(");
boolean first = true;
sb.append("s_quantity:");
sb.append(this.s_quantity);
first = false;
if (!first) sb.append(", ");
sb.append("s_dist_01:");
if (this.s_dist_01 == null) {
sb.append("null");
} else {
sb.append(this.s_dist_01);
}
first = false;
if (!first) sb.append(", ");
sb.append("s_dist_02:");
if (this.s_dist_02 == null) {
sb.append("null");
} else {
sb.append(this.s_dist_02);
}
first = false;
if (!first) sb.append(", ");
sb.append("s_dist_03:");
if (this.s_dist_03 == null) {
sb.append("null");
} else {
sb.append(this.s_dist_03);
}
first = false;
if (!first) sb.append(", ");
sb.append("s_dist_04:");
if (this.s_dist_04 == null) {
sb.append("null");
} else {
sb.append(this.s_dist_04);
}
first = false;
if (!first) sb.append(", ");
sb.append("s_dist_05:");
if (this.s_dist_05 == null) {
sb.append("null");
} else {
sb.append(this.s_dist_05);
}
first = false;
if (!first) sb.append(", ");
sb.append("s_dist_06:");
if (this.s_dist_06 == null) {
sb.append("null");
} else {
sb.append(this.s_dist_06);
}
first = false;
if (!first) sb.append(", ");
sb.append("s_dist_07:");
if (this.s_dist_07 == null) {
sb.append("null");
} else {
sb.append(this.s_dist_07);
}
first = false;
if (!first) sb.append(", ");
sb.append("s_dist_08:");
if (this.s_dist_08 == null) {
sb.append("null");
} else {
sb.append(this.s_dist_08);
}
first = false;
if (!first) sb.append(", ");
sb.append("s_dist_09:");
if (this.s_dist_09 == null) {
sb.append("null");
} else {
sb.append(this.s_dist_09);
}
first = false;
if (!first) sb.append(", ");
sb.append("s_dist_10:");
if (this.s_dist_10 == null) {
sb.append("null");
} else {
sb.append(this.s_dist_10);
}
first = false;
if (!first) sb.append(", ");
sb.append("s_ytd:");
sb.append(this.s_ytd);
first = false;
if (!first) sb.append(", ");
sb.append("s_order_cnt:");
sb.append(this.s_order_cnt);
first = false;
if (!first) sb.append(", ");
sb.append("s_remote_cnt:");
sb.append(this.s_remote_cnt);
first = false;
if (!first) sb.append(", ");
sb.append("s_data:");
if (this.s_data == null) {
sb.append("null");
} else {
sb.append(this.s_data);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// 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 StockRowStandardSchemeFactory implements SchemeFactory {
public StockRowStandardScheme getScheme() {
return new StockRowStandardScheme();
}
}
private static class StockRowStandardScheme extends StandardScheme<StockRow> {
public void read(org.apache.thrift.protocol.TProtocol iprot, StockRow 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 3: // S_QUANTITY
if (schemeField.type == org.apache.thrift.protocol.TType.I16) {
struct.s_quantity = iprot.readI16();
struct.setS_quantityIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // S_DIST_01
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_dist_01 = iprot.readString();
struct.setS_dist_01IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // S_DIST_02
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_dist_02 = iprot.readString();
struct.setS_dist_02IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // S_DIST_03
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_dist_03 = iprot.readString();
struct.setS_dist_03IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // S_DIST_04
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_dist_04 = iprot.readString();
struct.setS_dist_04IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // S_DIST_05
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_dist_05 = iprot.readString();
struct.setS_dist_05IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // S_DIST_06
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_dist_06 = iprot.readString();
struct.setS_dist_06IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // S_DIST_07
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_dist_07 = iprot.readString();
struct.setS_dist_07IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // S_DIST_08
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_dist_08 = iprot.readString();
struct.setS_dist_08IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // S_DIST_09
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_dist_09 = iprot.readString();
struct.setS_dist_09IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // S_DIST_10
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_dist_10 = iprot.readString();
struct.setS_dist_10IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // S_YTD
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.s_ytd = iprot.readI32();
struct.setS_ytdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 15: // S_ORDER_CNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.s_order_cnt = iprot.readI32();
struct.setS_order_cntIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 16: // S_REMOTE_CNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.s_remote_cnt = iprot.readI32();
struct.setS_remote_cntIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 17: // S_DATA
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.s_data = iprot.readString();
struct.setS_dataIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, StockRow struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(S_QUANTITY_FIELD_DESC);
oprot.writeI16(struct.s_quantity);
oprot.writeFieldEnd();
if (struct.s_dist_01 != null) {
oprot.writeFieldBegin(S_DIST_01_FIELD_DESC);
oprot.writeString(struct.s_dist_01);
oprot.writeFieldEnd();
}
if (struct.s_dist_02 != null) {
oprot.writeFieldBegin(S_DIST_02_FIELD_DESC);
oprot.writeString(struct.s_dist_02);
oprot.writeFieldEnd();
}
if (struct.s_dist_03 != null) {
oprot.writeFieldBegin(S_DIST_03_FIELD_DESC);
oprot.writeString(struct.s_dist_03);
oprot.writeFieldEnd();
}
if (struct.s_dist_04 != null) {
oprot.writeFieldBegin(S_DIST_04_FIELD_DESC);
oprot.writeString(struct.s_dist_04);
oprot.writeFieldEnd();
}
if (struct.s_dist_05 != null) {
oprot.writeFieldBegin(S_DIST_05_FIELD_DESC);
oprot.writeString(struct.s_dist_05);
oprot.writeFieldEnd();
}
if (struct.s_dist_06 != null) {
oprot.writeFieldBegin(S_DIST_06_FIELD_DESC);
oprot.writeString(struct.s_dist_06);
oprot.writeFieldEnd();
}
if (struct.s_dist_07 != null) {
oprot.writeFieldBegin(S_DIST_07_FIELD_DESC);
oprot.writeString(struct.s_dist_07);
oprot.writeFieldEnd();
}
if (struct.s_dist_08 != null) {
oprot.writeFieldBegin(S_DIST_08_FIELD_DESC);
oprot.writeString(struct.s_dist_08);
oprot.writeFieldEnd();
}
if (struct.s_dist_09 != null) {
oprot.writeFieldBegin(S_DIST_09_FIELD_DESC);
oprot.writeString(struct.s_dist_09);
oprot.writeFieldEnd();
}
if (struct.s_dist_10 != null) {
oprot.writeFieldBegin(S_DIST_10_FIELD_DESC);
oprot.writeString(struct.s_dist_10);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(S_YTD_FIELD_DESC);
oprot.writeI32(struct.s_ytd);
oprot.writeFieldEnd();
oprot.writeFieldBegin(S_ORDER_CNT_FIELD_DESC);
oprot.writeI32(struct.s_order_cnt);
oprot.writeFieldEnd();
oprot.writeFieldBegin(S_REMOTE_CNT_FIELD_DESC);
oprot.writeI32(struct.s_remote_cnt);
oprot.writeFieldEnd();
if (struct.s_data != null) {
oprot.writeFieldBegin(S_DATA_FIELD_DESC);
oprot.writeString(struct.s_data);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class StockRowTupleSchemeFactory implements SchemeFactory {
public StockRowTupleScheme getScheme() {
return new StockRowTupleScheme();
}
}
private static class StockRowTupleScheme extends TupleScheme<StockRow> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, StockRow struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetS_quantity()) {
optionals.set(0);
}
if (struct.isSetS_dist_01()) {
optionals.set(1);
}
if (struct.isSetS_dist_02()) {
optionals.set(2);
}
if (struct.isSetS_dist_03()) {
optionals.set(3);
}
if (struct.isSetS_dist_04()) {
optionals.set(4);
}
if (struct.isSetS_dist_05()) {
optionals.set(5);
}
if (struct.isSetS_dist_06()) {
optionals.set(6);
}
if (struct.isSetS_dist_07()) {
optionals.set(7);
}
if (struct.isSetS_dist_08()) {
optionals.set(8);
}
if (struct.isSetS_dist_09()) {
optionals.set(9);
}
if (struct.isSetS_dist_10()) {
optionals.set(10);
}
if (struct.isSetS_ytd()) {
optionals.set(11);
}
if (struct.isSetS_order_cnt()) {
optionals.set(12);
}
if (struct.isSetS_remote_cnt()) {
optionals.set(13);
}
if (struct.isSetS_data()) {
optionals.set(14);
}
oprot.writeBitSet(optionals, 15);
if (struct.isSetS_quantity()) {
oprot.writeI16(struct.s_quantity);
}
if (struct.isSetS_dist_01()) {
oprot.writeString(struct.s_dist_01);
}
if (struct.isSetS_dist_02()) {
oprot.writeString(struct.s_dist_02);
}
if (struct.isSetS_dist_03()) {
oprot.writeString(struct.s_dist_03);
}
if (struct.isSetS_dist_04()) {
oprot.writeString(struct.s_dist_04);
}
if (struct.isSetS_dist_05()) {
oprot.writeString(struct.s_dist_05);
}
if (struct.isSetS_dist_06()) {
oprot.writeString(struct.s_dist_06);
}
if (struct.isSetS_dist_07()) {
oprot.writeString(struct.s_dist_07);
}
if (struct.isSetS_dist_08()) {
oprot.writeString(struct.s_dist_08);
}
if (struct.isSetS_dist_09()) {
oprot.writeString(struct.s_dist_09);
}
if (struct.isSetS_dist_10()) {
oprot.writeString(struct.s_dist_10);
}
if (struct.isSetS_ytd()) {
oprot.writeI32(struct.s_ytd);
}
if (struct.isSetS_order_cnt()) {
oprot.writeI32(struct.s_order_cnt);
}
if (struct.isSetS_remote_cnt()) {
oprot.writeI32(struct.s_remote_cnt);
}
if (struct.isSetS_data()) {
oprot.writeString(struct.s_data);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, StockRow struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(15);
if (incoming.get(0)) {
struct.s_quantity = iprot.readI16();
struct.setS_quantityIsSet(true);
}
if (incoming.get(1)) {
struct.s_dist_01 = iprot.readString();
struct.setS_dist_01IsSet(true);
}
if (incoming.get(2)) {
struct.s_dist_02 = iprot.readString();
struct.setS_dist_02IsSet(true);
}
if (incoming.get(3)) {
struct.s_dist_03 = iprot.readString();
struct.setS_dist_03IsSet(true);
}
if (incoming.get(4)) {
struct.s_dist_04 = iprot.readString();
struct.setS_dist_04IsSet(true);
}
if (incoming.get(5)) {
struct.s_dist_05 = iprot.readString();
struct.setS_dist_05IsSet(true);
}
if (incoming.get(6)) {
struct.s_dist_06 = iprot.readString();
struct.setS_dist_06IsSet(true);
}
if (incoming.get(7)) {
struct.s_dist_07 = iprot.readString();
struct.setS_dist_07IsSet(true);
}
if (incoming.get(8)) {
struct.s_dist_08 = iprot.readString();
struct.setS_dist_08IsSet(true);
}
if (incoming.get(9)) {
struct.s_dist_09 = iprot.readString();
struct.setS_dist_09IsSet(true);
}
if (incoming.get(10)) {
struct.s_dist_10 = iprot.readString();
struct.setS_dist_10IsSet(true);
}
if (incoming.get(11)) {
struct.s_ytd = iprot.readI32();
struct.setS_ytdIsSet(true);
}
if (incoming.get(12)) {
struct.s_order_cnt = iprot.readI32();
struct.setS_order_cntIsSet(true);
}
if (incoming.get(13)) {
struct.s_remote_cnt = iprot.readI32();
struct.setS_remote_cntIsSet(true);
}
if (incoming.get(14)) {
struct.s_data = iprot.readString();
struct.setS_dataIsSet(true);
}
}
}
}