<?php
import("com.laurus.core.coreent.LCoreBean");
/**
 * Description of InvItemDetails
 * @tableName tbl_inventory_items_details
 * @author Kunal Mestri <kunal@laurus-it.com>
 */
class InvItemDetails extends LCoreBean{
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_ID
    * @type int
    * @primary 
    */
    private $itemDetailId;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_QUANTITY
    * @type int
    */
    private $itemQuantity;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_SPECIFICATION
    * @type string
    */
    private $itemSpecification;
    /**
    * @columnName INVENTORY_ITEMS_ICIM_ID
    * @type int
    * @searchable
    */
    private $itemIcimId;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_ORDER_ITEM_DETAILS_ID
    * @type int
    * @searchable
    */
    private $itemOrderItemDetailId;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_TOTAL_AMOUNT
    * @type int
    */
    private $itemTotalAmount;
    /**
    * @columnName INVENTORY_ITEM_WARRANTY
    * @type int
    */
    private $warrenty;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_EXPIRED_DATE
    * @type int 
    * @jsonDate
    */
    private $itemExpiredDate;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_EXPIRED_STATUS
    * @type int
    */
    private $itemExpiredStatus;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_DESCRIPTION
    * @type string
    */
    private $itemDescription;
    /**
    * @columnName INVENTORY_ITEMS_CREATED_DATE
    * @type int 
    * @jsonDate
    */
    private $itemDetailCreatedDate;
    /**
    * @columnName INVENTORY_ITEM_DEALER_ID
    * @type int
    * @searchable
    */
    private $dealerId;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_TOTAL_PRICE
    * @type int
    */
    private $itemDetailTotalPrice;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_EXT_1
    * @type int
    * @searchable
    */
    private $itemDetailExt1;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_EXT_2
    * @type string
    */
    private $itemDetailExt2;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_EXT_3
    * @type string
    */
    private $itemDetailExt3;
    /**
    * @columnName INVENTORY_ITEMS_DETAIL_EXT_4  
    * @type string
    */
    private $itemDetailExt4;
   
    
    
    
    private $itemList;
    private $dealer;
    private $itemDetailQuantity;
    private $itemColorName;
    private $itemColorHexCode;
    private $itemCategoryId;
    private $itemName;
    private $itemDetailImageList;
    private $itemDetailImageMap;
    private $itemBillPrice;
    private $itemGender;
    private $priceStartRange;
    private $priceEndRange;
    public function getPriceStartRange() {
        return $this->priceStartRange;
    }

    public function setPriceStartRange($priceStartRange) {
        $this->priceStartRange = $priceStartRange;
    }

    public function getPriceEndRange() {
        return $this->priceEndRange;
    }

    public function setPriceEndRange($priceEndRange) {
        $this->priceEndRange = $priceEndRange;
    }
    
    public function getItemGender() {
        return $this->itemGender;
    }

    public function setItemGender($itemGender) {
        $this->itemGender = $itemGender;
    }

    public function getItemBillPrice() {
        return $this->itemBillPrice;
    }

    public function setItemBillPrice($itemBillPrice) {
        $this->itemBillPrice = $itemBillPrice;
    }

    public function getItemDetailImageList() {
        return $this->itemDetailImageList;
    }

    public function setItemDetailImageList($itemDetailImageList) {
        $this->itemDetailImageList = $itemDetailImageList;
    }

    public function getItemDetailImageMap() {
        return $this->itemDetailImageMap;
    }

    public function setItemDetailImageMap($itemDetailImageMap) {
        $this->itemDetailImageMap = $itemDetailImageMap;
    }

        public function getItemName() {
        return $this->itemName;
    }

    public function setItemName($itemName) {
        $this->itemName = $itemName;
    }

    public function getItemCategoryId() {
        return $this->itemCategoryId;
    }

    public function setItemCategoryId($itemCategoryId) {
        $this->itemCategoryId = $itemCategoryId;
    }

    public function getItemColorHexCode() {
        return $this->itemColorHexCode;
    }

