/*******************************************************
** File: productDefiningAttributeSelection.js
**
** Author: Francis Booth
** Date: August 22, 2008
**
** Purpose: 
**
**
*******************************************************/

/*******************************************************
** Item
** - methods
** + getItemId
** + setItemId
** + getShortDescription
** + setShortDescription
** + getLongDescription
** + setLongDescription
** + getFullImage
** + setFullImage
** + getThumbNail
** + setThumbNail
** + getListPrice
** + setListPrice
** + getListPriceFormatted
** + setListPriceFormatted
** + getCalculatedContractPrice
** + setCalculatedContractPrice
** + getCalculatedContractPriceFormatted
** + setCalculatedContractPriceFormatted
** + getDefiningAttributes
** + setDefiningAttributes
** + addDefiningAttribute
** + getDefiningAttributeByDefiningAttributeId
**
*******************************************************/
function Item(_itemId){
	
	if(_itemId == 0){
		_itemId = -1;
	}
	
	/* Properties */
	this.itemId = _itemId;
	this.shortDescription = '';
	this.longDescription = '';
	this.fullImage = '';
	this.thumbNail = '';
	this.listPrice = 0;
	this.listPriceFormatted = '';
	this.calculatedContractPrice = 0;
	this.calculatedContractPriceFormatted = '';
	this.definingAttributes = new Hashtable();
	this.inventoryStatus  = 'AVL';
	this.inventoryStatusMessage = '';
	
	/* Methods */
	this.getItemId = getItemId;
	this.setItemId = setItemId;
	this.getShortDescription = getShortDescription;
	this.setShortDescription = setShortDescription;
	this.getLongDescription = getLongDescription;
	this.setLongDescription = setLongDescription;
	this.getFullImage = getFullImage;
	this.setFullImage = setFullImage;
	this.getThumbNail = getThumbNail;
	this.setThumbNail = setThumbNail;
	this.getListPrice = getListPrice;
	this.setListPrice = setListPrice;
	this.getListPriceFormatted = getListPriceFormatted;
	this.setListPriceFormatted = setListPriceFormatted;
	this.getCalculatedContractPrice = getCalculatedContractPrice;
	this.setCalculatedContractPrice = setCalculatedContractPrice;
	this.getCalculatedContractPriceFormatted = getCalculatedContractPriceFormatted;
	this.setCalculatedContractPriceFormatted = setCalculatedContractPriceFormatted;
	this.getDefiningAttributes = getDefiningAttributes;
	this.setDefiningAttributes = setDefiningAttributes;
	this.addDefiningAttribute = addDefiningAttribute;
	this.getDefiningAttributeByDefiningAttributeId = getDefiningAttributeByDefiningAttributeId;
	this.getInventoryStatus = getInventoryStatus;
	this.setInventoryStatus = setInventoryStatus;
	this.getInventoryStatusMessage = getInventoryStatusMessage;
	this.setInventoryStatusMessage = setInventoryStatusMessage;
}
// getId
function getItemId(){
	return this.itemId;
}
// setId
function setItemId(_itemId){
	this.itemId = _itemId;
}
// getShortDescription
function getShortDescription(){
	return this.shortDescription;
}
// setShortDescription
function setShortDescription(_shortDescription){
	this.shortDescription = _shortDescription;
}
// getLongDescription
function getLongDescription(){
	return this.longDescription;
}
// setLongDescription
function setLongDescription(_longDescription){
	this.longDescription = _longDescription;
}
// getFullImage
function getFullImage(){
	return this.fullImage;
}
// setFullImage
function setFullImage(_fullImage){
	this.fullImage = _fullImage;
}
// getThumbNail
function getThumbNail(){
	return this.thumbNail;
}
// setThumbNail
function setThumbNail(_thumbNail){
	this.thumbNail = _thumbNail;
}
// getListPrice
function getListPrice(){
	return this.listPrice;
}
// setListPrice
function setListPrice(_listPrice){
	this.listPrice = _listPrice;
}
// getListPriceFormatted
function getListPriceFormatted(){
	return this.listPriceFormatted;
}
// setListPriceFormatted
function setListPriceFormatted(_listPriceFormatted){
	this.listPriceFormatted = _listPriceFormatted;
}

// getCalculatedContractPrice
function getCalculatedContractPrice(){
	return this.calculatedContractPrice;
}
// setCalculatedContractPrice
function setCalculatedContractPrice(_calculatedContractPrice){
	this.calculatedContractPrice = _calculatedContractPrice;
}
// getCalculatedContractPriceFormatted
function getCalculatedContractPriceFormatted(){
	return this.calculatedContractPriceFormatted;
}
// setCalculatedContractPriceFormatted
function setCalculatedContractPriceFormatted(_calculatedContractPriceFormatted){
	this.calculatedContractPriceFormatted = _calculatedContractPriceFormatted;
}

