Subversion Repositories SmartDukaan

Rev

Rev 957 | Rev 1910 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package in.shop2020.model.v1.catalog;

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.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;

public class Item implements TBase<Item._Fields>, java.io.Serializable, Cloneable {
  private static final TStruct STRUCT_DESC = new TStruct("Item");

  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
  private static final TField PRODUCT_GROUP_FIELD_DESC = new TField("productGroup", TType.STRING, (short)2);
  private static final TField BRAND_FIELD_DESC = new TField("brand", TType.STRING, (short)3);
  private static final TField MODEL_NUMBER_FIELD_DESC = new TField("modelNumber", TType.STRING, (short)4);
  private static final TField MODEL_NAME_FIELD_DESC = new TField("modelName", TType.STRING, (short)5);
  private static final TField CATEGORY_FIELD_DESC = new TField("category", TType.I64, (short)6);
  private static final TField COMMENTS_FIELD_DESC = new TField("comments", TType.STRING, (short)7);
  private static final TField CATALOG_ITEM_ID_FIELD_DESC = new TField("catalogItemId", TType.I64, (short)8);
  private static final TField VENDOR_ITEM_ID_FIELD_DESC = new TField("vendorItemId", TType.STRING, (short)9);
  private static final TField FEATURE_ID_FIELD_DESC = new TField("featureId", TType.I64, (short)10);
  private static final TField FEATURE_DESCRIPTION_FIELD_DESC = new TField("featureDescription", TType.STRING, (short)11);
  private static final TField ITEM_INVENTORY_FIELD_DESC = new TField("itemInventory", TType.STRUCT, (short)12);
  private static final TField MRP_FIELD_DESC = new TField("mrp", TType.DOUBLE, (short)13);
  private static final TField MOP_FIELD_DESC = new TField("mop", TType.DOUBLE, (short)14);
  private static final TField SELLING_PRICE_FIELD_DESC = new TField("sellingPrice", TType.DOUBLE, (short)15);
  private static final TField TRANSFER_PRICE_FIELD_DESC = new TField("transferPrice", TType.DOUBLE, (short)16);
  private static final TField WEIGHT_FIELD_DESC = new TField("weight", TType.DOUBLE, (short)17);
  private static final TField ADDED_ON_FIELD_DESC = new TField("addedOn", TType.I64, (short)18);
  private static final TField START_DATE_FIELD_DESC = new TField("startDate", TType.I64, (short)19);
  private static final TField RETIRE_DATE_FIELD_DESC = new TField("retireDate", TType.I64, (short)20);
  private static final TField ITEM_STATUS_FIELD_DESC = new TField("itemStatus", TType.I32, (short)21);
  private static final TField OTHER_INFO_FIELD_DESC = new TField("otherInfo", TType.MAP, (short)22);
  private static final TField BEST_DEAL_TEXT_FIELD_DESC = new TField("bestDealText", TType.STRING, (short)23);
  private static final TField BEST_DEAL_VALUE_FIELD_DESC = new TField("bestDealValue", TType.DOUBLE, (short)24);
  private static final TField DEALER_PRICE_FIELD_DESC = new TField("dealerPrice", TType.DOUBLE, (short)25);
  private static final TField UPDATED_ON_FIELD_DESC = new TField("updatedOn", TType.I64, (short)26);
  private static final TField COLOR_FIELD_DESC = new TField("color", TType.STRING, (short)27);

  private long id;
  private String productGroup;
  private String brand;
  private String modelNumber;
  private String modelName;
  private long category;
  private String comments;
  private long catalogItemId;
  private String vendorItemId;
  private long featureId;
  private String featureDescription;
  private ItemInventory itemInventory;
  private double mrp;
  private double mop;
  private double sellingPrice;
  private double transferPrice;
  private double weight;
  private long addedOn;
  private long startDate;
  private long retireDate;
  private status itemStatus;
  private Map<String,String> otherInfo;
  private String bestDealText;
  private double bestDealValue;
  private double dealerPrice;
  private long updatedOn;
  private String color;

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements TFieldIdEnum {
    ID((short)1, "id"),
    PRODUCT_GROUP((short)2, "productGroup"),
    BRAND((short)3, "brand"),
    MODEL_NUMBER((short)4, "modelNumber"),
    MODEL_NAME((short)5, "modelName"),
    CATEGORY((short)6, "category"),
    COMMENTS((short)7, "comments"),
    CATALOG_ITEM_ID((short)8, "catalogItemId"),
    VENDOR_ITEM_ID((short)9, "vendorItemId"),
    FEATURE_ID((short)10, "featureId"),
    FEATURE_DESCRIPTION((short)11, "featureDescription"),
    ITEM_INVENTORY((short)12, "itemInventory"),
    MRP((short)13, "mrp"),
    MOP((short)14, "mop"),
    SELLING_PRICE((short)15, "sellingPrice"),
    TRANSFER_PRICE((short)16, "transferPrice"),
    WEIGHT((short)17, "weight"),
    ADDED_ON((short)18, "addedOn"),
    START_DATE((short)19, "startDate"),
    RETIRE_DATE((short)20, "retireDate"),
    /**
     * 
     * @see status
     */
    ITEM_STATUS((short)21, "itemStatus"),
    OTHER_INFO((short)22, "otherInfo"),
    BEST_DEAL_TEXT((short)23, "bestDealText"),
    BEST_DEAL_VALUE((short)24, "bestDealValue"),
    DEALER_PRICE((short)25, "dealerPrice"),
    UPDATED_ON((short)26, "updatedOn"),
    COLOR((short)27, "color");

    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byId.put((int)field._thriftId, field);
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      return byId.get(fieldId);
    }

