|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.data.DataObject
org.opensubsystems.core.data.BasicDataObject
org.opensubsystems.core.data.ModifiableDataObject
org.opensubsystems.inventory.data.Item
public class Item
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.
| 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 |
|---|
public static final int COL_ITEM_ID
public static final int COL_ITEM_DOMAIN_ID
public static final int COL_ITEM_INVENTORY_ID
public static final int COL_ITEM_NAME
public static final java.lang.Integer COL_ITEM_NAME_OBJ
public static final int COL_ITEM_DESCRIPTION
public static final int COL_ITEM_UNIT_OF_MEASURE
public static final int COL_ITEM_REUSABLE
public static final int COL_ITEM_EXPENSE_TYPE
public static final int COL_ITEM_AVAILABLE_COUNT
public static final int COL_ITEM_ON_HOLD_COUNT
public static final int COL_ITEM_POPULARITY_RANK
public static final int COL_ITEM_SHIPPED_COUNT
public static final int COL_ITEM_UNIQUELY_TRACKED
public static final int COL_ITEM_MINIMAL_AVAILABLE_COUNT
public static final int COL_ITEM_PERMANENTLY_ASSIGNED
public static final int COL_ITEM_AVERAGE_COST
public static final int COL_ITEM_PRICE
public static final int COL_ITEM_DISPLAY_ORDER
public static final int COL_ITEM_NAME_STEM
public static final int COL_ITEM_SIZE
public static final int COL_ITEM_LAST_RECOUNT_TIMESTAMP
public static final int COL_ITEM_CREATION_DATE
public static final int COL_ITEM_MODIFICATION_DATE
public static final int ITEM_BY_CATEGORY
public static final java.lang.Integer ITEM_BY_CATEGORY_OBJ
public static final int[] ALL_ITEM_COLUMNS
public static final int[] UPDATE_ITEMTYPE_COLUMNS
public static final int[] DEFAULT_LIST_COLUMNS
public static final int[] DEFAULT_LIST_SORT_COLUMNS
public static final java.lang.String[] DEFAULT_LIST_SORT_ORDER
public static final int[] INVENTORY_SCREEN_COLUMNS
protected static int s_iNameMaxLength
protected static int s_iDescriptionMaxLength
protected static int s_iNameStemMaxLength
protected static int s_iSizeMaxLength
protected int m_iInventoryId
protected java.lang.String m_strName
protected java.lang.String m_strDescription
protected int m_iUnitOfMeasure
protected boolean m_bReusable
protected int m_iExpenseType
protected int m_iAvailableCount
protected int m_iOnHoldCount
protected int m_iPopularityRank
protected int m_iShippedCount
protected boolean m_bUniquelyTracked
protected int m_iMinimalAvailableCount
protected boolean m_bPermanentlyAssigned
protected double m_dAverageCost
protected double m_dPrice
protected int m_iDisplayOrder
protected java.lang.String m_strNameStem
protected java.lang.String m_strSize
protected java.sql.Timestamp m_lastRecountTimestamp
| Constructor Detail |
|---|
public Item()
public Item(int iDomainId)
iDomainId - - Id of the domain this item belongs to
public Item(int iDomainId,
int iInventoryId,
java.lang.String strName,
java.lang.String strDescription,
int iAvailableCount)
iDomainId - - domain this item belongs toiInventoryId - - inventory this item belongs tostrName - - name to display for this itemstrDescription - - description of this itemiAvailableCount - - initial count for all inventory items of this
type. This value is also used as initial value
for shipped count.
public Item(Item data,
boolean copyId)
data - - item to use to initialize valuescopyId - - if true then id of the item will be copied as well
if false then the id will be initialized to a new id
public Item(Item original,
Item update)
original - - original item to take main characteristics fromupdate - - update item to use to initialize counts
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)
iId - - unique id of this itemiDomainId - - id of domain this item belongs toiInventoryId - - id of inventory this item belongs tostrName - - name of the itemstrDescription - - description of the itemiUnitOfMeasure - - unit of measure constantbReusable - - flag if item is reusableiExpenseType - - expense type constantiAvailableCount - - count of available items of this typeiOnHoldCount - - on hold count for this itemiPopularityRank - - popularity rank valueiShippedCount - - count of shiped item of this typebUniquelyTracked - - flag if the items are uniquely tracked by some
unique identificationiMinimalAvailableCount - - minimal available count which should be in
stockbPermanentlyAssigned - - should this item be by default permanently
assigneddAverageCost - - what is the average cost of units for this itemdPrice - - price for this itemiDisplayOrder - - display order used together with the name stem to
sort the itemsstrNameStem - - the part of the name which is the same for all the
same items of different sizesstrSize - - size of the items (hopefully in form "whole part
quotient/divider"lastRecountTimestamp - - time when the items were last countedcreationDate - - date of record creation for this itemmodificationDate - - last modification date for this item| Method Detail |
|---|
public int getAvailableCount()
public java.lang.String getDescription()
public int getExpenseType()
public java.lang.String getName()
public int getOnHoldCount()
public int getPopularityRank()
public boolean isReusable()
public int getUnitOfMeasure()
public static void setDescriptionMaxLength(int iNewDescriptionMaxLength)
iNewDescriptionMaxLength - - new name max lengthpublic static void setNameMaxLength(int iNewNameMaxLength)
iNewNameMaxLength - - new name max lengthpublic static void setNameStemMaxLength(int iNewNameStemMaxLength)
iNewNameStemMaxLength - - new name stem max lengthpublic static void setSizeMaxLength(int iNewSizeMaxLength)
iNewSizeMaxLength - - new size max lengthpublic int getInventoryId()
public void setInventoryId(int iInventoryId)
iInventoryId - - Id of inventory where this item belongspublic int getShippedCount()
public int getOutCount()
public static int getNameMaxLengthStatic()
public static int getDescriptionMaxLengthStatic()
public static int getNameStemMaxLengthStatic()
public static int getSizeMaxLengthStatic()
public boolean isPermanentlyAssigned()
public boolean isUniquelyTracked()
public int getMinimalAvailableCount()
public double getAverageCost()
public double getPrice()
public int getDisplayOrder()
public java.sql.Timestamp getLastRecountTimestamp()
public java.lang.String getNameStem()
public java.lang.String getSize()
public boolean isSame(java.lang.Object oObject)
isSame in class org.opensubsystems.core.data.DataObjectpublic void setReusable(boolean bReusable)
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.public void setAvailableCount(int iAvailableCount)
iAvailableCount - - How many pieces of this item are physically
present in the inventory.public void setAverageCost(double dAverageCost)
dAverageCost - - average cost of items in the inventory.public void setShippedCount(int iShippedCount)
iShippedCount - - how many pieces of this item were shipped to the
inventory.public void setName(java.lang.String strName)
strName - - Name of the item .public void setNameStem(java.lang.String strNameStem)
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.public void setDisplayOrder(int iDisplayOrder)
iDisplayOrder - - used to sort items with the same name stempublic void setDescription(java.lang.String strDescription)
strDescription - - description of the itempublic void setPrice(double dPrice)
dPrice - - Price for the items in the inventory.public void setUniquelyTracked(boolean bUniquelyTracked)
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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||