// getDefiningAttributes
function getDefiningAttributes(){
	return this.definingAttributes;
}
// setDefiningAttributes
function setDefiningAttributes(_definingAttributes){
	this.definingAttributes = _definingAttributes;
}
// setDefiningAttribute
function addDefiningAttribute(_definingAttribute){
	this.definingAttributes.put(_definingAttribute.getAttributeId(), _definingAttribute);
}
// getDefiningAttributeByDefiningAttributeId
function getDefiningAttributeByDefiningAttributeId(_definingAttributeIdKey){
	var _definingAttributeObj = null;
	if(this.definingAttributes.containsKey(_definingAttributeIdKey)){
		_definingAttributeObj = this.definingAttributes.get(_definingAttributeIdKey);
	}
	return _definingAttributeObj;
}

//getInventoryStatus
function getInventoryStatus(){
	return this.inventoryStatus;
}
//setInventoryStatus
function setInventoryStatus(_inventoryStatus){
	this.inventoryStatus = _inventoryStatus;
}
//getInventoryStatusMessage()
function getInventoryStatusMessage(){
	return this.inventoryStatusMessage;
}
//setInventoryStatusMessage()
function setInventoryStatusMessage(_inventoryStatusMessage){
	this.inventoryStatusMessage = _inventoryStatusMessage;
}

/*******************************************************
** DefiningAttribute
**
** - methods
** + getAttributeId
** + setAttributeId
** + getAttributeName
** + setAttributeName
** + getCatEntryId
** + setCatEntryId
** + getSequenceNumber
** + setSequenceNumber
** + getDefiningAttributeValueVector
** + setDefiningAttributeValueVector
** + addDefiningAttributeValue
**
*******************************************************/
function DefiningAttribute(_attributeId){

	/* Properties */
	this.attributeId = _attributeId;
	this.attributeName = '';
	this.catEntryId = '';
	this.sequenceNumber = 0;
	this.attributeValueVector = new Vector(1);
	
	/* Methods */
	this.getAttributeId = getAttributeId;
	this.setAttributeId = setAttributeId;
	this.getAttributeName = getAttributeName;
	this.setAttributeName = setAttributeName;
	this.getCatEntryId = getCatEntryId;
	this.setCatEntryId = setCatEntryId;
	this.getSequenceNumber = getSequenceNumber;
	this.setSequenceNumber = setSequenceNumber;
	this.getDefiningAttributeValueVector = getDefiningAttributeValueVector;
	this.setDefiningAttributeValueHashtable = setDefiningAttributeValueVector;
	this.addDefiningAttributeValue = addDefiningAttributeValue;
}
//getAttributeId
function getAttributeId(){
	return this.attributeId;
}
//setAttributeId
function setAttributeId(_attributeId){
	this.attributeId = _attributeId;
}
//getName
function getAttributeName(){
	return this.attributeName;
}
//setName
function setAttributeName(_attributeName){
	this.attributeName = _attributeName;
}
//getCatEntryId
function getCatEntryId(){
	return this.catEntryId;
}
//setCatEntryId
function setCatEntryId(_catEntryId){
	this.catEntryId = _catEntryId;
}
//getSequenceNumber
function getSequenceNumber(){
	return this.sequenceNumber;
}
//setSequenceNumber
function setSequenceNumber(_sequenceNumber){
	this.sequenceNumber = _sequenceNumber;
}
//getDefiningAttributeValueVector
function getDefiningAttributeValueVector(){
	return this.attributeValueVector;
}
//setDefiningAttributeValueVector
function setDefiningAttributeValueVector(_attributeValueVector){
	this.attributeValueVector = _attributeValueVector;
}
//addDefiningAttributeValue
function addDefiningAttributeValue(_attributeValue){
	this.attributeValueVector.addElement(_attributeValue);
}

/*******************************************************
** DefiningAttributeValue
**
** - methods
** + getDefiningAttributeValueId
** + setDefiningAttributeValueId
** + getDefiningAttributeValueName
** + setDefiningAttributeValueName
** + getValues
** + setValues
** + addValue
**
*******************************************************/
function DefiningAttributeValue(_attributeValueId){
	/* Properties */
	this.attributeValueId = _attributeValueId;
	this.attributeValueName = '';
	this.valuesVector = new Vector(1);
	
	/* Methods */
	this.getDefiningAttributeValueId = getDefiningAttributeValueId;
	this.setDefiningAttributeValueId = setDefiningAttributeValueId;
	this.getDefiningAttributeValueName = getDefiningAttributeValueName;
	this.setDefiningAttributeValueName = setDefiningAttributeValueName;
	this.getValues = getValues;
	this.setValues = setValues;
	this.addValue = addValue;
}

//getAttributeValueId
function getDefiningAttributeValueId(){
	return this.getAttributeValueId;
}
//setAttributeValueId
function setDefiningAttributeValueId(_attributeValueId){
	this.getAttributeValueId = _attributeValueId;
}
//getAttributeValueName
function getDefiningAttributeValueName(){
	return this.attributeValueName;
}
//setAttributeValueName
function setDefiningAttributeValueName(_attributeValueName){
	this.attributeValueName = _attributeValueName;
}
//getValues
function getValues(){
	return this.valuesVector;
}
//setValues
function setValues(_valueVector){
	this.valuesVector = _value;
}
//addAttributeValue
function addValue(_value){
	this.valuesVector.addElement(_value);
}