    /**
     * 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 __ID_ISSET_ID = 0;
  private static final int __CATEGORY_ISSET_ID = 1;
  private static final int __CATALOGITEMID_ISSET_ID = 2;
  private static final int __FEATUREID_ISSET_ID = 3;
  private static final int __MRP_ISSET_ID = 4;
  private static final int __MOP_ISSET_ID = 5;
  private static final int __SELLINGPRICE_ISSET_ID = 6;
  private static final int __TRANSFERPRICE_ISSET_ID = 7;
  private static final int __WEIGHT_ISSET_ID = 8;
  private static final int __ADDEDON_ISSET_ID = 9;
  private static final int __STARTDATE_ISSET_ID = 10;
  private static final int __RETIREDATE_ISSET_ID = 11;
  private static final int __BESTDEALVALUE_ISSET_ID = 12;
  private static final int __DEALERPRICE_ISSET_ID = 13;
  private static final int __UPDATEDON_ISSET_ID = 14;
  private BitSet __isset_bit_vector = new BitSet(15);

  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.I64)));
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.STRING)));
    put(_Fields.BRAND, new FieldMetaData("brand", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.STRING)));
    put(_Fields.MODEL_NUMBER, new FieldMetaData("modelNumber", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.STRING)));
    put(_Fields.MODEL_NAME, new FieldMetaData("modelName", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.STRING)));
    put(_Fields.CATEGORY, new FieldMetaData("category", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.I64)));
    put(_Fields.COMMENTS, new FieldMetaData("comments", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.STRING)));
    put(_Fields.CATALOG_ITEM_ID, new FieldMetaData("catalogItemId", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.I64)));
    put(_Fields.VENDOR_ITEM_ID, new FieldMetaData("vendorItemId", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.STRING)));
    put(_Fields.FEATURE_ID, new FieldMetaData("featureId", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.I64)));
    put(_Fields.FEATURE_DESCRIPTION, new FieldMetaData("featureDescription", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.STRING)));
    put(_Fields.ITEM_INVENTORY, new FieldMetaData("itemInventory", TFieldRequirementType.DEFAULT, 
        new StructMetaData(TType.STRUCT, ItemInventory.class)));
    put(_Fields.MRP, new FieldMetaData("mrp", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.DOUBLE)));
    put(_Fields.MOP, new FieldMetaData("mop", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.DOUBLE)));
    put(_Fields.SELLING_PRICE, new FieldMetaData("sellingPrice", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.DOUBLE)));
    put(_Fields.TRANSFER_PRICE, new FieldMetaData("transferPrice", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.DOUBLE)));
    put(_Fields.WEIGHT, new FieldMetaData("weight", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.DOUBLE)));
    put(_Fields.ADDED_ON, new FieldMetaData("addedOn", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.I64)));
    put(_Fields.START_DATE, new FieldMetaData("startDate", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.I64)));
    put(_Fields.RETIRE_DATE, new FieldMetaData("retireDate", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.I64)));
    put(_Fields.ITEM_STATUS, new FieldMetaData("itemStatus", TFieldRequirementType.DEFAULT, 
        new EnumMetaData(TType.ENUM, status.class)));
    put(_Fields.OTHER_INFO, new FieldMetaData("otherInfo", TFieldRequirementType.DEFAULT, 
        new MapMetaData(TType.MAP, 
            new FieldValueMetaData(TType.STRING), 
            new FieldValueMetaData(TType.STRING))));
    put(_Fields.BEST_DEAL_TEXT, new FieldMetaData("bestDealText", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.STRING)));
    put(_Fields.BEST_DEAL_VALUE, new FieldMetaData("bestDealValue", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.DOUBLE)));
    put(_Fields.DEALER_PRICE, new FieldMetaData("dealerPrice", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.DOUBLE)));
    put(_Fields.UPDATED_ON, new FieldMetaData("updatedOn", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.I64)));
    put(_Fields.COLOR, new FieldMetaData("color", TFieldRequirementType.DEFAULT, 
        new FieldValueMetaData(TType.STRING)));
  }});

  static {
    FieldMetaData.addStructMetaDataMap(Item.class, metaDataMap);
  }

  public Item() {
  }

  public Item(
    long id,
    String productGroup,
    String brand,
    String modelNumber,
    String modelName,
    long category,
    String comments,
    long catalogItemId,
    String vendorItemId,
    long featureId,
    String featureDescription,
    ItemInventory itemInventory,
    double mrp,
    double mop,
    double sellingPrice,
    double transferPrice,
    double weight,
    long addedOn,
    long startDate,
    long retireDate,
    status itemStatus,
    Map<String,String> otherInfo,
    String bestDealText,
    double bestDealValue,
    double dealerPrice,
    long updatedOn,
    String color)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.productGroup = productGroup;
    this.brand = brand;
    this.modelNumber = modelNumber;
    this.modelName = modelName;
    this.category = category;
    setCategoryIsSet(true);
    this.comments = comments;
    this.catalogItemId = catalogItemId;
    setCatalogItemIdIsSet(true);
    this.vendorItemId = vendorItemId;
    this.featureId = featureId;
    setFeatureIdIsSet(true);
    this.featureDescription = featureDescription;
    this.itemInventory = itemInventory;
    this.mrp = mrp;
    setMrpIsSet(true);
    this.mop = mop;
    setMopIsSet(true);
    this.sellingPrice = sellingPrice;
    setSellingPriceIsSet(true);
    this.transferPrice = transferPrice;
    setTransferPriceIsSet(true);
    this.weight = weight;
    setWeightIsSet(true);
    this.addedOn = addedOn;
    setAddedOnIsSet(true);
    this.startDate = startDate;
    setStartDateIsSet(true);
    this.retireDate = retireDate;
    setRetireDateIsSet(true);
    this.itemStatus = itemStatus;
    this.otherInfo = otherInfo;
    this.bestDealText = bestDealText;
    this.bestDealValue = bestDealValue;
    setBestDealValueIsSet(true);
    this.dealerPrice = dealerPrice;
    setDealerPriceIsSet(true);
    this.updatedOn = updatedOn;
    setUpdatedOnIsSet(true);
    this.color = color;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public Item(Item other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.id = other.id;
    if (other.isSetProductGroup()) {
      this.productGroup = other.productGroup;
    }
    if (other.isSetBrand()) {
      this.brand = other.brand;
    }
    if (other.isSetModelNumber()) {
      this.modelNumber = other.modelNumber;
    }
    if (other.isSetModelName()) {
      this.modelName = other.modelName;
    }
    this.category = other.category;
    if (other.isSetComments()) {
      this.comments = other.comments;
    }
    this.catalogItemId = other.catalogItemId;
    if (other.isSetVendorItemId()) {
      this.vendorItemId = other.vendorItemId;
    }
    this.featureId = other.featureId;
    if (other.isSetFeatureDescription()) {
      this.featureDescription = other.featureDescription;
    }
    if (other.isSetItemInventory()) {
      this.itemInventory = new ItemInventory(other.itemInventory);
    }
    this.mrp = other.mrp;
    this.mop = other.mop;
    this.sellingPrice = other.sellingPrice;
    this.transferPrice = other.transferPrice;
    this.weight = other.weight;
    this.addedOn = other.addedOn;
    this.startDate = other.startDate;
    this.retireDate = other.retireDate;
    if (other.isSetItemStatus()) {
      this.itemStatus = other.itemStatus;
    }
    if (other.isSetOtherInfo()) {
      Map<String,String> __this__otherInfo = new HashMap<String,String>();
      for (Map.Entry<String, String> other_element : other.otherInfo.entrySet()) {

        String other_element_key = other_element.getKey();
        String other_element_value = other_element.getValue();

        String __this__otherInfo_copy_key = other_element_key;

        String __this__otherInfo_copy_value = other_element_value;

        __this__otherInfo.put(__this__otherInfo_copy_key, __this__otherInfo_copy_value);
      }
      this.otherInfo = __this__otherInfo;
    }
    if (other.isSetBestDealText()) {
      this.bestDealText = other.bestDealText;
    }
    this.bestDealValue = other.bestDealValue;
    this.dealerPrice = other.dealerPrice;
    this.updatedOn = other.updatedOn;
    if (other.isSetColor()) {
      this.color = other.color;
    }
  }

  public Item deepCopy() {
    return new Item(this);
  }

  @Deprecated
  public Item clone() {
    return new Item(this);
  }

  public long getId() {
    return this.id;
  }

  public Item setId(long id) {
    this.id = id;
    setIdIsSet(true);
    return this;
  }

  public void unsetId() {
    __isset_bit_vector.clear(__ID_ISSET_ID);
  }

  /** Returns true if field id is set (has been asigned 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 String getProductGroup() {
    return this.productGroup;
  }

  public Item setProductGroup(String productGroup) {
    this.productGroup = productGroup;
    return this;
  }

  public void unsetProductGroup() {
    this.productGroup = null;
  }

  /** Returns true if field productGroup is set (has been asigned a value) and false otherwise */
  public boolean isSetProductGroup() {
    return this.productGroup != null;
  }

