/**
* 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 CustomerRow implements org.apache.thrift.TBase<CustomerRow, CustomerRow._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CustomerRow");
private static final org.apache.thrift.protocol.TField C_LAST_FIELD_DESC = new org.apache.thrift.protocol.TField("c_last", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField C_MIDDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("c_middle", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField C_FIRST_FIELD_DESC = new org.apache.thrift.protocol.TField("c_first", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField C_STREET_1_FIELD_DESC = new org.apache.thrift.protocol.TField("c_street_1", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField C_STREET_2_FIELD_DESC = new org.apache.thrift.protocol.TField("c_street_2", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField C_CITY_FIELD_DESC = new org.apache.thrift.protocol.TField("c_city", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField C_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("c_state", org.apache.thrift.protocol.TType.STRING, (short)8);
private static final org.apache.thrift.protocol.TField C_ZIP_FIELD_DESC = new org.apache.thrift.protocol.TField("c_zip", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final org.apache.thrift.protocol.TField C_PHONE_FIELD_DESC = new org.apache.thrift.protocol.TField("c_phone", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField C_SINCE_FIELD_DESC = new org.apache.thrift.protocol.TField("c_since", org.apache.thrift.protocol.TType.STRING, (short)11);
private static final org.apache.thrift.protocol.TField C_CREDIT_FIELD_DESC = new org.apache.thrift.protocol.TField("c_credit", org.apache.thrift.protocol.TType.STRING, (short)12);
private static final org.apache.thrift.protocol.TField C_CREDIT_LIM_FIELD_DESC = new org.apache.thrift.protocol.TField("c_credit_lim", org.apache.thrift.protocol.TType.DOUBLE, (short)13);
private static final org.apache.thrift.protocol.TField C_DISCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("c_discount", org.apache.thrift.protocol.TType.DOUBLE, (short)14);
private static final org.apache.thrift.protocol.TField C_BALANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("c_balance", org.apache.thrift.protocol.TType.DOUBLE, (short)15);
private static final org.apache.thrift.protocol.TField C_YTD_PAYMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("c_ytd_payment", org.apache.thrift.protocol.TType.DOUBLE, (short)16);
private static final org.apache.thrift.protocol.TField C_PAYMENT_CNT_FIELD_DESC = new org.apache.thrift.protocol.TField("c_payment_cnt", org.apache.thrift.protocol.TType.I32, (short)17);
private static final org.apache.thrift.protocol.TField C_DELIVERY_CNT_FIELD_DESC = new org.apache.thrift.protocol.TField("c_delivery_cnt", org.apache.thrift.protocol.TType.I32, (short)18);
private static final org.apache.thrift.protocol.TField C_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("c_data", org.apache.thrift.protocol.TType.STRING, (short)19);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new CustomerRowStandardSchemeFactory());
schemes.put(TupleScheme.class, new CustomerRowTupleSchemeFactory());
}
public String c_last; // required
public String c_middle; // required
public String c_first; // required
public String c_street_1; // required
public String c_street_2; // required
public String c_city; // required
public String c_state; // required
public String c_zip; // required
public String c_phone; // required
public String c_since; // required
public String c_credit; // required
public double c_credit_lim; // required
public double c_discount; // required
public double c_balance; // required
public double c_ytd_payment; // required
public int c_payment_cnt; // required
public int c_delivery_cnt; // required
public String c_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 {
C_LAST((short)1, "c_last"),
C_MIDDLE((short)2, "c_middle"),
C_FIRST((short)3, "c_first"),
C_STREET_1((short)5, "c_street_1"),
C_STREET_2((short)6, "c_street_2"),
C_CITY((short)7, "c_city"),
C_STATE((short)8, "c_state"),
C_ZIP((short)9, "c_zip"),
C_PHONE((short)10, "c_phone"),
C_SINCE((short)11, "c_since"),
C_CREDIT((short)12, "c_credit"),
C_CREDIT_LIM((short)13, "c_credit_lim"),
C_DISCOUNT((short)14, "c_discount"),
C_BALANCE((short)15, "c_balance"),
C_YTD_PAYMENT((short)16, "c_ytd_payment"),
C_PAYMENT_CNT((short)17, "c_payment_cnt"),
C_DELIVERY_CNT((short)18, "c_delivery_cnt"),
C_DATA((short)19, "c_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 1: // C_LAST
return C_LAST;
case 2: // C_MIDDLE
return C_MIDDLE;
case 3: // C_FIRST
return C_FIRST;
case 5: // C_STREET_1
return C_STREET_1;
case 6: // C_STREET_2
return C_STREET_2;
case 7: // C_CITY
return C_CITY;
case 8: // C_STATE
return C_STATE;
case 9: // C_ZIP
return C_ZIP;
case 10: // C_PHONE
return C_PHONE;
case 11: // C_SINCE
return C_SINCE;
case 12: // C_CREDIT
return C_CREDIT;
case 13: // C_CREDIT_LIM
return C_CREDIT_LIM;
case 14: // C_DISCOUNT
return C_DISCOUNT;
case 15: // C_BALANCE
return C_BALANCE;
case 16: // C_YTD_PAYMENT
return C_YTD_PAYMENT;
case 17: // C_PAYMENT_CNT
return C_PAYMENT_CNT;
case 18: // C_DELIVERY_CNT
return C_DELIVERY_CNT;
case 19: // C_DATA
return C_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 __C_CREDIT_LIM_ISSET_ID = 0;
private static final int __C_DISCOUNT_ISSET_ID = 1;
private static final int __C_BALANCE_ISSET_ID = 2;
private static final int __C_YTD_PAYMENT_ISSET_ID = 3;
private static final int __C_PAYMENT_CNT_ISSET_ID = 4;
private static final int __C_DELIVERY_CNT_ISSET_ID = 5;
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.C_LAST, new org.apache.thrift.meta_data.FieldMetaData("c_last", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_MIDDLE, new org.apache.thrift.meta_data.FieldMetaData("c_middle", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_FIRST, new org.apache.thrift.meta_data.FieldMetaData("c_first", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_STREET_1, new org.apache.thrift.meta_data.FieldMetaData("c_street_1", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_STREET_2, new org.apache.thrift.meta_data.FieldMetaData("c_street_2", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_CITY, new org.apache.thrift.meta_data.FieldMetaData("c_city", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_STATE, new org.apache.thrift.meta_data.FieldMetaData("c_state", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_ZIP, new org.apache.thrift.meta_data.FieldMetaData("c_zip", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_PHONE, new org.apache.thrift.meta_data.FieldMetaData("c_phone", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_SINCE, new org.apache.thrift.meta_data.FieldMetaData("c_since", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_CREDIT, new org.apache.thrift.meta_data.FieldMetaData("c_credit", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.C_CREDIT_LIM, new org.apache.thrift.meta_data.FieldMetaData("c_credit_lim", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.C_DISCOUNT, new org.apache.thrift.meta_data.FieldMetaData("c_discount", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.C_BALANCE, new org.apache.thrift.meta_data.FieldMetaData("c_balance", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.C_YTD_PAYMENT, new org.apache.thrift.meta_data.FieldMetaData("c_ytd_payment", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.C_PAYMENT_CNT, new org.apache.thrift.meta_data.FieldMetaData("c_payment_cnt", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.C_DELIVERY_CNT, new org.apache.thrift.meta_data.FieldMetaData("c_delivery_cnt", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.C_DATA, new org.apache.thrift.meta_data.FieldMetaData("c_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(CustomerRow.class, metaDataMap);
}
public CustomerRow() {
}
public CustomerRow(
String c_last,
String c_middle,
String c_first,
String c_street_1,
String c_street_2,
String c_city,
String c_state,
String c_zip,
String c_phone,
String c_since,
String c_credit,
double c_credit_lim,
double c_discount,
double c_balance,
double c_ytd_payment,
int c_payment_cnt,
int c_delivery_cnt,
String c_data)
{
this();
this.c_last = c_last;
this.c_middle = c_middle;
this.c_first = c_first;
this.c_street_1 = c_street_1;
this.c_street_2 = c_street_2;
this.c_city = c_city;
this.c_state = c_state;
this.c_zip = c_zip;
this.c_phone = c_phone;
this.c_since = c_since;
this.c_credit = c_credit;
this.c_credit_lim = c_credit_lim;
setC_credit_limIsSet(true);
this.c_discount = c_discount;
setC_discountIsSet(true);
this.c_balance = c_balance;
setC_balanceIsSet(true);
this.c_ytd_payment = c_ytd_payment;
setC_ytd_paymentIsSet(true);
this.c_payment_cnt = c_payment_cnt;
setC_payment_cntIsSet(true);
this.c_delivery_cnt = c_delivery_cnt;
setC_delivery_cntIsSet(true);
this.c_data = c_data;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public CustomerRow(CustomerRow other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetC_last()) {
this.c_last = other.c_last;
}
if (other.isSetC_middle()) {
this.c_middle = other.c_middle;
}
if (other.isSetC_first()) {
this.c_first = other.c_first;
}
if (other.isSetC_street_1()) {
this.c_street_1 = other.c_street_1;
}
if (other.isSetC_street_2()) {
this.c_street_2 = other.c_street_2;
}
if (other.isSetC_city()) {
this.c_city = other.c_city;
}
if (other.isSetC_state()) {
this.c_state = other.c_state;
}
if (other.isSetC_zip()) {
this.c_zip = other.c_zip;
}
if (other.isSetC_phone()) {
this.c_phone = other.c_phone;
}
if (other.isSetC_since()) {
this.c_since = other.c_since;
}
if (other.isSetC_credit()) {
this.c_credit = other.c_credit;
}
this.c_credit_lim = other.c_credit_lim;
this.c_discount = other.c_discount;
this.c_balance = other.c_balance;
this.c_ytd_payment = other.c_ytd_payment;
this.c_payment_cnt = other.c_payment_cnt;
this.c_delivery_cnt = other.c_delivery_cnt;
if (other.isSetC_data()) {
this.c_data = other.c_data;
}
}
public CustomerRow deepCopy() {
return new CustomerRow(this);
}
@Override
public void clear() {
this.c_last = null;
this.c_middle = null;
this.c_first = null;
this.c_street_1 = null;
this.c_street_2 = null;
this.c_city = null;
this.c_state = null;
this.c_zip = null;
this.c_phone = null;
this.c_since = null;
this.c_credit = null;
setC_credit_limIsSet(false);
this.c_credit_lim = 0.0;
setC_discountIsSet(false);
this.c_discount = 0.0;
setC_balanceIsSet(false);
this.c_balance = 0.0;
setC_ytd_paymentIsSet(false);
this.c_ytd_payment = 0.0;
setC_payment_cntIsSet(false);
this.c_payment_cnt = 0;
setC_delivery_cntIsSet(false);
this.c_delivery_cnt = 0;
this.c_data = null;
}
public String getC_last() {
return this.c_last;
}
public CustomerRow setC_last(String c_last) {
this.c_last = c_last;
return this;
}
public void unsetC_last() {
this.c_last = null;
}
/** Returns true if field c_last is set (has been assigned a value) and false otherwise */
public boolean isSetC_last() {
return this.c_last != null;
}
public void setC_lastIsSet(boolean value) {
if (!value) {
this.c_last = null;
}
}
public String getC_middle() {
return this.c_middle;
}
public CustomerRow setC_middle(String c_middle) {
this.c_middle = c_middle;
return this;
}
public void unsetC_middle() {
this.c_middle = null;
}
/** Returns true if field c_middle is set (has been assigned a value) and false otherwise */
public boolean isSetC_middle() {
return this.c_middle != null;
}
public void setC_middleIsSet(boolean value) {
if (!value) {
this.c_middle = null;
}
}
public String getC_first() {
return this.c_first;
}
public CustomerRow setC_first(String c_first) {
this.c_first = c_first;
return this;
}
public void unsetC_first() {
this.c_first = null;
}
/** Returns true if field c_first is set (has been assigned a value) and false otherwise */
public boolean isSetC_first() {
return this.c_first != null;
}
public void setC_firstIsSet(boolean value) {
if (!value) {
this.c_first = null;
}
}
public String getC_street_1() {
return this.c_street_1;
}
public CustomerRow setC_street_1(String c_street_1) {
this.c_street_1 = c_street_1;
return this;
}
public void unsetC_street_1() {
this.c_street_1 = null;
}
/** Returns true if field c_street_1 is set (has been assigned a value) and false otherwise */
public boolean isSetC_street_1() {
return this.c_street_1 != null;
}
public void setC_street_1IsSet(boolean value) {
if (!value) {
this.c_street_1 = null;
}
}
public String getC_street_2() {
return this.c_street_2;
}
public CustomerRow setC_street_2(String c_street_2) {
this.c_street_2 = c_street_2;
return this;
}
public void unsetC_street_2() {
this.c_street_2 = null;
}
/** Returns true if field c_street_2 is set (has been assigned a value) and false otherwise */
public boolean isSetC_street_2() {
return this.c_street_2 != null;
}
public void setC_street_2IsSet(boolean value) {
if (!value) {
this.c_street_2 = null;
}
}
public String getC_city() {
return this.c_city;
}
public CustomerRow setC_city(String c_city) {
this.c_city = c_city;
return this;
}
public void unsetC_city() {
this.c_city = null;
}
/** Returns true if field c_city is set (has been assigned a value) and false otherwise */
public boolean isSetC_city() {
return this.c_city != null;
}
public void setC_cityIsSet(boolean value) {
if (!value) {
this.c_city = null;
}
}
public String getC_state() {
return this.c_state;
}
public CustomerRow setC_state(String c_state) {
this.c_state = c_state;
return this;
}
public void unsetC_state() {
this.c_state = null;
}
/** Returns true if field c_state is set (has been assigned a value) and false otherwise */
public boolean isSetC_state() {
return this.c_state != null;
}
public void setC_stateIsSet(boolean value) {
if (!value) {
this.c_state = null;
}
}
public String getC_zip() {
return this.c_zip;
}
public CustomerRow setC_zip(String c_zip) {
this.c_zip = c_zip;
return this;
}
public void unsetC_zip() {
this.c_zip = null;
}
/** Returns true if field c_zip is set (has been assigned a value) and false otherwise */
public boolean isSetC_zip() {
return this.c_zip != null;
}
public void setC_zipIsSet(boolean value) {
if (!value) {
this.c_zip = null;
}
}
public String getC_phone() {
return this.c_phone;
}
public CustomerRow setC_phone(String c_phone) {
this.c_phone = c_phone;
return this;
}
public void unsetC_phone() {
this.c_phone = null;
}
/** Returns true if field c_phone is set (has been assigned a value) and false otherwise */
public boolean isSetC_phone() {
return this.c_phone != null;
}
public void setC_phoneIsSet(boolean value) {
if (!value) {
this.c_phone = null;
}
}
public String getC_since() {
return this.c_since;
}
public CustomerRow setC_since(String c_since) {
this.c_since = c_since;
return this;
}
public void unsetC_since() {
this.c_since = null;
}
/** Returns true if field c_since is set (has been assigned a value) and false otherwise */
public boolean isSetC_since() {
return this.c_since != null;
}
public void setC_sinceIsSet(boolean value) {
if (!value) {
this.c_since = null;
}
}
public String getC_credit() {
return this.c_credit;
}
public CustomerRow setC_credit(String c_credit) {
this.c_credit = c_credit;
return this;
}
public void unsetC_credit() {
this.c_credit = null;
}
/** Returns true if field c_credit is set (has been assigned a value) and false otherwise */
public boolean isSetC_credit() {
return this.c_credit != null;
}
public void setC_creditIsSet(boolean value) {
if (!value) {
this.c_credit = null;
}
}
public double getC_credit_lim() {
return this.c_credit_lim;
}
public CustomerRow setC_credit_lim(double c_credit_lim) {
this.c_credit_lim = c_credit_lim;
setC_credit_limIsSet(true);
return this;
}
public void unsetC_credit_lim() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __C_CREDIT_LIM_ISSET_ID);
}
/** Returns true if field c_credit_lim is set (has been assigned a value) and false otherwise */
public boolean isSetC_credit_lim() {
return EncodingUtils.testBit(__isset_bitfield, __C_CREDIT_LIM_ISSET_ID);
}
public void setC_credit_limIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __C_CREDIT_LIM_ISSET_ID, value);
}
public double getC_discount() {
return this.c_discount;
}
public CustomerRow setC_discount(double c_discount) {
this.c_discount = c_discount;
setC_discountIsSet(true);
return this;
}
public void unsetC_discount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __C_DISCOUNT_ISSET_ID);
}
/** Returns true if field c_discount is set (has been assigned a value) and false otherwise */
public boolean isSetC_discount() {
return EncodingUtils.testBit(__isset_bitfield, __C_DISCOUNT_ISSET_ID);
}
public void setC_discountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __C_DISCOUNT_ISSET_ID, value);
}
public double getC_balance() {
return this.c_balance;
}
public CustomerRow setC_balance(double c_balance) {
this.c_balance = c_balance;
setC_balanceIsSet(true);
return this;
}
public void unsetC_balance() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __C_BALANCE_ISSET_ID);
}
/** Returns true if field c_balance is set (has been assigned a value) and false otherwise */
public boolean isSetC_balance() {
return EncodingUtils.testBit(__isset_bitfield, __C_BALANCE_ISSET_ID);
}
public void setC_balanceIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __C_BALANCE_ISSET_ID, value);
}
public double getC_ytd_payment() {
return this.c_ytd_payment;
}
public CustomerRow setC_ytd_payment(double c_ytd_payment) {
this.c_ytd_payment = c_ytd_payment;
setC_ytd_paymentIsSet(true);
return this;
}
public void unsetC_ytd_payment() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __C_YTD_PAYMENT_ISSET_ID);
}
/** Returns true if field c_ytd_payment is set (has been assigned a value) and false otherwise */
public boolean isSetC_ytd_payment() {
return EncodingUtils.testBit(__isset_bitfield, __C_YTD_PAYMENT_ISSET_ID);
}
public void setC_ytd_paymentIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __C_YTD_PAYMENT_ISSET_ID, value);
}
public int getC_payment_cnt() {
return this.c_payment_cnt;
}
public CustomerRow setC_payment_cnt(int c_payment_cnt) {
this.c_payment_cnt = c_payment_cnt;
setC_payment_cntIsSet(true);
return this;
}
public void unsetC_payment_cnt() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __C_PAYMENT_CNT_ISSET_ID);
}
/** Returns true if field c_payment_cnt is set (has been assigned a value) and false otherwise */
public boolean isSetC_payment_cnt() {
return EncodingUtils.testBit(__isset_bitfield, __C_PAYMENT_CNT_ISSET_ID);
}
public void setC_payment_cntIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __C_PAYMENT_CNT_ISSET_ID, value);
}
public int getC_delivery_cnt() {
return this.c_delivery_cnt;
}
public CustomerRow setC_delivery_cnt(int c_delivery_cnt) {
this.c_delivery_cnt = c_delivery_cnt;
setC_delivery_cntIsSet(true);
return this;
}
public void unsetC_delivery_cnt() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __C_DELIVERY_CNT_ISSET_ID);
}
/** Returns true if field c_delivery_cnt is set (has been assigned a value) and false otherwise */
public boolean isSetC_delivery_cnt() {
return EncodingUtils.testBit(__isset_bitfield, __C_DELIVERY_CNT_ISSET_ID);
}
public void setC_delivery_cntIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __C_DELIVERY_CNT_ISSET_ID, value);
}
public String getC_data() {
return this.c_data;
}
public CustomerRow setC_data(String c_data) {
this.c_data = c_data;
return this;
}
public void unsetC_data() {
this.c_data = null;
}
/** Returns true if field c_data is set (has been assigned a value) and false otherwise */
public boolean isSetC_data() {
return this.c_data != null;
}
public void setC_dataIsSet(boolean value) {
if (!value) {
this.c_data = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case C_LAST:
if (value == null) {
unsetC_last();
} else {
setC_last((String)value);
}
break;
case C_MIDDLE:
if (value == null) {
unsetC_middle();
} else {
setC_middle((String)value);
}
break;
case C_FIRST:
if (value == null) {
unsetC_first();
} else {
setC_first((String)value);
}
break;
case C_STREET_1:
if (value == null) {
unsetC_street_1();
} else {
setC_street_1((String)value);
}
break;
case C_STREET_2:
if (value == null) {
unsetC_street_2();
} else {
setC_street_2((String)value);
}
break;
case C_CITY:
if (value == null) {
unsetC_city();
} else {
setC_city((String)value);
}
break;
case C_STATE:
if (value == null) {
unsetC_state();
} else {
setC_state((String)value);
}
break;
case C_ZIP:
if (value == null) {
unsetC_zip();
} else {
setC_zip((String)value);
}
break;
case C_PHONE:
if (value == null) {
unsetC_phone();
} else {
setC_phone((String)value);
}
break;
case C_SINCE:
if (value == null) {
unsetC_since();
} else {
setC_since((String)value);
}
break;
case C_CREDIT:
if (value == null) {
unsetC_credit();
} else {
setC_credit((String)value);
}
break;
case C_CREDIT_LIM:
if (value == null) {
unsetC_credit_lim();
} else {
setC_credit_lim((Double)value);
}
break;
case C_DISCOUNT:
if (value == null) {
unsetC_discount();
} else {
setC_discount((Double)value);
}
break;
case C_BALANCE:
if (value == null) {
unsetC_balance();
} else {
setC_balance((Double)value);
}
break;
case C_YTD_PAYMENT:
if (value == null) {
unsetC_ytd_payment();
} else {
setC_ytd_payment((Double)value);
}
break;
case C_PAYMENT_CNT:
if (value == null) {
unsetC_payment_cnt();
} else {
setC_payment_cnt((Integer)value);
}
break;
case C_DELIVERY_CNT:
if (value == null) {
unsetC_delivery_cnt();
} else {
setC_delivery_cnt((Integer)value);
}
break;
case C_DATA:
if (value == null) {
unsetC_data();
} else {
setC_data((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case C_LAST:
return getC_last();
case C_MIDDLE:
return getC_middle();
case C_FIRST:
return getC_first();
case C_STREET_1:
return getC_street_1();
case C_STREET_2:
return getC_street_2();
case C_CITY:
return getC_city();
case C_STATE:
return getC_state();
case C_ZIP:
return getC_zip();
case C_PHONE:
return getC_phone();
case C_SINCE:
return getC_since();
case C_CREDIT:
return getC_credit();
case C_CREDIT_LIM:
return Double.valueOf(getC_credit_lim());
case C_DISCOUNT:
return Double.valueOf(getC_discount());
case C_BALANCE:
return Double.valueOf(getC_balance());
case C_YTD_PAYMENT:
return Double.valueOf(getC_ytd_payment());
case C_PAYMENT_CNT:
return Integer.valueOf(getC_payment_cnt());
case C_DELIVERY_CNT:
return Integer.valueOf(getC_delivery_cnt());
case C_DATA:
return getC_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 C_LAST:
return isSetC_last();
case C_MIDDLE:
return isSetC_middle();
case C_FIRST:
return isSetC_first();
case C_STREET_1:
return isSetC_street_1();
case C_STREET_2:
return isSetC_street_2();
case C_CITY:
return isSetC_city();
case C_STATE:
return isSetC_state();
case C_ZIP:
return isSetC_zip();
case C_PHONE:
return isSetC_phone();
case C_SINCE:
return isSetC_since();
case C_CREDIT:
return isSetC_credit();
case C_CREDIT_LIM:
return isSetC_credit_lim();
case C_DISCOUNT:
return isSetC_discount();
case C_BALANCE:
return isSetC_balance();
case C_YTD_PAYMENT:
return isSetC_ytd_payment();
case C_PAYMENT_CNT:
return isSetC_payment_cnt();
case C_DELIVERY_CNT:
return isSetC_delivery_cnt();
case C_DATA:
return isSetC_data();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof CustomerRow)
return this.equals((CustomerRow)that);
return false;
}
public boolean equals(CustomerRow that) {
if (that == null)
return false;
boolean this_present_c_last = true && this.isSetC_last();
boolean that_present_c_last = true && that.isSetC_last();
if (this_present_c_last || that_present_c_last) {
if (!(this_present_c_last && that_present_c_last))
return false;
if (!this.c_last.equals(that.c_last))
return false;
}
boolean this_present_c_middle = true && this.isSetC_middle();
boolean that_present_c_middle = true && that.isSetC_middle();
if (this_present_c_middle || that_present_c_middle) {
if (!(this_present_c_middle && that_present_c_middle))
return false;
if (!this.c_middle.equals(that.c_middle))
return false;
}
boolean this_present_c_first = true && this.isSetC_first();
boolean that_present_c_first = true && that.isSetC_first();
if (this_present_c_first || that_present_c_first) {
if (!(this_present_c_first && that_present_c_first))
return false;
if (!this.c_first.equals(that.c_first))
return false;
}
boolean this_present_c_street_1 = true && this.isSetC_street_1();
boolean that_present_c_street_1 = true && that.isSetC_street_1();
if (this_present_c_street_1 || that_present_c_street_1) {
if (!(this_present_c_street_1 && that_present_c_street_1))
return false;
if (!this.c_street_1.equals(that.c_street_1))
return false;
}
boolean this_present_c_street_2 = true && this.isSetC_street_2();
boolean that_present_c_street_2 = true && that.isSetC_street_2();
if (this_present_c_street_2 || that_present_c_street_2) {
if (!(this_present_c_street_2 && that_present_c_street_2))
return false;
if (!this.c_street_2.equals(that.c_street_2))
return false;
}
boolean this_present_c_city = true && this.isSetC_city();
boolean that_present_c_city = true && that.isSetC_city();
if (this_present_c_city || that_present_c_city) {
if (!(this_present_c_city && that_present_c_city))
return false;
if (!this.c_city.equals(that.c_city))
return false;
}
boolean this_present_c_state = true && this.isSetC_state();
boolean that_present_c_state = true && that.isSetC_state();
if (this_present_c_state || that_present_c_state) {
if (!(this_present_c_state && that_present_c_state))
return false;
if (!this.c_state.equals(that.c_state))
return false;
}
boolean this_present_c_zip = true && this.isSetC_zip();
boolean that_present_c_zip = true && that.isSetC_zip();
if (this_present_c_zip || that_present_c_zip) {
if (!(this_present_c_zip && that_present_c_zip))
return false;
if (!this.c_zip.equals(that.c_zip))
return false;
}
boolean this_present_c_phone = true && this.isSetC_phone();
boolean that_present_c_phone = true && that.isSetC_phone();
if (this_present_c_phone || that_present_c_phone) {
if (!(this_present_c_phone && that_present_c_phone))
return false;
if (!this.c_phone.equals(that.c_phone))
return false;
}
boolean this_present_c_since = true && this.isSetC_since();
boolean that_present_c_since = true && that.isSetC_since();
if (this_present_c_since || that_present_c_since) {
if (!(this_present_c_since && that_present_c_since))
return false;
if (!this.c_since.equals(that.c_since))
return false;
}
boolean this_present_c_credit = true && this.isSetC_credit();
boolean that_present_c_credit = true && that.isSetC_credit();
if (this_present_c_credit || that_present_c_credit) {
if (!(this_present_c_credit && that_present_c_credit))
return false;
if (!this.c_credit.equals(that.c_credit))
return false;
}
boolean this_present_c_credit_lim = true;
boolean that_present_c_credit_lim = true;
if (this_present_c_credit_lim || that_present_c_credit_lim) {
if (!(this_present_c_credit_lim && that_present_c_credit_lim))
return false;
if (this.c_credit_lim != that.c_credit_lim)
return false;
}
boolean this_present_c_discount = true;
boolean that_present_c_discount = true;
if (this_present_c_discount || that_present_c_discount) {
if (!(this_present_c_discount && that_present_c_discount))
return false;
if (this.c_discount != that.c_discount)
return false;
}
boolean this_present_c_balance = true;
boolean that_present_c_balance = true;
if (this_present_c_balance || that_present_c_balance) {
if (!(this_present_c_balance && that_present_c_balance))
return false;
if (this.c_balance != that.c_balance)
return false;
}
boolean this_present_c_ytd_payment = true;
boolean that_present_c_ytd_payment = true;
if (this_present_c_ytd_payment || that_present_c_ytd_payment) {
if (!(this_present_c_ytd_payment && that_present_c_ytd_payment))
return false;
if (this.c_ytd_payment != that.c_ytd_payment)
return false;
}
boolean this_present_c_payment_cnt = true;
boolean that_present_c_payment_cnt = true;
if (this_present_c_payment_cnt || that_present_c_payment_cnt) {
if (!(this_present_c_payment_cnt && that_present_c_payment_cnt))
return false;
if (this.c_payment_cnt != that.c_payment_cnt)
return false;
}
boolean this_present_c_delivery_cnt = true;
boolean that_present_c_delivery_cnt = true;
if (this_present_c_delivery_cnt || that_present_c_delivery_cnt) {
if (!(this_present_c_delivery_cnt && that_present_c_delivery_cnt))
return false;
if (this.c_delivery_cnt != that.c_delivery_cnt)
return false;
}
boolean this_present_c_data = true && this.isSetC_data();
boolean that_present_c_data = true && that.isSetC_data();
if (this_present_c_data || that_present_c_data) {
if (!(this_present_c_data && that_present_c_data))
return false;
if (!this.c_data.equals(that.c_data))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
public int compareTo(CustomerRow other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
CustomerRow typedOther = (CustomerRow)other;
lastComparison = Boolean.valueOf(isSetC_last()).compareTo(typedOther.isSetC_last());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_last()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_last, typedOther.c_last);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_middle()).compareTo(typedOther.isSetC_middle());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_middle()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_middle, typedOther.c_middle);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_first()).compareTo(typedOther.isSetC_first());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_first()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_first, typedOther.c_first);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_street_1()).compareTo(typedOther.isSetC_street_1());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_street_1()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_street_1, typedOther.c_street_1);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_street_2()).compareTo(typedOther.isSetC_street_2());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_street_2()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_street_2, typedOther.c_street_2);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_city()).compareTo(typedOther.isSetC_city());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_city()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_city, typedOther.c_city);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_state()).compareTo(typedOther.isSetC_state());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_state()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_state, typedOther.c_state);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_zip()).compareTo(typedOther.isSetC_zip());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_zip()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_zip, typedOther.c_zip);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_phone()).compareTo(typedOther.isSetC_phone());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_phone()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_phone, typedOther.c_phone);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_since()).compareTo(typedOther.isSetC_since());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_since()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_since, typedOther.c_since);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_credit()).compareTo(typedOther.isSetC_credit());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_credit()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_credit, typedOther.c_credit);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_credit_lim()).compareTo(typedOther.isSetC_credit_lim());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_credit_lim()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_credit_lim, typedOther.c_credit_lim);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_discount()).compareTo(typedOther.isSetC_discount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_discount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_discount, typedOther.c_discount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_balance()).compareTo(typedOther.isSetC_balance());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_balance()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_balance, typedOther.c_balance);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_ytd_payment()).compareTo(typedOther.isSetC_ytd_payment());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_ytd_payment()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_ytd_payment, typedOther.c_ytd_payment);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_payment_cnt()).compareTo(typedOther.isSetC_payment_cnt());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_payment_cnt()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_payment_cnt, typedOther.c_payment_cnt);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_delivery_cnt()).compareTo(typedOther.isSetC_delivery_cnt());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_delivery_cnt()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_delivery_cnt, typedOther.c_delivery_cnt);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetC_data()).compareTo(typedOther.isSetC_data());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetC_data()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.c_data, typedOther.c_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("CustomerRow(");
boolean first = true;
sb.append("c_last:");
if (this.c_last == null) {
sb.append("null");
} else {
sb.append(this.c_last);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_middle:");
if (this.c_middle == null) {
sb.append("null");
} else {
sb.append(this.c_middle);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_first:");
if (this.c_first == null) {
sb.append("null");
} else {
sb.append(this.c_first);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_street_1:");
if (this.c_street_1 == null) {
sb.append("null");
} else {
sb.append(this.c_street_1);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_street_2:");
if (this.c_street_2 == null) {
sb.append("null");
} else {
sb.append(this.c_street_2);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_city:");
if (this.c_city == null) {
sb.append("null");
} else {
sb.append(this.c_city);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_state:");
if (this.c_state == null) {
sb.append("null");
} else {
sb.append(this.c_state);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_zip:");
if (this.c_zip == null) {
sb.append("null");
} else {
sb.append(this.c_zip);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_phone:");
if (this.c_phone == null) {
sb.append("null");
} else {
sb.append(this.c_phone);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_since:");
if (this.c_since == null) {
sb.append("null");
} else {
sb.append(this.c_since);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_credit:");
if (this.c_credit == null) {
sb.append("null");
} else {
sb.append(this.c_credit);
}
first = false;
if (!first) sb.append(", ");
sb.append("c_credit_lim:");
sb.append(this.c_credit_lim);
first = false;
if (!first) sb.append(", ");
sb.append("c_discount:");
sb.append(this.c_discount);
first = false;
if (!first) sb.append(", ");
sb.append("c_balance:");
sb.append(this.c_balance);
first = false;
if (!first) sb.append(", ");
sb.append("c_ytd_payment:");
sb.append(this.c_ytd_payment);
first = false;
if (!first) sb.append(", ");
sb.append("c_payment_cnt:");
sb.append(this.c_payment_cnt);
first = false;
if (!first) sb.append(", ");
sb.append("c_delivery_cnt:");
sb.append(this.c_delivery_cnt);
first = false;
if (!first) sb.append(", ");
sb.append("c_data:");
if (this.c_data == null) {
sb.append("null");
} else {
sb.append(this.c_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 CustomerRowStandardSchemeFactory implements SchemeFactory {
public CustomerRowStandardScheme getScheme() {
return new CustomerRowStandardScheme();
}
}
private static class CustomerRowStandardScheme extends StandardScheme<CustomerRow> {
public void read(org.apache.thrift.protocol.TProtocol iprot, CustomerRow 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: // C_LAST
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_last = iprot.readString();
struct.setC_lastIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // C_MIDDLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_middle = iprot.readString();
struct.setC_middleIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // C_FIRST
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_first = iprot.readString();
struct.setC_firstIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // C_STREET_1
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_street_1 = iprot.readString();
struct.setC_street_1IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // C_STREET_2
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_street_2 = iprot.readString();
struct.setC_street_2IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // C_CITY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_city = iprot.readString();
struct.setC_cityIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // C_STATE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_state = iprot.readString();
struct.setC_stateIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // C_ZIP
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_zip = iprot.readString();
struct.setC_zipIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // C_PHONE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_phone = iprot.readString();
struct.setC_phoneIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // C_SINCE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_since = iprot.readString();
struct.setC_sinceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // C_CREDIT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_credit = iprot.readString();
struct.setC_creditIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // C_CREDIT_LIM
if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
struct.c_credit_lim = iprot.readDouble();
struct.setC_credit_limIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // C_DISCOUNT
if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
struct.c_discount = iprot.readDouble();
struct.setC_discountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 15: // C_BALANCE
if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
struct.c_balance = iprot.readDouble();
struct.setC_balanceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 16: // C_YTD_PAYMENT
if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
struct.c_ytd_payment = iprot.readDouble();
struct.setC_ytd_paymentIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 17: // C_PAYMENT_CNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.c_payment_cnt = iprot.readI32();
struct.setC_payment_cntIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 18: // C_DELIVERY_CNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.c_delivery_cnt = iprot.readI32();
struct.setC_delivery_cntIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 19: // C_DATA
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.c_data = iprot.readString();
struct.setC_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, CustomerRow struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.c_last != null) {
oprot.writeFieldBegin(C_LAST_FIELD_DESC);
oprot.writeString(struct.c_last);
oprot.writeFieldEnd();
}
if (struct.c_middle != null) {
oprot.writeFieldBegin(C_MIDDLE_FIELD_DESC);
oprot.writeString(struct.c_middle);
oprot.writeFieldEnd();
}
if (struct.c_first != null) {
oprot.writeFieldBegin(C_FIRST_FIELD_DESC);
oprot.writeString(struct.c_first);
oprot.writeFieldEnd();
}
if (struct.c_street_1 != null) {
oprot.writeFieldBegin(C_STREET_1_FIELD_DESC);
oprot.writeString(struct.c_street_1);
oprot.writeFieldEnd();
}
if (struct.c_street_2 != null) {
oprot.writeFieldBegin(C_STREET_2_FIELD_DESC);
oprot.writeString(struct.c_street_2);
oprot.writeFieldEnd();
}
if (struct.c_city != null) {
oprot.writeFieldBegin(C_CITY_FIELD_DESC);
oprot.writeString(struct.c_city);
oprot.writeFieldEnd();
}
if (struct.c_state != null) {
oprot.writeFieldBegin(C_STATE_FIELD_DESC);
oprot.writeString(struct.c_state);
oprot.writeFieldEnd();
}
if (struct.c_zip != null) {
oprot.writeFieldBegin(C_ZIP_FIELD_DESC);
oprot.writeString(struct.c_zip);
oprot.writeFieldEnd();
}
if (struct.c_phone != null) {
oprot.writeFieldBegin(C_PHONE_FIELD_DESC);
oprot.writeString(struct.c_phone);
oprot.writeFieldEnd();
}
if (struct.c_since != null) {
oprot.writeFieldBegin(C_SINCE_FIELD_DESC);
oprot.writeString(struct.c_since);
oprot.writeFieldEnd();
}
if (struct.c_credit != null) {
oprot.writeFieldBegin(C_CREDIT_FIELD_DESC);
oprot.writeString(struct.c_credit);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(C_CREDIT_LIM_FIELD_DESC);
oprot.writeDouble(struct.c_credit_lim);
oprot.writeFieldEnd();
oprot.writeFieldBegin(C_DISCOUNT_FIELD_DESC);
oprot.writeDouble(struct.c_discount);
oprot.writeFieldEnd();
oprot.writeFieldBegin(C_BALANCE_FIELD_DESC);
oprot.writeDouble(struct.c_balance);
oprot.writeFieldEnd();
oprot.writeFieldBegin(C_YTD_PAYMENT_FIELD_DESC);
oprot.writeDouble(struct.c_ytd_payment);
oprot.writeFieldEnd();
oprot.writeFieldBegin(C_PAYMENT_CNT_FIELD_DESC);
oprot.writeI32(struct.c_payment_cnt);
oprot.writeFieldEnd();
oprot.writeFieldBegin(C_DELIVERY_CNT_FIELD_DESC);
oprot.writeI32(struct.c_delivery_cnt);
oprot.writeFieldEnd();
if (struct.c_data != null) {
oprot.writeFieldBegin(C_DATA_FIELD_DESC);
oprot.writeString(struct.c_data);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class CustomerRowTupleSchemeFactory implements SchemeFactory {
public CustomerRowTupleScheme getScheme() {
return new CustomerRowTupleScheme();
}
}
private static class CustomerRowTupleScheme extends TupleScheme<CustomerRow> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, CustomerRow struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetC_last()) {
optionals.set(0);
}
if (struct.isSetC_middle()) {
optionals.set(1);
}
if (struct.isSetC_first()) {
optionals.set(2);
}
if (struct.isSetC_street_1()) {
optionals.set(3);
}
if (struct.isSetC_street_2()) {
optionals.set(4);
}
if (struct.isSetC_city()) {
optionals.set(5);
}
if (struct.isSetC_state()) {
optionals.set(6);
}
if (struct.isSetC_zip()) {
optionals.set(7);
}
if (struct.isSetC_phone()) {
optionals.set(8);
}
if (struct.isSetC_since()) {
optionals.set(9);
}
if (struct.isSetC_credit()) {
optionals.set(10);
}
if (struct.isSetC_credit_lim()) {
optionals.set(11);
}
if (struct.isSetC_discount()) {
optionals.set(12);
}
if (struct.isSetC_balance()) {
optionals.set(13);
}
if (struct.isSetC_ytd_payment()) {
optionals.set(14);
}
if (struct.isSetC_payment_cnt()) {
optionals.set(15);
}
if (struct.isSetC_delivery_cnt()) {
optionals.set(16);
}
if (struct.isSetC_data()) {
optionals.set(17);
}
oprot.writeBitSet(optionals, 18);
if (struct.isSetC_last()) {
oprot.writeString(struct.c_last);
}
if (struct.isSetC_middle()) {
oprot.writeString(struct.c_middle);
}
if (struct.isSetC_first()) {
oprot.writeString(struct.c_first);
}
if (struct.isSetC_street_1()) {
oprot.writeString(struct.c_street_1);
}
if (struct.isSetC_street_2()) {
oprot.writeString(struct.c_street_2);
}
if (struct.isSetC_city()) {
oprot.writeString(struct.c_city);
}
if (struct.isSetC_state()) {
oprot.writeString(struct.c_state);
}
if (struct.isSetC_zip()) {
oprot.writeString(struct.c_zip);
}
if (struct.isSetC_phone()) {
oprot.writeString(struct.c_phone);
}
if (struct.isSetC_since()) {
oprot.writeString(struct.c_since);
}
if (struct.isSetC_credit()) {
oprot.writeString(struct.c_credit);
}
if (struct.isSetC_credit_lim()) {
oprot.writeDouble(struct.c_credit_lim);
}
if (struct.isSetC_discount()) {
oprot.writeDouble(struct.c_discount);
}
if (struct.isSetC_balance()) {
oprot.writeDouble(struct.c_balance);
}
if (struct.isSetC_ytd_payment()) {
oprot.writeDouble(struct.c_ytd_payment);
}
if (struct.isSetC_payment_cnt()) {
oprot.writeI32(struct.c_payment_cnt);
}
if (struct.isSetC_delivery_cnt()) {
oprot.writeI32(struct.c_delivery_cnt);
}
if (struct.isSetC_data()) {
oprot.writeString(struct.c_data);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, CustomerRow struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(18);
if (incoming.get(0)) {
struct.c_last = iprot.readString();
struct.setC_lastIsSet(true);
}
if (incoming.get(1)) {
struct.c_middle = iprot.readString();
struct.setC_middleIsSet(true);
}
if (incoming.get(2)) {
struct.c_first = iprot.readString();
struct.setC_firstIsSet(true);
}
if (incoming.get(3)) {
struct.c_street_1 = iprot.readString();
struct.setC_street_1IsSet(true);
}
if (incoming.get(4)) {
struct.c_street_2 = iprot.readString();
struct.setC_street_2IsSet(true);
}
if (incoming.get(5)) {
struct.c_city = iprot.readString();
struct.setC_cityIsSet(true);
}
if (incoming.get(6)) {
struct.c_state = iprot.readString();
struct.setC_stateIsSet(true);
}
if (incoming.get(7)) {
struct.c_zip = iprot.readString();
struct.setC_zipIsSet(true);
}
if (incoming.get(8)) {
struct.c_phone = iprot.readString();
struct.setC_phoneIsSet(true);
}
if (incoming.get(9)) {
struct.c_since = iprot.readString();
struct.setC_sinceIsSet(true);
}
if (incoming.get(10)) {
struct.c_credit = iprot.readString();
struct.setC_creditIsSet(true);
}
if (incoming.get(11)) {
struct.c_credit_lim = iprot.readDouble();
struct.setC_credit_limIsSet(true);
}
if (incoming.get(12)) {
struct.c_discount = iprot.readDouble();
struct.setC_discountIsSet(true);
}
if (incoming.get(13)) {
struct.c_balance = iprot.readDouble();
struct.setC_balanceIsSet(true);
}
if (incoming.get(14)) {
struct.c_ytd_payment = iprot.readDouble();
struct.setC_ytd_paymentIsSet(true);
}
if (incoming.get(15)) {
struct.c_payment_cnt = iprot.readI32();
struct.setC_payment_cntIsSet(true);
}
if (incoming.get(16)) {
struct.c_delivery_cnt = iprot.readI32();
struct.setC_delivery_cntIsSet(true);
}
if (incoming.get(17)) {
struct.c_data = iprot.readString();
struct.setC_dataIsSet(true);
}
}
}
}