org.opensubsystems.inventory.data
Class Item

java.lang.Object
  extended by org.opensubsystems.core.data.DataObject
      extended by org.opensubsystems.core.data.BasicDataObject
          extended by org.opensubsystems.core.data.ModifiableDataObject
              extended by org.opensubsystems.inventory.data.Item
All Implemented Interfaces:
java.io.Serializable

public class Item
extends org.opensubsystems.core.data.ModifiableDataObject

Item represents group/class of items in the inventory. It is not a specific unit (e.g. uniquely identified by its serial number or other identification) but a generalization of all similar units. Item is for example a Black&Decker drill type 295 while the specific unit would be Black&Decker drill type 295 costing $5 and supplied on 08/11/2003 with serial number 1234.

Version:
$Id: Item.java,v 1.10 2007/01/07 06:14:30 bastafidli Exp $
Author:
Martin Cerba
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.5 2006/02/24 06:02:57 bastafidli

Field Summary
static int[] ALL_ITEM_COLUMNS
          Static variable for array of all columns codes.
static int COL_ITEM_AVAILABLE_COUNT
          Code for table column.
static int COL_ITEM_AVERAGE_COST
          Code for table column.
static int COL_ITEM_CREATION_DATE
          Code for table column.
static int COL_ITEM_DESCRIPTION
          Code for table column.
static int COL_ITEM_DISPLAY_ORDER
          Code for table column.
static int COL_ITEM_DOMAIN_ID
          Code for table column.
static int COL_ITEM_EXPENSE_TYPE
          Code for table column.
static int COL_ITEM_ID
          Code for table column.
static int COL_ITEM_INVENTORY_ID
          Code for table column.
static int COL_ITEM_LAST_RECOUNT_TIMESTAMP
          Code for table column.
static int COL_ITEM_MINIMAL_AVAILABLE_COUNT
          Code for table column.
static int COL_ITEM_MODIFICATION_DATE
          Code for table column.
static int COL_ITEM_NAME
          Code for table column.
static java.lang.Integer COL_ITEM_NAME_OBJ
          Code for table column.
static int COL_ITEM_NAME_STEM
          Code for table column.
static int COL_ITEM_ON_HOLD_COUNT
          Code for table column.
static int COL_ITEM_PERMANENTLY_ASSIGNED
          Code for table column.
static int COL_ITEM_POPULARITY_RANK
          Code for table column.
static int COL_ITEM_PRICE
          Code for table column.
static int COL_ITEM_REUSABLE
          Code for table column.
static int COL_ITEM_SHIPPED_COUNT
          Code for table column.
static int COL_ITEM_SIZE
          Code for table column.
static int COL_ITEM_UNIQUELY_TRACKED
          Code for table column.
static int COL_ITEM_UNIT_OF_MEASURE
          Code for table column.
static int[] DEFAULT_LIST_COLUMNS
          Default columns to retrieve when asked for list of objects.
static int[] DEFAULT_LIST_SORT_COLUMNS
          Default columns to sort by when asked for list of objects.
static java.lang.String[] DEFAULT_LIST_SORT_ORDER
          Default order in which the columns will be sorted.
static int[] INVENTORY_SCREEN_COLUMNS
          Columns needed in Inventory screen.
static int ITEM_BY_CATEGORY
          Code for items by category.
static java.lang.Integer ITEM_BY_CATEGORY_OBJ
          Code for items by category.