  public void setProductGroupIsSet(boolean value) {
    if (!value) {
      this.productGroup = null;
    }
  }

  public String getBrand() {
    return this.brand;
  }

  public Item setBrand(String brand) {
    this.brand = brand;
    return this;
  }

  public void unsetBrand() {
    this.brand = null;
  }

  /** Returns true if field brand is set (has been asigned a value) and false otherwise */
  public boolean isSetBrand() {
    return this.brand != null;
  }

  public void setBrandIsSet(boolean value) {
    if (!value) {
      this.brand = null;
    }
  }

  public String getModelNumber() {
    return this.modelNumber;
  }

  public Item setModelNumber(String modelNumber) {
    this.modelNumber = modelNumber;
    return this;
  }

  public void unsetModelNumber() {
    this.modelNumber = null;
  }

  /** Returns true if field modelNumber is set (has been asigned a value) and false otherwise */
  public boolean isSetModelNumber() {
    return this.modelNumber != null;
  }

  public void setModelNumberIsSet(boolean value) {
    if (!value) {
      this.modelNumber = null;
    }
  }

  public String getModelName() {
    return this.modelName;
  }

  public Item setModelName(String modelName) {
    this.modelName = modelName;
    return this;
  }

  public void unsetModelName() {
    this.modelName = null;
  }

  /** Returns true if field modelName is set (has been asigned a value) and false otherwise */
  public boolean isSetModelName() {
    return this.modelName != null;
  }

  public void setModelNameIsSet(boolean value) {
    if (!value) {
      this.modelName = null;
    }
  }

  public long getCategory() {
    return this.category;
  }

  public Item setCategory(long category) {
    this.category = category;
    setCategoryIsSet(true);
    return this;
  }

  public void unsetCategory() {
    __isset_bit_vector.clear(__CATEGORY_ISSET_ID);
  }

  /** Returns true if field category is set (has been asigned a value) and false otherwise */
  public boolean isSetCategory() {
    return __isset_bit_vector.get(__CATEGORY_ISSET_ID);
  }

  public void setCategoryIsSet(boolean value) {
    __isset_bit_vector.set(__CATEGORY_ISSET_ID, value);
  }

  public String getComments() {
    return this.comments;
  }

  public Item setComments(String comments) {
    this.comments = comments;
    return this;
  }

  public void unsetComments() {
    this.comments = null;
  }

  /** Returns true if field comments is set (has been asigned a value) and false otherwise */
  public boolean isSetComments() {
    return this.comments != null;
  }

  public void setCommentsIsSet(boolean value) {
    if (!value) {
      this.comments = null;
    }
  }

  public long getCatalogItemId() {
    return this.catalogItemId;
  }

  public Item setCatalogItemId(long catalogItemId) {
    this.catalogItemId = catalogItemId;
    setCatalogItemIdIsSet(true);
    return this;
  }

  public void unsetCatalogItemId() {
    __isset_bit_vector.clear(__CATALOGITEMID_ISSET_ID);
  }

  /** Returns true if field catalogItemId is set (has been asigned a value) and false otherwise */
  public boolean isSetCatalogItemId() {
    return __isset_bit_vector.get(__CATALOGITEMID_ISSET_ID);
  }

  public void setCatalogItemIdIsSet(boolean value) {
    __isset_bit_vector.set(__CATALOGITEMID_ISSET_ID, value);
  }

  public String getVendorItemId() {
    return this.vendorItemId;
  }

  public Item setVendorItemId(String vendorItemId) {
    this.vendorItemId = vendorItemId;
    return this;
  }

  public void unsetVendorItemId() {
    this.vendorItemId = null;
  }

  /** Returns true if field vendorItemId is set (has been asigned a value) and false otherwise */
  public boolean isSetVendorItemId() {
    return this.vendorItemId != null;
  }

  public void setVendorItemIdIsSet(boolean value) {
    if (!value) {
      this.vendorItemId = null;
    }
  }

  public long getFeatureId() {
    return this.featureId;
  }

  public Item setFeatureId(long featureId) {
    this.featureId = featureId;
    setFeatureIdIsSet(true);
    return this;
  }

  public void unsetFeatureId() {
    __isset_bit_vector.clear(__FEATUREID_ISSET_ID);
  }

  /** Returns true if field featureId is set (has been asigned a value) and false otherwise */
  public boolean isSetFeatureId() {
    return __isset_bit_vector.get(__FEATUREID_ISSET_ID);
  }

  public void setFeatureIdIsSet(boolean value) {
    __isset_bit_vector.set(__FEATUREID_ISSET_ID, value);
  }

  public String getFeatureDescription() {
    return this.featureDescription;
  }

  public Item setFeatureDescription(String featureDescription) {
    this.featureDescription = featureDescription;
    return this;
  }

  public void unsetFeatureDescription() {
    this.featureDescription = null;
  }

  /** Returns true if field featureDescription is set (has been asigned a value) and false otherwise */
  public boolean isSetFeatureDescription() {
    return this.featureDescription != null;
  }

  public void setFeatureDescriptionIsSet(boolean value) {
    if (!value) {
      this.featureDescription = null;
    }
  }

  public ItemInventory getItemInventory() {
    return this.itemInventory;
  }

  public Item setItemInventory(ItemInventory itemInventory) {
    this.itemInventory = itemInventory;
    return this;
  }

  public void unsetItemInventory() {
    this.itemInventory = null;
  }

  /** Returns true if field itemInventory is set (has been asigned a value) and false otherwise */
  public boolean isSetItemInventory() {
    return this.itemInventory != null;
  }

  public void setItemInventoryIsSet(boolean value) {
    if (!value) {
      this.itemInventory = null;
    }
  }

  public double getMrp() {
    return this.mrp;
  }

  public Item setMrp(double mrp) {
    this.mrp = mrp;
    setMrpIsSet(true);
    return this;
  }

  public void unsetMrp() {
    __isset_bit_vector.clear(__MRP_ISSET_ID);
  }

  /** Returns true if field mrp is set (has been asigned a value) and false otherwise */
  public boolean isSetMrp() {
    return __isset_bit_vector.get(__MRP_ISSET_ID);
  }

  public void setMrpIsSet(boolean value) {
    __isset_bit_vector.set(__MRP_ISSET_ID, value);
  }

