Rev 17470 | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift Compiler (0.7.0)** DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING*/package in.shop2020.model.v1.order;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 Transaction implements org.apache.thrift.TBase<Transaction, Transaction._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Transaction");private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField ORDERS_FIELD_DESC = new org.apache.thrift.protocol.TField("orders", org.apache.thrift.protocol.TType.LIST, (short)2);private static final org.apache.thrift.protocol.TField CREATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("createdOn", org.apache.thrift.protocol.TType.I64, (short)3);private static final org.apache.thrift.protocol.TField TRANSACTION_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionStatus", org.apache.thrift.protocol.TType.I32, (short)4);private static final org.apache.thrift.protocol.TField STATUS_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("statusDescription", org.apache.thrift.protocol.TType.STRING, (short)5);private static final org.apache.thrift.protocol.TField SHOPPING_CARTID_FIELD_DESC = new org.apache.thrift.protocol.TField("shoppingCartid", org.apache.thrift.protocol.TType.I64, (short)6);private static final org.apache.thrift.protocol.TField CUSTOMER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("customer_id", org.apache.thrift.protocol.TType.I64, (short)7);private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("coupon_code", org.apache.thrift.protocol.TType.STRING, (short)8);private static final org.apache.thrift.protocol.TField SESSION_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionSource", org.apache.thrift.protocol.TType.STRING, (short)9);private static final org.apache.thrift.protocol.TField SESSION_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionStartTime", org.apache.thrift.protocol.TType.I64, (short)10);private static final org.apache.thrift.protocol.TField FIRST_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("firstSource", org.apache.thrift.protocol.TType.STRING, (short)11);private static final org.apache.thrift.protocol.TField FIRST_SOURCE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("firstSourceTime", org.apache.thrift.protocol.TType.I64, (short)12);private static final org.apache.thrift.protocol.TField PAYMENT_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("payment_option", org.apache.thrift.protocol.TType.I64, (short)13);private static final org.apache.thrift.protocol.TField TOTAL_SHIPPING_COST_FIELD_DESC = new org.apache.thrift.protocol.TField("totalShippingCost", org.apache.thrift.protocol.TType.DOUBLE, (short)14);private static final org.apache.thrift.protocol.TField TOTAL_COD_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("totalCodCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)15);private long id; // requiredprivate List<Order> orders; // requiredprivate long createdOn; // requiredprivate TransactionStatus transactionStatus; // requiredprivate String statusDescription; // requiredprivate long shoppingCartid; // requiredprivate long customer_id; // requiredprivate String coupon_code; // requiredprivate String sessionSource; // requiredprivate long sessionStartTime; // requiredprivate String firstSource; // requiredprivate long firstSourceTime; // requiredprivate long payment_option; // requiredprivate double totalShippingCost; // requiredprivate double totalCodCharges; // 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 {ID((short)1, "id"),ORDERS((short)2, "orders"),CREATED_ON((short)3, "createdOn"),/**** @see TransactionStatus*/TRANSACTION_STATUS((short)4, "transactionStatus"),STATUS_DESCRIPTION((short)5, "statusDescription"),SHOPPING_CARTID((short)6, "shoppingCartid"),CUSTOMER_ID((short)7, "customer_id"),COUPON_CODE((short)8, "coupon_code"),SESSION_SOURCE((short)9, "sessionSource"),SESSION_START_TIME((short)10, "sessionStartTime"),FIRST_SOURCE((short)11, "firstSource"),FIRST_SOURCE_TIME((short)12, "firstSourceTime"),PAYMENT_OPTION((short)13, "payment_option"),TOTAL_SHIPPING_COST((short)14, "totalShippingCost"),TOTAL_COD_CHARGES((short)15, "totalCodCharges");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: // IDreturn ID;case 2: // ORDERSreturn ORDERS;case 3: // CREATED_ONreturn CREATED_ON;case 4: // TRANSACTION_STATUSreturn TRANSACTION_STATUS;case 5: // STATUS_DESCRIPTIONreturn STATUS_DESCRIPTION;case 6: // SHOPPING_CARTIDreturn SHOPPING_CARTID;case 7: // CUSTOMER_IDreturn CUSTOMER_ID;case 8: // COUPON_CODEreturn COUPON_CODE;case 9: // SESSION_SOURCEreturn SESSION_SOURCE;case 10: // SESSION_START_TIMEreturn SESSION_START_TIME;case 11: // FIRST_SOURCEreturn FIRST_SOURCE;case 12: // FIRST_SOURCE_TIMEreturn FIRST_SOURCE_TIME;case 13: // PAYMENT_OPTIONreturn PAYMENT_OPTION;case 14: // TOTAL_SHIPPING_COSTreturn TOTAL_SHIPPING_COST;case 15: // TOTAL_COD_CHARGESreturn TOTAL_COD_CHARGES;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 assignmentsprivate static final int __ID_ISSET_ID = 0;private static final int __CREATEDON_ISSET_ID = 1;private static final int __SHOPPINGCARTID_ISSET_ID = 2;private static final int __CUSTOMER_ID_ISSET_ID = 3;private static final int __SESSIONSTARTTIME_ISSET_ID = 4;private static final int __FIRSTSOURCETIME_ISSET_ID = 5;private static final int __PAYMENT_OPTION_ISSET_ID = 6;private static final int __TOTALSHIPPINGCOST_ISSET_ID = 7;private static final int __TOTALCODCHARGES_ISSET_ID = 8;private BitSet __isset_bit_vector = new BitSet(9);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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.ORDERS, new org.apache.thrift.meta_data.FieldMetaData("orders", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Order.class))));tmpMap.put(_Fields.CREATED_ON, new org.apache.thrift.meta_data.FieldMetaData("createdOn", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.TRANSACTION_STATUS, new org.apache.thrift.meta_data.FieldMetaData("transactionStatus", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TransactionStatus.class)));tmpMap.put(_Fields.STATUS_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("statusDescription", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SHOPPING_CARTID, new org.apache.thrift.meta_data.FieldMetaData("shoppingCartid", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.CUSTOMER_ID, new org.apache.thrift.meta_data.FieldMetaData("customer_id", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("coupon_code", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SESSION_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("sessionSource", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SESSION_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("sessionStartTime", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.FIRST_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("firstSource", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.FIRST_SOURCE_TIME, new org.apache.thrift.meta_data.FieldMetaData("firstSourceTime", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.PAYMENT_OPTION, new org.apache.thrift.meta_data.FieldMetaData("payment_option", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.TOTAL_SHIPPING_COST, new org.apache.thrift.meta_data.FieldMetaData("totalShippingCost", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));tmpMap.put(_Fields.TOTAL_COD_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("totalCodCharges", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Transaction.class, metaDataMap);}public Transaction() {}public Transaction(long id,List<Order> orders,long createdOn,TransactionStatus transactionStatus,String statusDescription,long shoppingCartid,long customer_id,String coupon_code,String sessionSource,long sessionStartTime,String firstSource,long firstSourceTime,long payment_option,double totalShippingCost,double totalCodCharges){this();this.id = id;setIdIsSet(true);this.orders = orders;this.createdOn = createdOn;setCreatedOnIsSet(true);this.transactionStatus = transactionStatus;this.statusDescription = statusDescription;this.shoppingCartid = shoppingCartid;setShoppingCartidIsSet(true);this.customer_id = customer_id;setCustomer_idIsSet(true);this.coupon_code = coupon_code;this.sessionSource = sessionSource;this.sessionStartTime = sessionStartTime;setSessionStartTimeIsSet(true);this.firstSource = firstSource;this.firstSourceTime = firstSourceTime;setFirstSourceTimeIsSet(true);this.payment_option = payment_option;setPayment_optionIsSet(true);this.totalShippingCost = totalShippingCost;setTotalShippingCostIsSet(true);this.totalCodCharges = totalCodCharges;setTotalCodChargesIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public Transaction(Transaction other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.id = other.id;if (other.isSetOrders()) {List<Order> __this__orders = new ArrayList<Order>();for (Order other_element : other.orders) {__this__orders.add(new Order(other_element));}this.orders = __this__orders;}this.createdOn = other.createdOn;if (other.isSetTransactionStatus()) {this.transactionStatus = other.transactionStatus;}if (other.isSetStatusDescription()) {this.statusDescription = other.statusDescription;}this.shoppingCartid = other.shoppingCartid;this.customer_id = other.customer_id;if (other.isSetCoupon_code()) {this.coupon_code = other.coupon_code;}if (other.isSetSessionSource()) {this.sessionSource = other.sessionSource;}this.sessionStartTime = other.sessionStartTime;if (other.isSetFirstSource()) {this.firstSource = other.firstSource;}this.firstSourceTime = other.firstSourceTime;this.payment_option = other.payment_option;this.totalShippingCost = other.totalShippingCost;this.totalCodCharges = other.totalCodCharges;}public Transaction deepCopy() {return new Transaction(this);}@Overridepublic void clear() {setIdIsSet(false);this.id = 0;this.orders = null;setCreatedOnIsSet(false);this.createdOn = 0;this.transactionStatus = null;this.statusDescription = null;setShoppingCartidIsSet(false);this.shoppingCartid = 0;setCustomer_idIsSet(false);this.customer_id = 0;this.coupon_code = null;this.sessionSource = null;setSessionStartTimeIsSet(false);this.sessionStartTime = 0;this.firstSource = null;setFirstSourceTimeIsSet(false);this.firstSourceTime = 0;setPayment_optionIsSet(false);this.payment_option = 0;setTotalShippingCostIsSet(false);this.totalShippingCost = 0.0;setTotalCodChargesIsSet(false);this.totalCodCharges = 0.0;}public long getId() {return this.id;}public void setId(long id) {this.id = id;setIdIsSet(true);}public void unsetId() {__isset_bit_vector.clear(__ID_ISSET_ID);}/** Returns true if field id is set (has been assigned a value) and false otherwise */public boolean isSetId() {return __isset_bit_vector.get(__ID_ISSET_ID);}public void setIdIsSet(boolean value) {__isset_bit_vector.set(__ID_ISSET_ID, value);}public int getOrdersSize() {return (this.orders == null) ? 0 : this.orders.size();}public java.util.Iterator<Order> getOrdersIterator() {return (this.orders == null) ? null : this.orders.iterator();}public void addToOrders(Order elem) {if (this.orders == null) {this.orders = new ArrayList<Order>();}this.orders.add(elem);}public List<Order> getOrders() {return this.orders;}public void setOrders(List<Order> orders) {this.orders = orders;}public void unsetOrders() {this.orders = null;}/** Returns true if field orders is set (has been assigned a value) and false otherwise */public boolean isSetOrders() {return this.orders != null;}public void setOrdersIsSet(boolean value) {if (!value) {this.orders = null;}}public long getCreatedOn() {return this.createdOn;}public void setCreatedOn(long createdOn) {this.createdOn = createdOn;setCreatedOnIsSet(true);}public void unsetCreatedOn() {__isset_bit_vector.clear(__CREATEDON_ISSET_ID);}/** Returns true if field createdOn is set (has been assigned a value) and false otherwise */public boolean isSetCreatedOn() {return __isset_bit_vector.get(__CREATEDON_ISSET_ID);}public void setCreatedOnIsSet(boolean value) {__isset_bit_vector.set(__CREATEDON_ISSET_ID, value);}/**** @see TransactionStatus*/public TransactionStatus getTransactionStatus() {return this.transactionStatus;}/**** @see TransactionStatus*/public void setTransactionStatus(TransactionStatus transactionStatus) {this.transactionStatus = transactionStatus;}public void unsetTransactionStatus() {this.transactionStatus = null;}/** Returns true if field transactionStatus is set (has been assigned a value) and false otherwise */public boolean isSetTransactionStatus() {return this.transactionStatus != null;}public void setTransactionStatusIsSet(boolean value) {if (!value) {this.transactionStatus = null;}}public String getStatusDescription() {return this.statusDescription;}public void setStatusDescription(String statusDescription) {this.statusDescription = statusDescription;}public void unsetStatusDescription() {this.statusDescription = null;}/** Returns true if field statusDescription is set (has been assigned a value) and false otherwise */public boolean isSetStatusDescription() {return this.statusDescription != null;}public void setStatusDescriptionIsSet(boolean value) {if (!value) {this.statusDescription = null;}}public long getShoppingCartid() {return this.shoppingCartid;}public void setShoppingCartid(long shoppingCartid) {this.shoppingCartid = shoppingCartid;setShoppingCartidIsSet(true);}public void unsetShoppingCartid() {__isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);}/** Returns true if field shoppingCartid is set (has been assigned a value) and false otherwise */public boolean isSetShoppingCartid() {return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);}public void setShoppingCartidIsSet(boolean value) {__isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);}public long getCustomer_id() {return this.customer_id;}public void setCustomer_id(long customer_id) {this.customer_id = customer_id;setCustomer_idIsSet(true);}public void unsetCustomer_id() {__isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);}/** Returns true if field customer_id is set (has been assigned a value) and false otherwise */public boolean isSetCustomer_id() {return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);}public void setCustomer_idIsSet(boolean value) {__isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);}public String getCoupon_code() {return this.coupon_code;}public void setCoupon_code(String coupon_code) {this.coupon_code = coupon_code;}public void unsetCoupon_code() {this.coupon_code = null;}/** Returns true if field coupon_code is set (has been assigned a value) and false otherwise */public boolean isSetCoupon_code() {return this.coupon_code != null;}public void setCoupon_codeIsSet(boolean value) {if (!value) {this.coupon_code = null;}}public String getSessionSource() {return this.sessionSource;}public void setSessionSource(String sessionSource) {this.sessionSource = sessionSource;}public void unsetSessionSource() {this.sessionSource = null;}/** Returns true if field sessionSource is set (has been assigned a value) and false otherwise */public boolean isSetSessionSource() {return this.sessionSource != null;}public void setSessionSourceIsSet(boolean value) {if (!value) {this.sessionSource = null;}}public long getSessionStartTime() {return this.sessionStartTime;}public void setSessionStartTime(long sessionStartTime) {this.sessionStartTime = sessionStartTime;setSessionStartTimeIsSet(true);}public void unsetSessionStartTime() {__isset_bit_vector.clear(__SESSIONSTARTTIME_ISSET_ID);}/** Returns true if field sessionStartTime is set (has been assigned a value) and false otherwise */public boolean isSetSessionStartTime() {return __isset_bit_vector.get(__SESSIONSTARTTIME_ISSET_ID);}public void setSessionStartTimeIsSet(boolean value) {__isset_bit_vector.set(__SESSIONSTARTTIME_ISSET_ID, value);}public String getFirstSource() {return this.firstSource;}public void setFirstSource(String firstSource) {this.firstSource = firstSource;}public void unsetFirstSource() {this.firstSource = null;}/** Returns true if field firstSource is set (has been assigned a value) and false otherwise */public boolean isSetFirstSource() {return this.firstSource != null;}public void setFirstSourceIsSet(boolean value) {if (!value) {this.firstSource = null;}}public long getFirstSourceTime() {return this.firstSourceTime;}public void setFirstSourceTime(long firstSourceTime) {this.firstSourceTime = firstSourceTime;setFirstSourceTimeIsSet(true);}public void unsetFirstSourceTime() {__isset_bit_vector.clear(__FIRSTSOURCETIME_ISSET_ID);}/** Returns true if field firstSourceTime is set (has been assigned a value) and false otherwise */public boolean isSetFirstSourceTime() {return __isset_bit_vector.get(__FIRSTSOURCETIME_ISSET_ID);}public void setFirstSourceTimeIsSet(boolean value) {__isset_bit_vector.set(__FIRSTSOURCETIME_ISSET_ID, value);}public long getPayment_option() {return this.payment_option;}public void setPayment_option(long payment_option) {this.payment_option = payment_option;setPayment_optionIsSet(true);}public void unsetPayment_option() {__isset_bit_vector.clear(__PAYMENT_OPTION_ISSET_ID);}/** Returns true if field payment_option is set (has been assigned a value) and false otherwise */public boolean isSetPayment_option() {return __isset_bit_vector.get(__PAYMENT_OPTION_ISSET_ID);}public void setPayment_optionIsSet(boolean value) {__isset_bit_vector.set(__PAYMENT_OPTION_ISSET_ID, value);}public double getTotalShippingCost() {return this.totalShippingCost;}public void setTotalShippingCost(double totalShippingCost) {this.totalShippingCost = totalShippingCost;setTotalShippingCostIsSet(true);}public void unsetTotalShippingCost() {__isset_bit_vector.clear(__TOTALSHIPPINGCOST_ISSET_ID);}/** Returns true if field totalShippingCost is set (has been assigned a value) and false otherwise */public boolean isSetTotalShippingCost() {return __isset_bit_vector.get(__TOTALSHIPPINGCOST_ISSET_ID);}public void setTotalShippingCostIsSet(boolean value) {__isset_bit_vector.set(__TOTALSHIPPINGCOST_ISSET_ID, value);}public double getTotalCodCharges() {return this.totalCodCharges;}public void setTotalCodCharges(double totalCodCharges) {this.totalCodCharges = totalCodCharges;setTotalCodChargesIsSet(true);}public void unsetTotalCodCharges() {__isset_bit_vector.clear(__TOTALCODCHARGES_ISSET_ID);}/** Returns true if field totalCodCharges is set (has been assigned a value) and false otherwise */public boolean isSetTotalCodCharges() {return __isset_bit_vector.get(__TOTALCODCHARGES_ISSET_ID);}public void setTotalCodChargesIsSet(boolean value) {__isset_bit_vector.set(__TOTALCODCHARGES_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case ID:if (value == null) {unsetId();} else {setId((Long)value);}break;case ORDERS:if (value == null) {unsetOrders();} else {setOrders((List<Order>)value);}break;case CREATED_ON:if (value == null) {unsetCreatedOn();} else {setCreatedOn((Long)value);}break;case TRANSACTION_STATUS:if (value == null) {unsetTransactionStatus();} else {setTransactionStatus((TransactionStatus)value);}break;case STATUS_DESCRIPTION:if (value == null) {unsetStatusDescription();} else {setStatusDescription((String)value);}break;case SHOPPING_CARTID:if (value == null) {unsetShoppingCartid();} else {setShoppingCartid((Long)value);}break;case CUSTOMER_ID:if (value == null) {unsetCustomer_id();} else {setCustomer_id((Long)value);}break;case COUPON_CODE:if (value == null) {unsetCoupon_code();} else {setCoupon_code((String)value);}break;case SESSION_SOURCE:if (value == null) {unsetSessionSource();} else {setSessionSource((String)value);}break;case SESSION_START_TIME:if (value == null) {unsetSessionStartTime();} else {setSessionStartTime((Long)value);}break;case FIRST_SOURCE:if (value == null) {unsetFirstSource();} else {setFirstSource((String)value);}break;case FIRST_SOURCE_TIME:if (value == null) {unsetFirstSourceTime();} else {setFirstSourceTime((Long)value);}break;case PAYMENT_OPTION:if (value == null) {unsetPayment_option();} else {setPayment_option((Long)value);}break;case TOTAL_SHIPPING_COST:if (value == null) {unsetTotalShippingCost();} else {setTotalShippingCost((Double)value);}break;case TOTAL_COD_CHARGES:if (value == null) {unsetTotalCodCharges();} else {setTotalCodCharges((Double)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ID:return Long.valueOf(getId());case ORDERS:return getOrders();case CREATED_ON:return Long.valueOf(getCreatedOn());case TRANSACTION_STATUS:return getTransactionStatus();case STATUS_DESCRIPTION:return getStatusDescription();case SHOPPING_CARTID:return Long.valueOf(getShoppingCartid());case CUSTOMER_ID:return Long.valueOf(getCustomer_id());case COUPON_CODE:return getCoupon_code();case SESSION_SOURCE:return getSessionSource();case SESSION_START_TIME:return Long.valueOf(getSessionStartTime());case FIRST_SOURCE:return getFirstSource();case FIRST_SOURCE_TIME:return Long.valueOf(getFirstSourceTime());case PAYMENT_OPTION:return Long.valueOf(getPayment_option());case TOTAL_SHIPPING_COST:return Double.valueOf(getTotalShippingCost());case TOTAL_COD_CHARGES:return Double.valueOf(getTotalCodCharges());}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 ID:return isSetId();case ORDERS:return isSetOrders();case CREATED_ON:return isSetCreatedOn();case TRANSACTION_STATUS:return isSetTransactionStatus();case STATUS_DESCRIPTION:return isSetStatusDescription();case SHOPPING_CARTID:return isSetShoppingCartid();case CUSTOMER_ID:return isSetCustomer_id();case COUPON_CODE:return isSetCoupon_code();case SESSION_SOURCE:return isSetSessionSource();case SESSION_START_TIME:return isSetSessionStartTime();case FIRST_SOURCE:return isSetFirstSource();case FIRST_SOURCE_TIME:return isSetFirstSourceTime();case PAYMENT_OPTION:return isSetPayment_option();case TOTAL_SHIPPING_COST:return isSetTotalShippingCost();case TOTAL_COD_CHARGES:return isSetTotalCodCharges();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof Transaction)return this.equals((Transaction)that);return false;}public boolean equals(Transaction that) {if (that == null)return false;boolean this_present_id = true;boolean that_present_id = true;if (this_present_id || that_present_id) {if (!(this_present_id && that_present_id))return false;if (this.id != that.id)return false;}boolean this_present_orders = true && this.isSetOrders();boolean that_present_orders = true && that.isSetOrders();if (this_present_orders || that_present_orders) {if (!(this_present_orders && that_present_orders))return false;if (!this.orders.equals(that.orders))return false;}boolean this_present_createdOn = true;boolean that_present_createdOn = true;if (this_present_createdOn || that_present_createdOn) {if (!(this_present_createdOn && that_present_createdOn))return false;if (this.createdOn != that.createdOn)return false;}boolean this_present_transactionStatus = true && this.isSetTransactionStatus();boolean that_present_transactionStatus = true && that.isSetTransactionStatus();if (this_present_transactionStatus || that_present_transactionStatus) {if (!(this_present_transactionStatus && that_present_transactionStatus))return false;if (!this.transactionStatus.equals(that.transactionStatus))return false;}boolean this_present_statusDescription = true && this.isSetStatusDescription();boolean that_present_statusDescription = true && that.isSetStatusDescription();if (this_present_statusDescription || that_present_statusDescription) {if (!(this_present_statusDescription && that_present_statusDescription))return false;if (!this.statusDescription.equals(that.statusDescription))return false;}boolean this_present_shoppingCartid = true;boolean that_present_shoppingCartid = true;if (this_present_shoppingCartid || that_present_shoppingCartid) {if (!(this_present_shoppingCartid && that_present_shoppingCartid))return false;if (this.shoppingCartid != that.shoppingCartid)return false;}boolean this_present_customer_id = true;boolean that_present_customer_id = true;if (this_present_customer_id || that_present_customer_id) {if (!(this_present_customer_id && that_present_customer_id))return false;if (this.customer_id != that.customer_id)return false;}boolean this_present_coupon_code = true && this.isSetCoupon_code();boolean that_present_coupon_code = true && that.isSetCoupon_code();if (this_present_coupon_code || that_present_coupon_code) {if (!(this_present_coupon_code && that_present_coupon_code))return false;if (!this.coupon_code.equals(that.coupon_code))return false;}boolean this_present_sessionSource = true && this.isSetSessionSource();boolean that_present_sessionSource = true && that.isSetSessionSource();if (this_present_sessionSource || that_present_sessionSource) {if (!(this_present_sessionSource && that_present_sessionSource))return false;if (!this.sessionSource.equals(that.sessionSource))return false;}boolean this_present_sessionStartTime = true;boolean that_present_sessionStartTime = true;if (this_present_sessionStartTime || that_present_sessionStartTime) {if (!(this_present_sessionStartTime && that_present_sessionStartTime))return false;if (this.sessionStartTime != that.sessionStartTime)return false;}boolean this_present_firstSource = true && this.isSetFirstSource();boolean that_present_firstSource = true && that.isSetFirstSource();if (this_present_firstSource || that_present_firstSource) {if (!(this_present_firstSource && that_present_firstSource))return false;if (!this.firstSource.equals(that.firstSource))return false;}boolean this_present_firstSourceTime = true;boolean that_present_firstSourceTime = true;if (this_present_firstSourceTime || that_present_firstSourceTime) {if (!(this_present_firstSourceTime && that_present_firstSourceTime))return false;if (this.firstSourceTime != that.firstSourceTime)return false;}boolean this_present_payment_option = true;boolean that_present_payment_option = true;if (this_present_payment_option || that_present_payment_option) {if (!(this_present_payment_option && that_present_payment_option))return false;if (this.payment_option != that.payment_option)return false;}boolean this_present_totalShippingCost = true;boolean that_present_totalShippingCost = true;if (this_present_totalShippingCost || that_present_totalShippingCost) {if (!(this_present_totalShippingCost && that_present_totalShippingCost))return false;if (this.totalShippingCost != that.totalShippingCost)return false;}boolean this_present_totalCodCharges = true;boolean that_present_totalCodCharges = true;if (this_present_totalCodCharges || that_present_totalCodCharges) {if (!(this_present_totalCodCharges && that_present_totalCodCharges))return false;if (this.totalCodCharges != that.totalCodCharges)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(Transaction other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;Transaction typedOther = (Transaction)other;lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());if (lastComparison != 0) {return lastComparison;}if (isSetId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetOrders()).compareTo(typedOther.isSetOrders());if (lastComparison != 0) {return lastComparison;}if (isSetOrders()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orders, typedOther.orders);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCreatedOn()).compareTo(typedOther.isSetCreatedOn());if (lastComparison != 0) {return lastComparison;}if (isSetCreatedOn()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdOn, typedOther.createdOn);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetTransactionStatus()).compareTo(typedOther.isSetTransactionStatus());if (lastComparison != 0) {return lastComparison;}if (isSetTransactionStatus()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionStatus, typedOther.transactionStatus);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetStatusDescription()).compareTo(typedOther.isSetStatusDescription());if (lastComparison != 0) {return lastComparison;}if (isSetStatusDescription()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statusDescription, typedOther.statusDescription);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetShoppingCartid()).compareTo(typedOther.isSetShoppingCartid());if (lastComparison != 0) {return lastComparison;}if (isSetShoppingCartid()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shoppingCartid, typedOther.shoppingCartid);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(typedOther.isSetCustomer_id());if (lastComparison != 0) {return lastComparison;}if (isSetCustomer_id()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.customer_id, typedOther.customer_id);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetCoupon_code()).compareTo(typedOther.isSetCoupon_code());if (lastComparison != 0) {return lastComparison;}if (isSetCoupon_code()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.coupon_code, typedOther.coupon_code);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSessionSource()).compareTo(typedOther.isSetSessionSource());if (lastComparison != 0) {return lastComparison;}if (isSetSessionSource()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionSource, typedOther.sessionSource);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSessionStartTime()).compareTo(typedOther.isSetSessionStartTime());if (lastComparison != 0) {return lastComparison;}if (isSetSessionStartTime()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionStartTime, typedOther.sessionStartTime);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetFirstSource()).compareTo(typedOther.isSetFirstSource());if (lastComparison != 0) {return lastComparison;}if (isSetFirstSource()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstSource, typedOther.firstSource);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetFirstSourceTime()).compareTo(typedOther.isSetFirstSourceTime());if (lastComparison != 0) {return lastComparison;}if (isSetFirstSourceTime()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstSourceTime, typedOther.firstSourceTime);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetPayment_option()).compareTo(typedOther.isSetPayment_option());if (lastComparison != 0) {return lastComparison;}if (isSetPayment_option()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.payment_option, typedOther.payment_option);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetTotalShippingCost()).compareTo(typedOther.isSetTotalShippingCost());if (lastComparison != 0) {return lastComparison;}if (isSetTotalShippingCost()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalShippingCost, typedOther.totalShippingCost);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetTotalCodCharges()).compareTo(typedOther.isSetTotalCodCharges());if (lastComparison != 0) {return lastComparison;}if (isSetTotalCodCharges()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalCodCharges, typedOther.totalCodCharges);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 {org.apache.thrift.protocol.TField field;iprot.readStructBegin();while (true){field = iprot.readFieldBegin();if (field.type == org.apache.thrift.protocol.TType.STOP) {break;}switch (field.id) {case 1: // IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.id = iprot.readI64();setIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // ORDERSif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();this.orders = new ArrayList<Order>(_list4.size);for (int _i5 = 0; _i5 < _list4.size; ++_i5){Order _elem6; // required_elem6 = new Order();_elem6.read(iprot);this.orders.add(_elem6);}iprot.readListEnd();}} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // CREATED_ONif (field.type == org.apache.thrift.protocol.TType.I64) {this.createdOn = iprot.readI64();setCreatedOnIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // TRANSACTION_STATUSif (field.type == org.apache.thrift.protocol.TType.I32) {this.transactionStatus = TransactionStatus.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 5: // STATUS_DESCRIPTIONif (field.type == org.apache.thrift.protocol.TType.STRING) {this.statusDescription = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 6: // SHOPPING_CARTIDif (field.type == org.apache.thrift.protocol.TType.I64) {this.shoppingCartid = iprot.readI64();setShoppingCartidIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 7: // CUSTOMER_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.customer_id = iprot.readI64();setCustomer_idIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 8: // COUPON_CODEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.coupon_code = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 9: // SESSION_SOURCEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.sessionSource = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 10: // SESSION_START_TIMEif (field.type == org.apache.thrift.protocol.TType.I64) {this.sessionStartTime = iprot.readI64();setSessionStartTimeIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 11: // FIRST_SOURCEif (field.type == org.apache.thrift.protocol.TType.STRING) {this.firstSource = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 12: // FIRST_SOURCE_TIMEif (field.type == org.apache.thrift.protocol.TType.I64) {this.firstSourceTime = iprot.readI64();setFirstSourceTimeIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 13: // PAYMENT_OPTIONif (field.type == org.apache.thrift.protocol.TType.I64) {this.payment_option = iprot.readI64();setPayment_optionIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 14: // TOTAL_SHIPPING_COSTif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.totalShippingCost = iprot.readDouble();setTotalShippingCostIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 15: // TOTAL_COD_CHARGESif (field.type == org.apache.thrift.protocol.TType.DOUBLE) {this.totalCodCharges = iprot.readDouble();setTotalCodChargesIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;default:org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}iprot.readFieldEnd();}iprot.readStructEnd();validate();}public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {validate();oprot.writeStructBegin(STRUCT_DESC);oprot.writeFieldBegin(ID_FIELD_DESC);oprot.writeI64(this.id);oprot.writeFieldEnd();if (this.orders != null) {oprot.writeFieldBegin(ORDERS_FIELD_DESC);{oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.orders.size()));for (Order _iter7 : this.orders){_iter7.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldBegin(CREATED_ON_FIELD_DESC);oprot.writeI64(this.createdOn);oprot.writeFieldEnd();if (this.transactionStatus != null) {oprot.writeFieldBegin(TRANSACTION_STATUS_FIELD_DESC);oprot.writeI32(this.transactionStatus.getValue());oprot.writeFieldEnd();}if (this.statusDescription != null) {oprot.writeFieldBegin(STATUS_DESCRIPTION_FIELD_DESC);oprot.writeString(this.statusDescription);oprot.writeFieldEnd();}oprot.writeFieldBegin(SHOPPING_CARTID_FIELD_DESC);oprot.writeI64(this.shoppingCartid);oprot.writeFieldEnd();oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);oprot.writeI64(this.customer_id);oprot.writeFieldEnd();if (this.coupon_code != null) {oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);oprot.writeString(this.coupon_code);oprot.writeFieldEnd();}if (this.sessionSource != null) {oprot.writeFieldBegin(SESSION_SOURCE_FIELD_DESC);oprot.writeString(this.sessionSource);oprot.writeFieldEnd();}oprot.writeFieldBegin(SESSION_START_TIME_FIELD_DESC);oprot.writeI64(this.sessionStartTime);oprot.writeFieldEnd();if (this.firstSource != null) {oprot.writeFieldBegin(FIRST_SOURCE_FIELD_DESC);oprot.writeString(this.firstSource);oprot.writeFieldEnd();}oprot.writeFieldBegin(FIRST_SOURCE_TIME_FIELD_DESC);oprot.writeI64(this.firstSourceTime);oprot.writeFieldEnd();oprot.writeFieldBegin(PAYMENT_OPTION_FIELD_DESC);oprot.writeI64(this.payment_option);oprot.writeFieldEnd();oprot.writeFieldBegin(TOTAL_SHIPPING_COST_FIELD_DESC);oprot.writeDouble(this.totalShippingCost);oprot.writeFieldEnd();oprot.writeFieldBegin(TOTAL_COD_CHARGES_FIELD_DESC);oprot.writeDouble(this.totalCodCharges);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("Transaction(");boolean first = true;sb.append("id:");sb.append(this.id);first = false;if (!first) sb.append(", ");sb.append("orders:");if (this.orders == null) {sb.append("null");} else {sb.append(this.orders);}first = false;if (!first) sb.append(", ");sb.append("createdOn:");sb.append(this.createdOn);first = false;if (!first) sb.append(", ");sb.append("transactionStatus:");if (this.transactionStatus == null) {sb.append("null");} else {sb.append(this.transactionStatus);}first = false;if (!first) sb.append(", ");sb.append("statusDescription:");if (this.statusDescription == null) {sb.append("null");} else {sb.append(this.statusDescription);}first = false;if (!first) sb.append(", ");sb.append("shoppingCartid:");sb.append(this.shoppingCartid);first = false;if (!first) sb.append(", ");sb.append("customer_id:");sb.append(this.customer_id);first = false;if (!first) sb.append(", ");sb.append("coupon_code:");if (this.coupon_code == null) {sb.append("null");} else {sb.append(this.coupon_code);}first = false;if (!first) sb.append(", ");sb.append("sessionSource:");if (this.sessionSource == null) {sb.append("null");} else {sb.append(this.sessionSource);}first = false;if (!first) sb.append(", ");sb.append("sessionStartTime:");sb.append(this.sessionStartTime);first = false;if (!first) sb.append(", ");sb.append("firstSource:");if (this.firstSource == null) {sb.append("null");} else {sb.append(this.firstSource);}first = false;if (!first) sb.append(", ");sb.append("firstSourceTime:");sb.append(this.firstSourceTime);first = false;if (!first) sb.append(", ");sb.append("payment_option:");sb.append(this.payment_option);first = false;if (!first) sb.append(", ");sb.append("totalShippingCost:");sb.append(this.totalShippingCost);first = false;if (!first) sb.append(", ");sb.append("totalCodCharges:");sb.append(this.totalCodCharges);first = false;sb.append(")");return sb.toString();}public void validate() throws org.apache.thrift.TException {// check for required fields}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_bit_vector = new BitSet(1);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);}}}