    public function setItemColorHexCode($itemColorHexCode) {
        $this->itemColorHexCode = $itemColorHexCode;
    }

    public function getItemColorName() {
        return $this->itemColorName;
    }

    public function setItemColorName($itemColorName) {
        $this->itemColorName = $itemColorName;
    }
    
    public function getItemDetailQuantity() {
        return $this->itemDetailQuantity;
    }

    public function setItemDetailQuantity($itemDetailQuantity) {
        $this->itemDetailQuantity = $itemDetailQuantity;
    }

    public function getItemDetailTotalPrice() {
        return $this->itemDetailTotalPrice;
    }

    public function getItemDetailExt1() {
        return $this->itemDetailExt1;
    }

    public function getItemDetailExt2() {
        return $this->itemDetailExt2;
    }

    public function getItemDetailExt3() {
        return $this->itemDetailExt3;
    }

    public function getItemDetailExt4() {
        return $this->itemDetailExt4;
    }

    public function setItemDetailTotalPrice($itemDetailTotalPrice) {
        $this->itemDetailTotalPrice = $itemDetailTotalPrice;
    }

    public function setItemDetailExt1($itemDetailExt1) {
        $this->itemDetailExt1 = $itemDetailExt1;
    }

    public function setItemDetailExt2($itemDetailExt2) {
        $this->itemDetailExt2 = $itemDetailExt2;
    }

    public function setItemDetailExt3($itemDetailExt3) {
        $this->itemDetailExt3 = $itemDetailExt3;
    }

    public function setItemDetailExt4($itemDetailExt4) {
        $this->itemDetailExt4 = $itemDetailExt4;
    }

    public function getDealer() {
        return $this->dealer;
    }

    public function setDealer($dealer) {
        $this->dealer = $dealer;
    }

    public function getItemQuantity() {
        return $this->itemQuantity;
    }

    public function setItemQuantity($itemQuantity) {
        $this->itemQuantity = $itemQuantity;
    }

    public function getItemDescription() {
        return $this->itemDescription;
    }

    public function setItemDescription($itemDescription) {
        $this->itemDescription = $itemDescription;
    }

    public function getItemSpecification() {
        return $this->itemSpecification;
    }

    public function setItemSpecification($itemSpecification) {
        $this->itemSpecification = $itemSpecification;
    }

    public function getItemDetailId() {
        return $this->itemDetailId;
    }

    public function setItemDetailId($itemDetailId) {
        $this->itemDetailId = $itemDetailId;
    }

    public function getItemIcimId() {
        return $this->itemIcimId;
    }

    public function setItemIcimId($itemIcimId) {
        $this->itemIcimId = $itemIcimId;
    }

    public function getItemOrderItemDetailId() {
        return $this->itemOrderItemDetailId;
    }

    public function setItemOrderItemDetailId($itemOrderItemDetailId) {
        $this->itemOrderItemDetailId = $itemOrderItemDetailId;
    }

    public function getDealerId() {
        return $this->dealerId;
    }

    public function setDealerId($dealerId) {
        $this->dealerId = $dealerId;
    }

    public function getItemDetailCreatedDate() {
        return $this->itemDetailCreatedDate;
    }

    public function setItemDetailCreatedDate($itemDetailCreatedDate) {
        $this->itemDetailCreatedDate = TUtilDate::getMilisecondsFromDate($itemDetailCreatedDate);
    }

    public function getWarrenty() {
        return $this->warrenty;
    }

    public function setWarrenty($warrenty) {
        $this->warrenty = $warrenty;
    }

    public function getItemExpiredDate() {
        return $this->itemExpiredDate;
    }

    public function setItemExpiredDate($itemExpiredDate) {
        $this->itemExpiredDate = TUtilDate::getMilisecondsFromDate($itemExpiredDate);
    }

    public function getItemExpiredStatus() {
        return $this->itemExpiredStatus;
    }

    public function setItemExpiredStatus($itemExpiredStatus) {
        $this->itemExpiredStatus = $itemExpiredStatus;
    }