  public double getMop() {
    return this.mop;
  }

  public Item setMop(double mop) {
    this.mop = mop;
    setMopIsSet(true);
    return this;
  }

  public void unsetMop() {
    __isset_bit_vector.clear(__MOP_ISSET_ID);
  }

  /** Returns true if field mop is set (has been asigned a value) and false otherwise */
  public boolean isSetMop() {
    return __isset_bit_vector.get(__MOP_ISSET_ID);
  }

  public void setMopIsSet(boolean value) {
    __isset_bit_vector.set(__MOP_ISSET_ID, value);
  }

  public double getSellingPrice() {
    return this.sellingPrice;
  }

  public Item setSellingPrice(double sellingPrice) {
    this.sellingPrice = sellingPrice;
    setSellingPriceIsSet(true);
    return this;
  }

  public void unsetSellingPrice() {
    __isset_bit_vector.clear(__SELLINGPRICE_ISSET_ID);
  }

  /** Returns true if field sellingPrice is set (has been asigned a value) and false otherwise */
  public boolean isSetSellingPrice() {
    return __isset_bit_vector.get(__SELLINGPRICE_ISSET_ID);
  }

  public void setSellingPriceIsSet(boolean value) {
    __isset_bit_vector.set(__SELLINGPRICE_ISSET_ID, value);
  }

  public double getTransferPrice() {
    return this.transferPrice;
  }

  public Item setTransferPrice(double transferPrice) {
    this.transferPrice = transferPrice;
    setTransferPriceIsSet(true);
    return this;
  }

  public void unsetTransferPrice() {
    __isset_bit_vector.clear(__TRANSFERPRICE_ISSET_ID);
  }

  /** Returns true if field transferPrice is set (has been asigned a value) and false otherwise */
  public boolean isSetTransferPrice() {
    return __isset_bit_vector.get(__TRANSFERPRICE_ISSET_ID);
  }

  public void setTransferPriceIsSet(boolean value) {
    __isset_bit_vector.set(__TRANSFERPRICE_ISSET_ID, value);
  }

  public double getWeight() {
    return this.weight;
  }

  public Item setWeight(double weight) {
    this.weight = weight;
    setWeightIsSet(true);
    return this;
  }

  public void unsetWeight() {
    __isset_bit_vector.clear(__WEIGHT_ISSET_ID);
  }

  /** Returns true if field weight is set (has been asigned a value) and false otherwise */
  public boolean isSetWeight() {
    return __isset_bit_vector.get(__WEIGHT_ISSET_ID);
  }

  public void setWeightIsSet(boolean value) {
    __isset_bit_vector.set(__WEIGHT_ISSET_ID, value);
  }

  public long getAddedOn() {
    return this.addedOn;
  }

  public Item setAddedOn(long addedOn) {
    this.addedOn = addedOn;
    setAddedOnIsSet(true);
    return this;
  }

  public void unsetAddedOn() {
    __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
  }

  /** Returns true if field addedOn is set (has been asigned a value) and false otherwise */
  public boolean isSetAddedOn() {
    return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
  }

  public void setAddedOnIsSet(boolean value) {
    __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
  }

  public long getStartDate() {
    return this.startDate;
  }

  public Item setStartDate(long startDate) {
    this.startDate = startDate;
    setStartDateIsSet(true);
    return this;
  }

  public void unsetStartDate() {
    __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
  }

  /** Returns true if field startDate is set (has been asigned a value) and false otherwise */
  public boolean isSetStartDate() {
    return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
  }

  public void setStartDateIsSet(boolean value) {
    __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
  }

  public long getRetireDate() {
    return this.retireDate;
  }

  public Item setRetireDate(long retireDate) {
    this.retireDate = retireDate;
    setRetireDateIsSet(true);
    return this;
  }

  public void unsetRetireDate() {
    __isset_bit_vector.clear(__RETIREDATE_ISSET_ID);
  }

  /** Returns true if field retireDate is set (has been asigned a value) and false otherwise */
  public boolean isSetRetireDate() {
    return __isset_bit_vector.get(__RETIREDATE_ISSET_ID);
  }

  public void setRetireDateIsSet(boolean value) {
    __isset_bit_vector.set(__RETIREDATE_ISSET_ID, value);
  }

  /**
   * 
   * @see status
   */
  public status getItemStatus() {
    return this.itemStatus;
  }

  /**
   * 
   * @see status
   */
  public Item setItemStatus(status itemStatus) {
    this.itemStatus = itemStatus;
    return this;
  }

  public void unsetItemStatus() {
    this.itemStatus = null;
  }

  /** Returns true if field itemStatus is set (has been asigned a value) and false otherwise */
  public boolean isSetItemStatus() {
    return this.itemStatus != null;
  }

  public void setItemStatusIsSet(boolean value) {
    if (!value) {
      this.itemStatus = null;
    }
  }

  public int getOtherInfoSize() {
    return (this.otherInfo == null) ? 0 : this.otherInfo.size();
  }

  public void putToOtherInfo(String key, String val) {
    if (this.otherInfo == null) {
      this.otherInfo = new HashMap<String,String>();
    }
    this.otherInfo.put(key, val);
  }

  public Map<String,String> getOtherInfo() {
    return this.otherInfo;
  }

  public Item setOtherInfo(Map<String,String> otherInfo) {
    this.otherInfo = otherInfo;
    return this;
  }

  public void unsetOtherInfo() {
    this.otherInfo = null;
  }

  /** Returns true if field otherInfo is set (has been asigned a value) and false otherwise */
  public boolean isSetOtherInfo() {
    return this.otherInfo != null;
  }

  public void setOtherInfoIsSet(boolean value) {
    if (!value) {
      this.otherInfo = null;
    }
  }

  public String getBestDealText() {
    return this.bestDealText;
  }

  public Item setBestDealText(String bestDealText) {
    this.bestDealText = bestDealText;
    return this;
  }

  public void unsetBestDealText() {
    this.bestDealText = null;
  }

  /** Returns true if field bestDealText is set (has been asigned a value) and false otherwise */
  public boolean isSetBestDealText() {
    return this.bestDealText != null;
  }

  public void setBestDealTextIsSet(boolean value) {
    if (!value) {
      this.bestDealText = null;
    }
  }

  public double getBestDealValue() {
    return this.bestDealValue;
  }

  public Item setBestDealValue(double bestDealValue) {
    this.bestDealValue = bestDealValue;
    setBestDealValueIsSet(true);
    return this;
  }

  public void unsetBestDealValue() {
    __isset_bit_vector.clear(__BESTDEALVALUE_ISSET_ID);
  }

  /** Returns true if field bestDealValue is set (has been asigned a value) and false otherwise */
  public boolean isSetBestDealValue() {
    return __isset_bit_vector.get(__BESTDEALVALUE_ISSET_ID);
  }

  public void setBestDealValueIsSet(boolean value) {
    __isset_bit_vector.set(__BESTDEALVALUE_ISSET_ID, value);
  }

  public double getDealerPrice() {
    return this.dealerPrice;
  }

