|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ItemFactory
Methods to create, retrieve and manipulate items in the persistence store.
| Method Summary | |
|---|---|
boolean |
addToCategories(int iItemId,
int[] arrCategoryIds)
Add item type to a specified categories. |
boolean |
addToCategory(int iItemId,
int iCategoryId)
Add item type to a specified category. |
void |
changeAvailableCount(int iItemId,
int iAvailableCountChange,
int iDomainId)
Change the available count for specified items by specified relative values. |
boolean |
changeAvailableCount(java.util.List lstChanges,
int iDomainId)
Change the available count for specified items by specified relative values. |
void |
changeCounts(int iItemId,
int iAvailableCountChange,
int iOnHoldCountChange,
int iDomainId)
Update the on hold cont and available count for specified item. |
void |
changeCounts(java.util.List lstChanges,
int iDomainId)
Update the on hold cont and available count for specified item. |
void |
changeOnHoldCount(int iItemId,
int iOnHoldCountChange,
boolean bOnlyIfAvailable,
int iDomainId)
Update the on hold count for specified item by specified relative values. |
void |
changeOnHoldCount(java.util.List lstChanges,
boolean bOnlyIfAvailable,
int iDomainId)
Update the on hold count for specified item, which means that the item is still in the inventory but it was reserved. |
boolean |
changeShippedAndAvailableCount(int iItemId,
int iAvailableCountChange,
int iDomainId)
Update the shipped and available count for specified item. |
boolean |
changeShippedAndAvailableCount(java.util.List lstChanges)
Update the shipped and available count for specified item. |
boolean |
changeShippedAndAvailableCountSafely(java.util.List lstChanges)
Update the shipped and available count for specified item. |
Item |
get(int iInventoryId,
java.lang.String strName)
Get item based on it's inventory id and name. |
int[] |
getAllEmptyCategories(int iInventoryId,
int[] arrIds)
Get IDs for all empty categories belonging to the specified inventory. |
org.opensubsystems.core.util.TwoIntStruct[] |
getCategories(long lTime,
int iInventoryId)
Return all mapping between items and categories that's changed since the specified time. |
java.util.List |
getIdsInCategory(int iRootCategoryId)
Get ids of all items for category with id TODO: For Miro: Figure out what this method means? Will it return items from all subcategories or just the one specified? Should we call this main or root? |
int |
getMainCategoryId(int iItemId)
Get id of item type main category. |
java.util.List |
getSubcategoryIds(int iItemId)
Get id of ite type main category TODO: For Miro: Figure out what this method means? Item type should be able to be at multiple level of subcategories. |
void |
removeFromAllCategories(int iItemId)
Remove specified item for all categories |
int |
resetCounts(int iInventoryId)
Reset all counts of all items in the inventory to 0. |
| Methods inherited from interface org.opensubsystems.core.persist.ModifiableDataFactory |
|---|
save |
| Methods inherited from interface org.opensubsystems.core.persist.BasicDataFactory |
|---|
create, create, delete |
| Methods inherited from interface org.opensubsystems.core.persist.DataFactory |
|---|
get, getDataType |
| Methods inherited from interface org.opensubsystems.patterns.listdata.persist.ListFactory |
|---|
get, getDefaultListDefinition |
| Method Detail |
|---|
Item get(int iInventoryId,
java.lang.String strName)
throws org.opensubsystems.core.error.OSSException
iInventoryId - - id of the inventory from where to get the ItemstrName - - name of the Item to get
org.opensubsystems.core.error.OSSException - - an error has occured
void changeOnHoldCount(int iItemId,
int iOnHoldCountChange,
boolean bOnlyIfAvailable,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
iItemId - - id of the ItemiOnHoldCountChange - - increment (positive) or decrement (negative)
valuebOnlyIfAvailable - - if true then the on hold count will be updated
only if available that is
(item count - already on hold item count
>= the new on hold item count)
(that means there are some items which are
available which were not reserved yet)iDomainId - - id of domain in which the item is supposed to exist
org.opensubsystems.core.error.OSSException - - an error has occured
void changeOnHoldCount(java.util.List lstChanges,
boolean bOnlyIfAvailable,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
lstChanges - - list of TwoIntStructs where the first int is
the item id and the second int is the integer
value (positive or negative) to change the count bybOnlyIfAvailable - - if true then the on hold count will be updated
only if available that is
(item count - already on hold item count
>= the new on hold item count)
(that means there are some items which are
available which were not reserved yet)iDomainId - - id of domain in which the items are supposed to exist
org.opensubsystems.core.error.OSSException - - an error has occured
void changeAvailableCount(int iItemId,
int iAvailableCountChange,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
iItemId - - id of the ItemiAvailableCountChange - - value to increment or decrement available
count byiDomainId - - id of domain in which the item is supposed to exist
org.opensubsystems.core.error.OSSException - - an error has occured
boolean changeAvailableCount(java.util.List lstChanges,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
lstChanges - - list of TwoIntStructs where the first int is the item
id and the second int is the integer value (positive
or negative) to change the count byiDomainId - - id of domain in which the items are supposed to exist
org.opensubsystems.core.error.OSSException - - an error has occured
boolean changeShippedAndAvailableCount(int iItemId,
int iAvailableCountChange,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
iItemId - - id of the ItemiAvailableCountChange - - value to increment or decrement the shipped
and available count byiDomainId - - id of domain in which the item is supposed to exist
org.opensubsystems.core.error.OSSException - - an error has occured
boolean changeShippedAndAvailableCount(java.util.List lstChanges)
throws org.opensubsystems.core.error.OSSException
lstChanges - - list of TwoIntStructs where the first int is the item
id and the second int is the integer shipped and
available count value (positiveor negative) to change
the count by
org.opensubsystems.core.error.OSSException - - an error has occured
boolean changeShippedAndAvailableCountSafely(java.util.List lstChanges)
throws org.opensubsystems.core.error.OSSException
lstChanges - - list of TwoIntStructs where the first int is the item
id and the second int is the integer shipped and
available count value (positive or negative) to change
the count by
org.opensubsystems.core.error.OSSException - - an error has occured
void changeCounts(int iItemId,
int iAvailableCountChange,
int iOnHoldCountChange,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
iItemId - - id of the ItemiAvailableCountChange - - value to increment or decrement the
available count byiOnHoldCountChange - - value to increment or decrement the on hold
count byiDomainId - - id of domain in which the item is supposed to exist
org.opensubsystems.core.error.OSSException - - an error has occured
void changeCounts(java.util.List lstChanges,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
lstChanges - - list of ThreeIntStructs where the first int is the
item id, second is the relative available count change
and third is relative onhold count change.iDomainId - - id of domain in which the items are supposed to exist
org.opensubsystems.core.error.OSSException - - an error has occured
boolean addToCategory(int iItemId,
int iCategoryId)
throws org.opensubsystems.core.error.OSSException
iItemId - - id of item to add to categoryiCategoryId - - id of cateogry to add the item type to
org.opensubsystems.core.error.OSSException - - an error has occured
boolean addToCategories(int iItemId,
int[] arrCategoryIds)
throws org.opensubsystems.core.error.OSSException
iItemId - - id of item to add to categoriesarrCategoryIds - - array of category ids where to add the item
org.opensubsystems.core.error.OSSException - - an error has occured
int resetCounts(int iInventoryId)
throws org.opensubsystems.core.error.OSSException
iInventoryId - - inventory id where to reset count of items
org.opensubsystems.core.error.OSSException - - an error has occured
org.opensubsystems.core.util.TwoIntStruct[] getCategories(long lTime,
int iInventoryId)
throws org.opensubsystems.core.error.OSSException
lTime - - Number of seconds since January 1, 1970, 00:00:00 GMT.
If zero, then return ALL item inventory category mappings.iInventoryId - - id of inventory to get the categories for
org.opensubsystems.core.error.OSSException - - an error has occured
void removeFromAllCategories(int iItemId)
throws org.opensubsystems.core.error.OSSException
iItemId - - Item id
org.opensubsystems.core.error.OSSException - - an error has occured
int getMainCategoryId(int iItemId)
throws org.opensubsystems.core.error.OSSException
iItemId - - Item id
org.opensubsystems.core.error.OSSException - - an error has occured
java.util.List getSubcategoryIds(int iItemId)
throws org.opensubsystems.core.error.OSSException
iItemId - - item id
org.opensubsystems.core.error.OSSException - - an error has occured
java.util.List getIdsInCategory(int iRootCategoryId)
throws org.opensubsystems.core.error.OSSException
iRootCategoryId - - id of root category
org.opensubsystems.core.error.OSSException - - an error has occured
int[] getAllEmptyCategories(int iInventoryId,
int[] arrIds)
throws org.opensubsystems.core.error.OSSException
iInventoryId - - inventory to find empty categories inarrIds - - array of category IDs to delete, can be null to get all
empty categories
org.opensubsystems.core.error.OSSException - - an error has occured
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||