protected  boolean m_bPermanentlyAssigned
          This flag tells us if this item is by default assigned permanently (we don't expect it to be returned back to inventory in some time interval and therefore it is not declared missing after that time interval expires.
protected  boolean m_bReusable
          Item can be either reusable or if it is not then it is consumable and doesn't have to be returned after it is issued.
protected  boolean m_bUniquelyTracked
          If true then this item is tracked uniquely by serial numbers or other unique numbers (identificatio in general), if false, then it is tracked just by quantity.
protected  double m_dAverageCost
          This is average cost of items in the inventory.
protected  double m_dPrice
          Price for the items in the inventory.
protected  int m_iAvailableCount
          How many pieces of this item are physically present in the inventory.
protected  int m_iDisplayOrder
          User has requirement to display items in some particular order, such as drill 1 1/2", drill 1", drill 1/2", drill 3/4" and drill 3/8" should be displayed as drill 3/8", drill 1/2", drill 3/4", drill 1" and drill 1 1/2".
protected  int m_iExpenseType
          What type of expense this item represents.
protected  int m_iInventoryId
          Id of the inventory this item belongs to.
protected  int m_iMinimalAvailableCount
          What should be the minimal quantity of these items in stock.
protected  int m_iOnHoldCount
          How many pieces of this item are reserved (that means they were ordered but they were not issued yet).
protected  int m_iPopularityRank
          How popular is this item.
protected  int m_iShippedCount
          How many pieces of this item were shipped to the inventory.
protected  int m_iUnitOfMeasure
          Unit in which the item is measured (gallon, pound, piece).
protected  java.sql.Timestamp m_lastRecountTimestamp
          The inventory count is not kept in perfect order.
protected  java.lang.String m_strDescription
          Description of the item.
protected  java.lang.String m_strName
          Name of the item.
protected  java.lang.String m_strNameStem
          The part of the name which doesn't contain the size information and therefore it is the same for all items of the same type even if they have different sizes.
protected  java.lang.String m_strSize
          The size information the way a user entered it.
protected static int s_iDescriptionMaxLength
          Maximal length of item description in chars
protected static int s_iNameMaxLength
          Maximal length of item name in chars
protected static int s_iNameStemMaxLength
          Maximal length of item name stem in chars
protected static int s_iSizeMaxLength
          Maximal length of item size in chars
static int[] UPDATE_ITEMTYPE_COLUMNS
          Static variable for array of item attribute codes used when updating items.
 
Fields inherited from class org.opensubsystems.core.data.ModifiableDataObject
m_modificationTimestamp
 
Fields inherited from class org.opensubsystems.core.data.BasicDataObject
m_creationTimestamp, m_iDomainId
 
Fields inherited from class org.opensubsystems.core.data.DataObject
NEW_ID, NEW_ID_OBJ, NEW_ID_STR
 
Constructor Summary
Item()
          Default constructor.
Item(int iDomainId)
          Empty item for a specified domain initialized to default parameters
Item(int iId, int iDomainId, int iInventoryId, java.lang.String strName, java.lang.String strDescription, int iUnitOfMeasure, boolean bReusable, int iExpenseType, int iAvailableCount, int iOnHoldCount, int iPopularityRank, int iShippedCount, boolean bUniquelyTracked, int iMinimalAvailableCount, boolean bPermanentlyAssigned, double dAverageCost, double dPrice, int iDisplayOrder, java.lang.String strNameStem, java.lang.String strSize, java.sql.Timestamp lastRecountTimestamp, java.sql.Timestamp creationDate, java.sql.Timestamp modificationDate)
          Full constructor.
Item(int iDomainId, int iInventoryId, java.lang.String strName, java.lang.String strDescription, int iAvailableCount)
          Basic constructor.
Item(Item data, boolean copyId)
          Copy constructor.
Item(Item original, Item update)
          Kind of copy constructor.
 
Method Summary
 int getAvailableCount()
           
 double getAverageCost()
           
 java.lang.String getDescription()
           
static int getDescriptionMaxLengthStatic()
          Get description max length in chars.
 int getDisplayOrder()
           
 int getExpenseType()
           
 int getInventoryId()
           
 java.sql.Timestamp getLastRecountTimestamp()
           
 int getMinimalAvailableCount()
           
 java.lang.String getName()
           
static int getNameMaxLengthStatic()
          Get name max length in chars.
 java.lang.String getNameStem()
           
static int getNameStemMaxLengthStatic()
          Get name stem max length in chars.
 int getOnHoldCount()
           
 int getOutCount()
           
 int getPopularityRank()
           
 double getPrice()
           
 int getShippedCount()
           
 java.lang.String getSize()
           
static int getSizeMaxLengthStatic()
          Get size stem max length in chars.
 int getUnitOfMeasure()
           
 boolean isPermanentlyAssigned()
           
 boolean isReusable()
           
 boolean isSame(java.lang.Object oObject)
          
 boolean isUniquelyTracked()
           
 void setAvailableCount(int iAvailableCount)
           
 void setAverageCost(double dAverageCost)
           
 void setDescription(java.lang.String strDescription)
           
static void setDescriptionMaxLength(int iNewDescriptionMaxLength)
          Set static name max length parameter.
 void setDisplayOrder(int iDisplayOrder)
           
 void setInventoryId(int iInventoryId)
           
 void setName(java.lang.String strName)
           
static void setNameMaxLength(int iNewNameMaxLength)
          Set static name max length parameter.
 void setNameStem(java.lang.String strNameStem)
           
static void setNameStemMaxLength(int iNewNameStemMaxLength)
          Set static name stem max length parameter.
 void setPrice(double dPrice)
           
 void setReusable(boolean bReusable)
           
 void setShippedCount(int iShippedCount)
           
static void setSizeMaxLength(int iNewSizeMaxLength)
          Set static size max length parameter.
 void setUniquelyTracked(boolean bUniquelyTracked)
           
 
Methods inherited from class org.opensubsystems.core.data.ModifiableDataObject
equals, getModificationTimestamp, hashCode, restore, setModificationTimestamp
 
Methods inherited from class org.opensubsystems.core.data.BasicDataObject
getCreationTimestamp, getDomainId, getId, getIdAsObject, restore, setCreationTimestamp, setId
 
Methods inherited from class org.opensubsystems.core.data.DataObject
isFromPersistenceStore, setFromPersistenceStore
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COL_ITEM_ID

public static final int COL_ITEM_ID
Code for table column.

See Also:
Constant Field Values

COL_ITEM_DOMAIN_ID

public static final int COL_ITEM_DOMAIN_ID
Code for table column.

See Also:
Constant Field Values

COL_ITEM_INVENTORY_ID

public static final int COL_ITEM_INVENTORY_ID
Code for table column.

See Also:
Constant Field Values

COL_ITEM_NAME

public static final int COL_ITEM_NAME
Code for table column.

See Also:
Constant Field Values

COL_ITEM_NAME_OBJ

public static final java.lang.Integer COL_ITEM_NAME_OBJ
Code for table column.


COL_ITEM_DESCRIPTION

public static final int COL_ITEM_DESCRIPTION
Code for table column.

See Also:
Constant Field Values

COL_ITEM_UNIT_OF_MEASURE

public static final int COL_ITEM_UNIT_OF_MEASURE
Code for table column.

See Also:
Constant Field Values

COL_ITEM_REUSABLE

public static final int COL_ITEM_REUSABLE
Code for table column.

See Also:
Constant Field Values

COL_ITEM_EXPENSE_TYPE

public static final int COL_ITEM_EXPENSE_TYPE
Code for table column.

See Also:
Constant Field Values

COL_ITEM_AVAILABLE_COUNT

public static final int COL_ITEM_AVAILABLE_COUNT
Code for table column.

See Also:
Constant Field Values

COL_ITEM_ON_HOLD_COUNT

public static final int COL_ITEM_ON_HOLD_COUNT
Code for table column.

See Also:
Constant Field Values

COL_ITEM_POPULARITY_RANK

public static final int COL_ITEM_POPULARITY_RANK
Code for table column.

See Also:
Constant Field Values

COL_ITEM_SHIPPED_COUNT

public static final int COL_ITEM_SHIPPED_COUNT
Code for table column.

See Also:
Constant Field Values

COL_ITEM_UNIQUELY_TRACKED

public static final int COL_ITEM_UNIQUELY_TRACKED
Code for table column.

See Also:
Constant Field Values

COL_ITEM_MINIMAL_AVAILABLE_COUNT

public static final int COL_ITEM_MINIMAL_AVAILABLE_COUNT
Code for table column.

See Also:
Constant Field Values

COL_ITEM_PERMANENTLY_ASSIGNED

public static final int COL_ITEM_PERMANENTLY_ASSIGNED
Code for table column.

See Also:
Constant Field Values

COL_ITEM_AVERAGE_COST

public static final int COL_ITEM_AVERAGE_COST
Code for table column.

See Also:
Constant Field Values

COL_ITEM_PRICE

public static final int COL_ITEM_PRICE
Code for table column.

See Also:
Constant Field Values

COL_ITEM_DISPLAY_ORDER

public static final int COL_ITEM_DISPLAY_ORDER
Code for table column.

See Also:
Constant Field Values

COL_ITEM_NAME_STEM

public static final int COL_ITEM_NAME_STEM
Code for table column.

See Also:
Constant Field Values

COL_ITEM_SIZE

public static final int COL_ITEM_SIZE
Code for table column.

See Also:
Constant Field Values

COL_ITEM_LAST_RECOUNT_TIMESTAMP

public static final int COL_ITEM_LAST_RECOUNT_TIMESTAMP
Code for table column.

See Also:
Constant Field Values

COL_ITEM_CREATION_DATE

public static final int COL_ITEM_CREATION_DATE
Code for table column.

See Also:
Constant Field Values

COL_ITEM_MODIFICATION_DATE

public static final int COL_ITEM_MODIFICATION_DATE
Code for table column.

See Also:
Constant Field Values

ITEM_BY_CATEGORY

public static final int ITEM_BY_CATEGORY
Code for items by category.

See Also:
Constant Field Values

ITEM_BY_CATEGORY_OBJ

public static final java.lang.Integer ITEM_BY_CATEGORY_OBJ
Code for items by category.


ALL_ITEM_COLUMNS

public static final int[] ALL_ITEM_COLUMNS
Static variable for array of all columns codes. The order is important since it is used to retrieve all data from the persistence store efficiently so do not modify it unless you make changes to other places as well.


UPDATE_ITEMTYPE_COLUMNS

public static final int[] UPDATE_ITEMTYPE_COLUMNS
Static variable for array of item attribute codes used when updating items. The order is important since it is used to specify all data for the persistence store efficiently so do not modify it unless you make changes to other places as well.


DEFAULT_LIST_COLUMNS

public static final int[] DEFAULT_LIST_COLUMNS
Default columns to retrieve when asked for list of objects. These should be only columns visible to user on the screen and not any internal columns. Also the columns should be retrievable efficiently so that the default view is very quick.


DEFAULT_LIST_SORT_COLUMNS

public static final int[] DEFAULT_LIST_SORT_COLUMNS
Default columns to sort by when asked for list of objects.


DEFAULT_LIST_SORT_ORDER

public static final java.lang.String[] DEFAULT_LIST_SORT_ORDER
Default order in which the columns will be sorted.


INVENTORY_SCREEN_COLUMNS

public static final int[] INVENTORY_SCREEN_COLUMNS
Columns needed in Inventory screen. TODO: For Miro: This may not belong here and if it is screen specific it should be define at the place where screen uses it


s_iNameMaxLength

protected static int s_iNameMaxLength
Maximal length of item name in chars


s_iDescriptionMaxLength

protected static int s_iDescriptionMaxLength
Maximal length of item description in chars


s_iNameStemMaxLength

protected static int s_iNameStemMaxLength
Maximal length of item name stem in chars


s_iSizeMaxLength

protected static int s_iSizeMaxLength
Maximal length of item size in chars


m_iInventoryId

protected int m_iInventoryId
Id of the inventory this item belongs to.


m_strName

protected java.lang.String m_strName
Name of the item. This is the name, which user entered to use to identify the item. If no name was entered the name will be derived from Name stem and Size.


m_strDescription

protected java.lang.String m_strDescription
Description of the item.


m_iUnitOfMeasure

protected int m_iUnitOfMeasure
Unit in which the item is measured (gallon, pound, piece). TODO: Improve: We need to define or document either constants or references to where list of available measurements units can get from.


m_bReusable

protected boolean m_bReusable
Item can be either reusable or if it is not then it is consumable and doesn't have to be returned after it is issued.


m_iExpenseType

protected int m_iExpenseType
What type of expense this item represents. TODO: Improve: We need to define or document either constants or references to where list of available measurements units can get from.


m_iAvailableCount

protected int m_iAvailableCount
How many pieces of this item are physically present in the inventory. If you want to find out how many items can be ordered you have to subtract the on hold count from this number. This is cached value and it is a sum of all available counts of units. This value can be negative in case we have issued more items than what items we had available (e.g. in case the inventory status was inaccurate) since the value in available count for "found holder" unit can be negative (therefore also sum can be negative).


m_iOnHoldCount

protected int m_iOnHoldCount
How many pieces of this item are reserved (that means they were ordered but they were not issued yet). If you want to find out how many items can be ordered you have to subtract the on hold count from available count.


m_iPopularityRank

protected int m_iPopularityRank
How popular is this item. TODO: Improve: This is not used for now and has not much meaning since it is not clear if this is absolute popularity rank or rank within category, etc.


m_iShippedCount

protected int m_iShippedCount
How many pieces of this item were shipped to the inventory. This is how many items should be in the inventory if the count is accurate and if everybody returns their reusable items. Initially this should be equal to the available count. This is cached value and it is sum of all shipped counts of units.


m_bUniquelyTracked

protected boolean m_bUniquelyTracked
If true then this item is tracked uniquely by serial numbers or other unique numbers (identificatio in general), if false, then it is tracked just by quantity. Even unique items can be ordered and issued without specifying serial numbers so this is just a hint that a serial numbers (or other unique identification can be specified).


m_iMinimalAvailableCount

protected int m_iMinimalAvailableCount
What should be the minimal quantity of these items in stock. If the available count fails below this amount we should display some warning.


m_bPermanentlyAssigned

protected boolean m_bPermanentlyAssigned
This flag tells us if this item is by default assigned permanently (we don't expect it to be returned back to inventory in some time interval and therefore it is not declared missing after that time interval expires.


m_dAverageCost

protected double m_dAverageCost
This is average cost of items in the inventory. It is updated every time new items are added to the inventory (when shipped_count of inventory items is changed). The average for reusable items is computed as sum(shipped_count * cost) / sum(shipped_count) since we always have sum(shipped_count) in the inventory. The average for nonreusable items is sum(available_count * cost) / sum(available_count) since we only have available items in the inventory.


m_dPrice

protected double m_dPrice
Price for the items in the inventory. The same price applies to all items. TODO: Feature: Allow to override this price per unit or identification so this would be default price for units which do not have price specified in other way.


m_iDisplayOrder

protected int m_iDisplayOrder
User has requirement to display items in some particular order, such as drill 1 1/2", drill 1", drill 1/2", drill 3/4" and drill 3/8" should be displayed as drill 3/8", drill 1/2", drill 3/4", drill 1" and drill 1 1/2". This field will be used to store some numeric value based on which the item types should be sorted. They will be displayed sorted according to Name Stem and if it is the same (which will be the same for the same items of different sizes) Display Order.


m_strNameStem

protected java.lang.String m_strNameStem
The part of the name which doesn't contain the size information and therefore it is the same for all items of the same type even if they have different sizes. This will be used in sorting. Items will be displayed sorted according to Name Stem and if it is the same (which will be the same for the same items of different sizes) Display Order.


m_strSize

protected java.lang.String m_strSize
The size information the way a user entered it. From the size information display order will be derived.


m_lastRecountTimestamp

protected java.sql.Timestamp m_lastRecountTimestamp
The inventory count is not kept in perfect order. Sometimes the users just put items to the inventory without entering the data into computer. Without entering the data we have not way to know what is the exact count in stock. Therefore from time to time user may need to recount the inventory. Here we will keep track of when it was last time counted.

Constructor Detail

Item

public Item()
Default constructor.


Item

public Item(int iDomainId)
Empty item for a specified domain initialized to default parameters

Parameters:
iDomainId - - Id of the domain this item belongs to

Item

public Item(int iDomainId,
            int iInventoryId,
            java.lang.String strName,
            java.lang.String strDescription,
            int iAvailableCount)
Basic constructor.

Parameters:
iDomainId - - domain this item belongs to
iInventoryId - - inventory this item belongs to
strName - - name to display for this item
strDescription - - description of this item
iAvailableCount - - initial count for all inventory items of this type. This value is also used as initial value for shipped count.

Item

public Item(Item data,
            boolean copyId)
Copy constructor.

Parameters:
data - - item to use to initialize values
copyId - - if true then id of the item will be copied as well if false then the id will be initialized to a new id

Item

public Item(Item original,
            Item update)
Kind of copy constructor. Create new object from the original and update counts from the updated object.

Parameters:
original - - original item to take main characteristics from
update - - update item to use to initialize counts

Item

public Item(int iId,
            int iDomainId,
            int iInventoryId,
            java.lang.String strName,
            java.lang.String strDescription,
            int iUnitOfMeasure,
            boolean bReusable,
            int iExpenseType,
            int iAvailableCount,
            int iOnHoldCount,
            int iPopularityRank,
            int iShippedCount,
            boolean bUniquelyTracked,
            int iMinimalAvailableCount,
            boolean bPermanentlyAssigned,
            double dAverageCost,
            double dPrice,
            int iDisplayOrder,
            java.lang.String strNameStem,
            java.lang.String strSize,
            java.sql.Timestamp lastRecountTimestamp,
            java.sql.Timestamp creationDate,
            java.sql.Timestamp modificationDate)
Full constructor.

Parameters:
iId - - unique id of this item
iDomainId - - id of domain this item belongs to
iInventoryId - - id of inventory this item belongs to
strName - - name of the item
strDescription - - description of the item
iUnitOfMeasure - - unit of measure constant
bReusable - - flag if item is reusable
iExpenseType - - expense type constant
iAvailableCount - - count of available items of this type
iOnHoldCount - - on hold count for this item
iPopularityRank - - popularity rank value
iShippedCount - - count of shiped item of this type
bUniquelyTracked - - flag if the items are uniquely tracked by some unique identification
iMinimalAvailableCount - - minimal available count which should be in stock
bPermanentlyAssigned - - should this item be by default permanently assigned
dAverageCost - - what is the average cost of units for this item
dPrice - - price for this item
iDisplayOrder - - display order used together with the name stem to sort the items
strNameStem - - the part of the name which is the same for all the same items of different sizes
strSize - - size of the items (hopefully in form "whole part quotient/divider"
lastRecountTimestamp - - time when the items were last counted
creationDate - - date of record creation for this item
modificationDate - - last modification date for this item
Method Detail

getAvailableCount

public int getAvailableCount()
Returns:
int - count of available items of this type

getDescription

public java.lang.String getDescription()
Returns:
String - description of the item

getExpenseType

public int getExpenseType()
Returns:
int - expense type constant

getName

public java.lang.String getName()
Returns:
String - name of the item

getOnHoldCount

public int getOnHoldCount()
Returns:
int - on hold count for this item

getPopularityRank

public int getPopularityRank()
Returns:
int - popularity rank value

isReusable

public boolean isReusable()
Returns:
boolean - flag if item is reusable

getUnitOfMeasure

public int getUnitOfMeasure()
Returns:
int - unit of measure constant

setDescriptionMaxLength

public static void setDescriptionMaxLength(int iNewDescriptionMaxLength)
Set static name max length parameter. It is used by database layer to adjust this parameter based on database capabilities.

Parameters:
iNewDescriptionMaxLength - - new name max length

setNameMaxLength

public static void setNameMaxLength(int iNewNameMaxLength)
Set static name max length parameter. It is used by database layer to adjust this parameter based on database capabilities.

Parameters:
iNewNameMaxLength - - new name max length

setNameStemMaxLength

public static void setNameStemMaxLength(int iNewNameStemMaxLength)
Set static name stem max length parameter. It is used by database layer to adjust this parameter based on database capabilities.

Parameters:
iNewNameStemMaxLength - - new name stem max length

setSizeMaxLength

public static void setSizeMaxLength(int iNewSizeMaxLength)
Set static size max length parameter. It is used by database layer to adjust this parameter based on database capabilities.

Parameters:
iNewSizeMaxLength - - new size max length

getInventoryId

public int getInventoryId()
Returns:
int - id of inventory this item belongs to

setInventoryId

public void setInventoryId(int iInventoryId)
Parameters:
iInventoryId - - Id of inventory where this item belongs

getShippedCount

public int getShippedCount()
Returns:
int - count of shiped item of this type

getOutCount

public int getOutCount()
Returns:
int - shiped count without available count

getNameMaxLengthStatic

public static int getNameMaxLengthStatic()
Get name max length in chars.

Returns:
int

getDescriptionMaxLengthStatic

public static int getDescriptionMaxLengthStatic()
Get description max length in chars.

Returns:
int

getNameStemMaxLengthStatic

public static int getNameStemMaxLengthStatic()
Get name stem max length in chars.

Returns:
int

getSizeMaxLengthStatic

public static int getSizeMaxLengthStatic()
Get size stem max length in chars.

Returns:
int

isPermanentlyAssigned

public boolean isPermanentlyAssigned()
Returns:
boolean - should this item be by default permanently assigned

isUniquelyTracked

public boolean isUniquelyTracked()
Returns:
boolean - flag if the items are uniquely tracked by some unique identification

getMinimalAvailableCount

public int getMinimalAvailableCount()
Returns:
int - minimal available count which should be in stock

getAverageCost

public double getAverageCost()
Returns:
double - what is the average cost of units for this item

getPrice

public double getPrice()
Returns:
double - price for this item

getDisplayOrder

public int getDisplayOrder()
Returns:
int - display order used together with the name stem sort the items

getLastRecountTimestamp

public java.sql.Timestamp getLastRecountTimestamp()
Returns:
Timestamp - time when these item in the inventory were last time recounted

getNameStem

public java.lang.String getNameStem()
Returns:
String - the part of the name which is the same for all the same items of different sizes

getSize

public java.lang.String getSize()
Returns:
String - size of the items (hopefully in form "whole part quotient/divider"

isSame

public boolean isSame(java.lang.Object oObject)

Specified by:
isSame in class org.opensubsystems.core.data.DataObject

setReusable

public void setReusable(boolean bReusable)
Parameters:
bReusable - - Item can be either reusable or if it is not then it is consumable and doesn't have to be returned after it is issued.

setAvailableCount

public void setAvailableCount(int iAvailableCount)
Parameters:
iAvailableCount - - How many pieces of this item are physically present in the inventory.

setAverageCost

public void setAverageCost(double dAverageCost)
Parameters:
dAverageCost - - average cost of items in the inventory.

setShippedCount

public void setShippedCount(int iShippedCount)
Parameters:
iShippedCount - - how many pieces of this item were shipped to the inventory.

setName

public void setName(java.lang.String strName)
Parameters:
strName - - Name of the item .

setNameStem

public void setNameStem(java.lang.String strNameStem)
Parameters:
strNameStem - - The part of the name which doesn't contain the size information and therefore it is the same for all items of the same size.

setDisplayOrder

public void setDisplayOrder(int iDisplayOrder)
Parameters:
iDisplayOrder - - used to sort items with the same name stem

setDescription

public void setDescription(java.lang.String strDescription)
Parameters:
strDescription - - description of the item

setPrice

public void setPrice(double dPrice)
Parameters:
dPrice - - Price for the items in the inventory.

setUniquelyTracked

public void setUniquelyTracked(boolean bUniquelyTracked)
Parameters:
bUniquelyTracked - - If true then this item type is tracked uniquely by serial numbers or other unique numbers, if false, then it is tracked just by quantity.


Copyright © 2003 - 2006 OpenSubsystems s.r.o.