  public Item setDealerPrice(double dealerPrice) {
    this.dealerPrice = dealerPrice;
    setDealerPriceIsSet(true);
    return this;
  }

  public void unsetDealerPrice() {
    __isset_bit_vector.clear(__DEALERPRICE_ISSET_ID);
  }

  /** Returns true if field dealerPrice is set (has been asigned a value) and false otherwise */
  public boolean isSetDealerPrice() {
    return __isset_bit_vector.get(__DEALERPRICE_ISSET_ID);
  }

  public void setDealerPriceIsSet(boolean value) {
    __isset_bit_vector.set(__DEALERPRICE_ISSET_ID, value);
  }

  public long getUpdatedOn() {
    return this.updatedOn;
  }

  public Item setUpdatedOn(long updatedOn) {
    this.updatedOn = updatedOn;
    setUpdatedOnIsSet(true);
    return this;
  }

  public void unsetUpdatedOn() {
    __isset_bit_vector.clear(__UPDATEDON_ISSET_ID);
  }

  /** Returns true if field updatedOn is set (has been asigned a value) and false otherwise */
  public boolean isSetUpdatedOn() {
    return __isset_bit_vector.get(__UPDATEDON_ISSET_ID);
  }

  public void setUpdatedOnIsSet(boolean value) {
    __isset_bit_vector.set(__UPDATEDON_ISSET_ID, value);
  }

  public String getColor() {
    return this.color;
  }

  public Item setColor(String color) {
    this.color = color;
    return this;
  }

  public void unsetColor() {
    this.color = null;
  }

  /** Returns true if field color is set (has been asigned a value) and false otherwise */
  public boolean isSetColor() {
    return this.color != null;
  }

  public void setColorIsSet(boolean value) {
    if (!value) {
      this.color = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case ID:
      if (value == null) {
        unsetId();
      } else {
        setId((Long)value);
      }
      break;

    case PRODUCT_GROUP:
      if (value == null) {
        unsetProductGroup();
      } else {
        setProductGroup((String)value);
      }
      break;

    case BRAND:
      if (value == null) {
        unsetBrand();
      } else {
        setBrand((String)value);
      }
      break;

    case MODEL_NUMBER:
      if (value == null) {
        unsetModelNumber();
      } else {
        setModelNumber((String)value);
      }
      break;

    case MODEL_NAME:
      if (value == null) {
        unsetModelName();
      } else {
        setModelName((String)value);
      }
      break;

    case CATEGORY:
      if (value == null) {
        unsetCategory();
      } else {
        setCategory((Long)value);
      }
      break;

    case COMMENTS:
      if (value == null) {
        unsetComments();
      } else {
        setComments((String)value);
      }
      break;

    case CATALOG_ITEM_ID:
      if (value == null) {
        unsetCatalogItemId();
      } else {
        setCatalogItemId((Long)value);
      }
      break;

    case VENDOR_ITEM_ID:
      if (value == null) {
        unsetVendorItemId();
      } else {
        setVendorItemId((String)value);
      }
      break;

    case FEATURE_ID:
      if (value == null) {
        unsetFeatureId();
      } else {
        setFeatureId((Long)value);
      }
      break;

    case FEATURE_DESCRIPTION:
      if (value == null) {
        unsetFeatureDescription();
      } else {
        setFeatureDescription((String)value);
      }
      break;

    case ITEM_INVENTORY:
      if (value == null) {
        unsetItemInventory();
      } else {
        setItemInventory((ItemInventory)value);
      }
      break;

    case MRP:
      if (value == null) {
        unsetMrp();
      } else {
        setMrp((Double)value);
      }
      break;

    case MOP:
      if (value == null) {
        unsetMop();
      } else {
        setMop((Double)value);
      }
      break;

    case SELLING_PRICE:
      if (value == null) {
        unsetSellingPrice();
      } else {
        setSellingPrice((Double)value);
      }
      break;

    case TRANSFER_PRICE:
      if (value == null) {
        unsetTransferPrice();
      } else {
        setTransferPrice((Double)value);
      }
      break;

    case WEIGHT:
      if (value == null) {
        unsetWeight();
      } else {
        setWeight((Double)value);
      }
      break;

    case ADDED_ON:
      if (value == null) {
        unsetAddedOn();
      } else {
        setAddedOn((Long)value);
      }
      break;

    case START_DATE:
      if (value == null) {
        unsetStartDate();
      } else {
        setStartDate((Long)value);
      }
      break;

    case RETIRE_DATE:
      if (value == null) {
        unsetRetireDate();
      } else {
        setRetireDate((Long)value);
      }
      break;

    case ITEM_STATUS:
      if (value == null) {
        unsetItemStatus();
      } else {
        setItemStatus((status)value);
      }
      break;

    case OTHER_INFO:
      if (value == null) {
        unsetOtherInfo();
      } else {
        setOtherInfo((Map<String,String>)value);
      }
      break;

    case BEST_DEAL_TEXT:
      if (value == null) {
        unsetBestDealText();
      } else {
        setBestDealText((String)value);
      }
      break;

    case BEST_DEAL_VALUE:
      if (value == null) {
        unsetBestDealValue();
      } else {
        setBestDealValue((Double)value);
      }
      break;

    case DEALER_PRICE:
      if (value == null) {
        unsetDealerPrice();
      } else {
        setDealerPrice((Double)value);
      }
      break;

    case UPDATED_ON:
      if (value == null) {
        unsetUpdatedOn();
      } else {
        setUpdatedOn((Long)value);
      }
      break;

    case COLOR:
      if (value == null) {
        unsetColor();
      } else {
        setColor((String)value);
      }
      break;

    }
  }