    public function getItemTotalAmount() {
        return $this->itemTotalAmount;
    }

    public function setItemTotalAmount($itemTotalAmount) {
        $this->itemTotalAmount = $itemTotalAmount;
    }
    
    public function getItemList() {
        return $this->itemList;
    }

    public function setItemList($itemList) {
        $this->itemList = $itemList;
    }

    
    public function toJson($needtoreturnMap = false) {
        $map = new Map;
        if($this->getItemExpiredDate()!="")
        $map->put("itemExpiredDate", $this->getItemExpiredDate());
        if($this->getItemName()!="")
        $map->put("itemName", $this->getItemName());
        if($this->getItemExpiredStatus()!="")
        $map->put("itemExpiredStatus", $this->getItemExpiredStatus());
        if($this->getItemOrderItemDetailId()!="")
        $map->put("itemOrderItemDetailId", $this->getItemOrderItemDetailId());
        if($this->getWarrenty()!="")
        $map->put("warrenty", $this->getWarrenty());
        if ($this->getItemQuantity() != "")
        $map->put("itemQuantity", $this->getItemQuantity());
        if ($this->getItemSpecification() != "")
        $map->put("itemSpecification", $this->getItemSpecification());
        if ($this->getItemDescription() != "")
        $map->put("itemDescription", $this->getItemDescription());
        if ($this->getItemTotalAmount() != "")
        $map->put("itemTotalAmount", $this->getItemTotalAmount());
         if ($this->getItemDetailId() != "")
        $map->put("itemDetailId", $this->getItemDetailId());
        if ($this->getItemIcimId() != "")
        $map->put("itemIcimId", $this->getItemIcimId()); 
        if ($this->getDealerId() != "")
        $map->put("dealerId", $this->getDealerId());
        if ($this->getItemDetailCreatedDate() != "")
        $map->put("itemDetailCreatedDate", $this->getItemDetailCreatedDate());
        if ($this->getDealer() != "")
        $map->put("dealer", $this->getDealer()); 
        
        if ($this->getItemDetailTotalPrice() != "")
        $map->put("itemTotalPrice",$this->getItemDetailTotalPrice()); 

        if ($this->getItemDetailTotalPrice() != "")
        $map->put("itemDetailTotalPrice",$this->getItemDetailTotalPrice()); 
        
        if ($this->getItemDetailQuantity() != "")
        $map->put("itemDetailQuantity",$this->getItemDetailQuantity()); 
        
        if ($this->getItemDetailExt1() != "")
        $map->put("itemDetailExt1", $this->getItemDetailExt1()); 
        
        if ($this->getItemDetailExt2() != "")
        $map->put("itemDetailExt2", $this->getItemDetailExt2()); 
        
        if ($this->getItemDetailExt3() != "")
        $map->put("itemDetailExt3", $this->getItemDetailExt3()); 
        
        if ($this->getItemDetailExt4() != "")
        $map->put("itemDetailExt4", $this->getItemDetailExt4()); 
         if ($this->getItemColorName() != "")
        $map->put("itemColorName", $this->getItemColorName()); 
         
          if ($this->getItemColorHexCode() != "")
        $map->put("itemColorHexCode", $this->getItemColorHexCode());  
        if ($this->getItemCategoryId() != "")
        $map->put("itemCategoryId", $this->getItemCategoryId());
        if ($this->getItemBillPrice() != "")
        $map->put("itemBillPrice",$this->getItemBillPrice());
        if ($this->getItemGender() != "")
        $map->put("itemGender",$this->getItemGender());
        if($this->getItemDetailImageList() != "")
            $map->put("itemDetailImageList", $this->getItemDetailImageList());
            $map->put("itemList", $this->getItemList());
        return ($needtoreturnMap) ? $map : $map->toJson();
    }
    
    
    
     public function addItemToItemList(\ExtendedItems $item){
        if($this->itemList==null){
            $this->itemList=new SimpleList();
        }
        $this->itemList->add($item);
    }  
    
    
    
    
}

?>