  public void setFieldValue(int fieldID, Object value) {
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case ID:
      return new Long(getId());

    case PRODUCT_GROUP:
      return getProductGroup();

    case BRAND:
      return getBrand();

    case MODEL_NUMBER:
      return getModelNumber();

    case MODEL_NAME:
      return getModelName();

    case CATEGORY:
      return new Long(getCategory());

    case COMMENTS:
      return getComments();

    case CATALOG_ITEM_ID:
      return new Long(getCatalogItemId());

    case VENDOR_ITEM_ID:
      return getVendorItemId();

    case FEATURE_ID:
      return new Long(getFeatureId());

    case FEATURE_DESCRIPTION:
      return getFeatureDescription();

    case ITEM_INVENTORY:
      return getItemInventory();

    case MRP:
      return new Double(getMrp());

    case MOP:
      return new Double(getMop());

    case SELLING_PRICE:
      return new Double(getSellingPrice());

    case TRANSFER_PRICE:
      return new Double(getTransferPrice());

    case WEIGHT:
      return new Double(getWeight());

    case ADDED_ON:
      return new Long(getAddedOn());

    case START_DATE:
      return new Long(getStartDate());

    case RETIRE_DATE:
      return new Long(getRetireDate());

    case ITEM_STATUS:
      return getItemStatus();

    case OTHER_INFO:
      return getOtherInfo();

    case BEST_DEAL_TEXT:
      return getBestDealText();

    case BEST_DEAL_VALUE:
      return new Double(getBestDealValue());

    case DEALER_PRICE:
      return new Double(getDealerPrice());

    case UPDATED_ON:
      return new Long(getUpdatedOn());

    case COLOR:
      return getColor();

    }
    throw new IllegalStateException();
  }

  public Object getFieldValue(int fieldId) {
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
  }

  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    switch (field) {
    case ID:
      return isSetId();
    case PRODUCT_GROUP:
      return isSetProductGroup();
    case BRAND:
      return isSetBrand();
    case MODEL_NUMBER:
      return isSetModelNumber();
    case MODEL_NAME:
      return isSetModelName();
    case CATEGORY:
      return isSetCategory();
    case COMMENTS:
      return isSetComments();
    case CATALOG_ITEM_ID:
      return isSetCatalogItemId();
    case VENDOR_ITEM_ID:
      return isSetVendorItemId();
    case FEATURE_ID:
      return isSetFeatureId();
    case FEATURE_DESCRIPTION:
      return isSetFeatureDescription();
    case ITEM_INVENTORY:
      return isSetItemInventory();
    case MRP:
      return isSetMrp();
    case MOP:
      return isSetMop();
    case SELLING_PRICE:
      return isSetSellingPrice();
    case TRANSFER_PRICE:
      return isSetTransferPrice();
    case WEIGHT:
      return isSetWeight();
    case ADDED_ON:
      return isSetAddedOn();
    case START_DATE:
      return isSetStartDate();
    case RETIRE_DATE:
      return isSetRetireDate();
    case ITEM_STATUS:
      return isSetItemStatus();
    case OTHER_INFO:
      return isSetOtherInfo();
    case BEST_DEAL_TEXT:
      return isSetBestDealText();
    case BEST_DEAL_VALUE:
      return isSetBestDealValue();
    case DEALER_PRICE:
      return isSetDealerPrice();
    case UPDATED_ON:
      return isSetUpdatedOn();
    case COLOR:
      return isSetColor();
    }
    throw new IllegalStateException();
  }

  public boolean isSet(int fieldID) {
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof Item)
      return this.equals((Item)that);
    return false;
  }

  public boolean equals(Item 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_productGroup = true && this.isSetProductGroup();
    boolean that_present_productGroup = true && that.isSetProductGroup();
    if (this_present_productGroup || that_present_productGroup) {
      if (!(this_present_productGroup && that_present_productGroup))
        return false;
      if (!this.productGroup.equals(that.productGroup))
        return false;
    }

    boolean this_present_brand = true && this.isSetBrand();
    boolean that_present_brand = true && that.isSetBrand();
    if (this_present_brand || that_present_brand) {
      if (!(this_present_brand && that_present_brand))
        return false;
      if (!this.brand.equals(that.brand))
        return false;
    }

    boolean this_present_modelNumber = true && this.isSetModelNumber();
    boolean that_present_modelNumber = true && that.isSetModelNumber();
    if (this_present_modelNumber || that_present_modelNumber) {
      if (!(this_present_modelNumber && that_present_modelNumber))
        return false;
      if (!this.modelNumber.equals(that.modelNumber))
        return false;
    }

    boolean this_present_modelName = true && this.isSetModelName();
    boolean that_present_modelName = true && that.isSetModelName();
    if (this_present_modelName || that_present_modelName) {
      if (!(this_present_modelName && that_present_modelName))
        return false;
      if (!this.modelName.equals(that.modelName))
        return false;
    }

    boolean this_present_category = true;
    boolean that_present_category = true;
    if (this_present_category || that_present_category) {
      if (!(this_present_category && that_present_category))
        return false;
      if (this.category != that.category)
        return false;
    }

    boolean this_present_comments = true && this.isSetComments();
    boolean that_present_comments = true && that.isSetComments();
    if (this_present_comments || that_present_comments) {
      if (!(this_present_comments && that_present_comments))
        return false;
      if (!this.comments.equals(that.comments))
        return false;
    }

    boolean this_present_catalogItemId = true;
    boolean that_present_catalogItemId = true;
    if (this_present_catalogItemId || that_present_catalogItemId) {
      if (!(this_present_catalogItemId && that_present_catalogItemId))
        return false;
      if (this.catalogItemId != that.catalogItemId)
        return false;
    }

    boolean this_present_vendorItemId = true && this.isSetVendorItemId();
    boolean that_present_vendorItemId = true && that.isSetVendorItemId();
    if (this_present_vendorItemId || that_present_vendorItemId) {
      if (!(this_present_vendorItemId && that_present_vendorItemId))
        return false;
      if (!this.vendorItemId.equals(that.vendorItemId))
        return false;
    }

    boolean this_present_featureId = true;
    boolean that_present_featureId = true;
    if (this_present_featureId || that_present_featureId) {
      if (!(this_present_featureId && that_present_featureId))
        return false;
      if (this.featureId != that.featureId)
        return false;
    }

    boolean this_present_featureDescription = true && this.isSetFeatureDescription();
    boolean that_present_featureDescription = true && that.isSetFeatureDescription();
    if (this_present_featureDescription || that_present_featureDescription) {
      if (!(this_present_featureDescription && that_present_featureDescription))
        return false;
      if (!this.featureDescription.equals(that.featureDescription))
        return false;
    }

    boolean this_present_itemInventory = true && this.isSetItemInventory();
    boolean that_present_itemInventory = true && that.isSetItemInventory();
    if (this_present_itemInventory || that_present_itemInventory) {
      if (!(this_present_itemInventory && that_present_itemInventory))
        return false;
      if (!this.itemInventory.equals(that.itemInventory))
        return false;
    }

    boolean this_present_mrp = true;
    boolean that_present_mrp = true;
    if (this_present_mrp || that_present_mrp) {
      if (!(this_present_mrp && that_present_mrp))
        return false;
      if (this.mrp != that.mrp)
        return false;
    }

    boolean this_present_mop = true;
    boolean that_present_mop = true;
    if (this_present_mop || that_present_mop) {
      if (!(this_present_mop && that_present_mop))
        return false;
      if (this.mop != that.mop)
        return false;
    }

    boolean this_present_sellingPrice = true;
    boolean that_present_sellingPrice = true;
    if (this_present_sellingPrice || that_present_sellingPrice) {
      if (!(this_present_sellingPrice && that_present_sellingPrice))
        return false;
      if (this.sellingPrice != that.sellingPrice)
        return false;
    }

    boolean this_present_transferPrice = true;
    boolean that_present_transferPrice = true;
    if (this_present_transferPrice || that_present_transferPrice) {
      if (!(this_present_transferPrice && that_present_transferPrice))
        return false;
      if (this.transferPrice != that.transferPrice)
        return false;
    }

    boolean this_present_weight = true;
    boolean that_present_weight = true;
    if (this_present_weight || that_present_weight) {
      if (!(this_present_weight && that_present_weight))
        return false;
      if (this.weight != that.weight)
        return false;
    }

    boolean this_present_addedOn = true;
    boolean that_present_addedOn = true;
    if (this_present_addedOn || that_present_addedOn) {
      if (!(this_present_addedOn && that_present_addedOn))
        return false;
      if (this.addedOn != that.addedOn)
        return false;
    }

    boolean this_present_startDate = true;
    boolean that_present_startDate = true;
    if (this_present_startDate || that_present_startDate) {
      if (!(this_present_startDate && that_present_startDate))
        return false;
      if (this.startDate != that.startDate)
        return false;
    }

    boolean this_present_retireDate = true;
    boolean that_present_retireDate = true;
    if (this_present_retireDate || that_present_retireDate) {
      if (!(this_present_retireDate && that_present_retireDate))
        return false;
      if (this.retireDate != that.retireDate)
        return false;
    }

    boolean this_present_itemStatus = true && this.isSetItemStatus();
    boolean that_present_itemStatus = true && that.isSetItemStatus();
    if (this_present_itemStatus || that_present_itemStatus) {
      if (!(this_present_itemStatus && that_present_itemStatus))
        return false;
      if (!this.itemStatus.equals(that.itemStatus))
        return false;
    }

    boolean this_present_otherInfo = true && this.isSetOtherInfo();
    boolean that_present_otherInfo = true && that.isSetOtherInfo();
    if (this_present_otherInfo || that_present_otherInfo) {
      if (!(this_present_otherInfo && that_present_otherInfo))
        return false;
      if (!this.otherInfo.equals(that.otherInfo))
        return false;
    }

    boolean this_present_bestDealText = true && this.isSetBestDealText();
    boolean that_present_bestDealText = true && that.isSetBestDealText();
    if (this_present_bestDealText || that_present_bestDealText) {
      if (!(this_present_bestDealText && that_present_bestDealText))
        return false;
      if (!this.bestDealText.equals(that.bestDealText))
        return false;
    }

    boolean this_present_bestDealValue = true;
    boolean that_present_bestDealValue = true;
    if (this_present_bestDealValue || that_present_bestDealValue) {
      if (!(this_present_bestDealValue && that_present_bestDealValue))
        return false;
      if (this.bestDealValue != that.bestDealValue)
        return false;
    }

    boolean this_present_dealerPrice = true;
    boolean that_present_dealerPrice = true;
    if (this_present_dealerPrice || that_present_dealerPrice) {
      if (!(this_present_dealerPrice && that_present_dealerPrice))
        return false;
      if (this.dealerPrice != that.dealerPrice)
        return false;
    }

    boolean this_present_updatedOn = true;
    boolean that_present_updatedOn = true;
    if (this_present_updatedOn || that_present_updatedOn) {
      if (!(this_present_updatedOn && that_present_updatedOn))
        return false;
      if (this.updatedOn != that.updatedOn)
        return false;
    }

    boolean this_present_color = true && this.isSetColor();
    boolean that_present_color = true && that.isSetColor();
    if (this_present_color || that_present_color) {
      if (!(this_present_color && that_present_color))
        return false;
      if (!this.color.equals(that.color))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    return 0;
  }

  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true)
    {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) { 
        break;
      }
      _Fields fieldId = _Fields.findByThriftId(field.id);
      if (fieldId == null) {
        TProtocolUtil.skip(iprot, field.type);
      } else {
        switch (fieldId) {
          case ID:
            if (field.type == TType.I64) {
              this.id = iprot.readI64();
              setIdIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case PRODUCT_GROUP:
            if (field.type == TType.STRING) {
              this.productGroup = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case BRAND:
            if (field.type == TType.STRING) {
              this.brand = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case MODEL_NUMBER:
            if (field.type == TType.STRING) {
              this.modelNumber = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case MODEL_NAME:
            if (field.type == TType.STRING) {
              this.modelName = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case CATEGORY:
            if (field.type == TType.I64) {
              this.category = iprot.readI64();
              setCategoryIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case COMMENTS:
            if (field.type == TType.STRING) {
              this.comments = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case CATALOG_ITEM_ID:
            if (field.type == TType.I64) {
              this.catalogItemId = iprot.readI64();
              setCatalogItemIdIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case VENDOR_ITEM_ID:
            if (field.type == TType.STRING) {
              this.vendorItemId = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case FEATURE_ID:
            if (field.type == TType.I64) {
              this.featureId = iprot.readI64();
              setFeatureIdIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case FEATURE_DESCRIPTION:
            if (field.type == TType.STRING) {
              this.featureDescription = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case ITEM_INVENTORY:
            if (field.type == TType.STRUCT) {
              this.itemInventory = new ItemInventory();
              this.itemInventory.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case MRP:
            if (field.type == TType.DOUBLE) {
              this.mrp = iprot.readDouble();
              setMrpIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case MOP:
            if (field.type == TType.DOUBLE) {
              this.mop = iprot.readDouble();
              setMopIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case SELLING_PRICE:
            if (field.type == TType.DOUBLE) {
              this.sellingPrice = iprot.readDouble();
              setSellingPriceIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case TRANSFER_PRICE:
            if (field.type == TType.DOUBLE) {
              this.transferPrice = iprot.readDouble();
              setTransferPriceIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case WEIGHT:
            if (field.type == TType.DOUBLE) {
              this.weight = iprot.readDouble();
              setWeightIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case ADDED_ON:
            if (field.type == TType.I64) {
              this.addedOn = iprot.readI64();
              setAddedOnIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case START_DATE:
            if (field.type == TType.I64) {
              this.startDate = iprot.readI64();
              setStartDateIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case RETIRE_DATE:
            if (field.type == TType.I64) {
              this.retireDate = iprot.readI64();
              setRetireDateIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case ITEM_STATUS:
            if (field.type == TType.I32) {
              this.itemStatus = status.findByValue(iprot.readI32());
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case OTHER_INFO:
            if (field.type == TType.MAP) {
              {
                TMap _map5 = iprot.readMapBegin();
                this.otherInfo = new HashMap<String,String>(2*_map5.size);
                for (int _i6 = 0; _i6 < _map5.size; ++_i6)
                {
                  String _key7;
                  String _val8;
                  _key7 = iprot.readString();
                  _val8 = iprot.readString();
                  this.otherInfo.put(_key7, _val8);
                }
                iprot.readMapEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case BEST_DEAL_TEXT:
            if (field.type == TType.STRING) {
              this.bestDealText = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case BEST_DEAL_VALUE:
            if (field.type == TType.DOUBLE) {
              this.bestDealValue = iprot.readDouble();
              setBestDealValueIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case DEALER_PRICE:
            if (field.type == TType.DOUBLE) {
              this.dealerPrice = iprot.readDouble();
              setDealerPriceIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case UPDATED_ON:
            if (field.type == TType.I64) {
              this.updatedOn = iprot.readI64();
              setUpdatedOnIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case COLOR:
            if (field.type == TType.STRING) {
              this.color = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
        }
        iprot.readFieldEnd();
      }
    }
    iprot.readStructEnd();
    validate();
  }

  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    oprot.writeFieldBegin(ID_FIELD_DESC);
    oprot.writeI64(this.id);
    oprot.writeFieldEnd();
    if (this.productGroup != null) {
      oprot.writeFieldBegin(PRODUCT_GROUP_FIELD_DESC);
      oprot.writeString(this.productGroup);
      oprot.writeFieldEnd();
    }
    if (this.brand != null) {
      oprot.writeFieldBegin(BRAND_FIELD_DESC);
      oprot.writeString(this.brand);
      oprot.writeFieldEnd();
    }
    if (this.modelNumber != null) {
      oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);
      oprot.writeString(this.modelNumber);
      oprot.writeFieldEnd();
    }
    if (this.modelName != null) {
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
      oprot.writeString(this.modelName);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
    oprot.writeI64(this.category);
    oprot.writeFieldEnd();
    if (this.comments != null) {
      oprot.writeFieldBegin(COMMENTS_FIELD_DESC);
      oprot.writeString(this.comments);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(CATALOG_ITEM_ID_FIELD_DESC);
    oprot.writeI64(this.catalogItemId);
    oprot.writeFieldEnd();
    if (this.vendorItemId != null) {
      oprot.writeFieldBegin(VENDOR_ITEM_ID_FIELD_DESC);
      oprot.writeString(this.vendorItemId);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(FEATURE_ID_FIELD_DESC);
    oprot.writeI64(this.featureId);
    oprot.writeFieldEnd();
    if (this.featureDescription != null) {
      oprot.writeFieldBegin(FEATURE_DESCRIPTION_FIELD_DESC);
      oprot.writeString(this.featureDescription);
      oprot.writeFieldEnd();
    }
    if (this.itemInventory != null) {
      oprot.writeFieldBegin(ITEM_INVENTORY_FIELD_DESC);
      this.itemInventory.write(oprot);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(MRP_FIELD_DESC);
    oprot.writeDouble(this.mrp);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MOP_FIELD_DESC);
    oprot.writeDouble(this.mop);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SELLING_PRICE_FIELD_DESC);
    oprot.writeDouble(this.sellingPrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(TRANSFER_PRICE_FIELD_DESC);
    oprot.writeDouble(this.transferPrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(WEIGHT_FIELD_DESC);
    oprot.writeDouble(this.weight);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
    oprot.writeI64(this.addedOn);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(START_DATE_FIELD_DESC);
    oprot.writeI64(this.startDate);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(RETIRE_DATE_FIELD_DESC);
    oprot.writeI64(this.retireDate);
    oprot.writeFieldEnd();
    if (this.itemStatus != null) {
      oprot.writeFieldBegin(ITEM_STATUS_FIELD_DESC);
      oprot.writeI32(this.itemStatus.getValue());
      oprot.writeFieldEnd();
    }
    if (this.otherInfo != null) {
      oprot.writeFieldBegin(OTHER_INFO_FIELD_DESC);
      {
        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.otherInfo.size()));
        for (Map.Entry<String, String> _iter9 : this.otherInfo.entrySet())
        {
          oprot.writeString(_iter9.getKey());
          oprot.writeString(_iter9.getValue());
        }
        oprot.writeMapEnd();
      }
      oprot.writeFieldEnd();
    }
    if (this.bestDealText != null) {
      oprot.writeFieldBegin(BEST_DEAL_TEXT_FIELD_DESC);
      oprot.writeString(this.bestDealText);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(BEST_DEAL_VALUE_FIELD_DESC);
    oprot.writeDouble(this.bestDealValue);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(DEALER_PRICE_FIELD_DESC);
    oprot.writeDouble(this.dealerPrice);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(UPDATED_ON_FIELD_DESC);
    oprot.writeI64(this.updatedOn);
    oprot.writeFieldEnd();
    if (this.color != null) {
      oprot.writeFieldBegin(COLOR_FIELD_DESC);
      oprot.writeString(this.color);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("Item(");
    boolean first = true;

    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("productGroup:");
    if (this.productGroup == null) {
      sb.append("null");
    } else {
      sb.append(this.productGroup);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("brand:");
    if (this.brand == null) {
      sb.append("null");
    } else {
      sb.append(this.brand);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("modelNumber:");
    if (this.modelNumber == null) {
      sb.append("null");
    } else {
      sb.append(this.modelNumber);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("modelName:");
    if (this.modelName == null) {
      sb.append("null");
    } else {
      sb.append(this.modelName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("category:");
    sb.append(this.category);
    first = false;
    if (!first) sb.append(", ");
    sb.append("comments:");
    if (this.comments == null) {
      sb.append("null");
    } else {
      sb.append(this.comments);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("catalogItemId:");
    sb.append(this.catalogItemId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("vendorItemId:");
    if (this.vendorItemId == null) {
      sb.append("null");
    } else {
      sb.append(this.vendorItemId);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("featureId:");
    sb.append(this.featureId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("featureDescription:");
    if (this.featureDescription == null) {
      sb.append("null");
    } else {
      sb.append(this.featureDescription);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("itemInventory:");
    if (this.itemInventory == null) {
      sb.append("null");
    } else {
      sb.append(this.itemInventory);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("mrp:");
    sb.append(this.mrp);
    first = false;
    if (!first) sb.append(", ");
    sb.append("mop:");
    sb.append(this.mop);
    first = false;
    if (!first) sb.append(", ");
    sb.append("sellingPrice:");
    sb.append(this.sellingPrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("transferPrice:");
    sb.append(this.transferPrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("weight:");
    sb.append(this.weight);
    first = false;
    if (!first) sb.append(", ");
    sb.append("addedOn:");
    sb.append(this.addedOn);
    first = false;
    if (!first) sb.append(", ");
    sb.append("startDate:");
    sb.append(this.startDate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("retireDate:");
    sb.append(this.retireDate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("itemStatus:");
    if (this.itemStatus == null) {
      sb.append("null");
    } else {
      String itemStatus_name = itemStatus.name();
      if (itemStatus_name != null) {
        sb.append(itemStatus_name);
        sb.append(" (");
      }
      sb.append(this.itemStatus);
      if (itemStatus_name != null) {
        sb.append(")");
      }
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("otherInfo:");
    if (this.otherInfo == null) {
      sb.append("null");
    } else {
      sb.append(this.otherInfo);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("bestDealText:");
    if (this.bestDealText == null) {
      sb.append("null");
    } else {
      sb.append(this.bestDealText);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("bestDealValue:");
    sb.append(this.bestDealValue);
    first = false;
    if (!first) sb.append(", ");
    sb.append("dealerPrice:");
    sb.append(this.dealerPrice);
    first = false;
    if (!first) sb.append(", ");
    sb.append("updatedOn:");
    sb.append(this.updatedOn);
    first = false;
    if (!first) sb.append(", ");
    sb.append("color:");
    if (this.color == null) {
      sb.append("null");
    } else {
      sb.append(this.color);
    }
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws TException {
    // check for required fields
  }

}