Class InventoryLocation
- All Implemented Interfaces:
Displayable
,StringFiller
,HasId
- Direct Known Subclasses:
InventoryBin
,InventoryCustodyLocation
,InventoryFitmentPosition
,InventoryVirtualLocation
Represents a location where an item can be located or sourced. A location could be an InventoryBin
(if
it is stocked in a store), a "supplier", a "repair organization" (if it is sent for repair there),
a InventoryFitmentPosition
(if it is fitted on an assembly) etc.
Only regular inventory bin (InventoryBin
) can be extended further. All other type of bins have fixed
platform-level implementation.
- Author:
- Syam
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
canBin
(InventoryItem item) Check whether a particular item can be stored at this location or not.final boolean
canBin
(InventoryItemType partNumber) Check whether a particular type of item (part number) can be stored at this location or not.boolean
protected boolean
canStore
(InventoryItemType partNumber) static void
static String[]
abstract Id
getName()
int
static String
getReturnPolicyValue
(int returnPolicy) static String[]
abstract int
getType()
Get the type of this location.static String
getTypeValue
(int value) static String[]
static void
boolean
isActive()
final boolean
final boolean
void
setCategory
(Id category) void
void
setReturnPolicy
(int returnPolicy) toString()
String representation of the instance.void
validate()
This method is invoked internally by the system whenever the object gets saved to the DB (that means, while doing transactions).void
This will be invoked by the system whenever the object is saved to the DB.Methods inherited from class com.storedobject.core.StoredObject
addLink, addLink, addLink, addLink, addLink, addLink, addLink, addLink, checkCurrency, checkCurrency, checkForDuplicate, checkForDuplicate, checkTimeZone, checkTransaction, clearObjectLinks, contemporary, copy, copy, count, count, count, count, count, count, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, create, created, delete, delete, delete, deleted, directUpdate, equals, exists, exists, exists, exists, exists, existsFileData, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsMaster, existsMaster, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, family, family, family, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getAttachment, getAttachmentId, getChildren, getDeleted, getDeleted, getExistsCondition, getExistsCondition, getFileData, getFileData, getHistorical, getId, getKeyIndex, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getNotExistsCondition, getNotExistsCondition, getParent, getParent, getParent, getParentId, getParentId, getParentId, getRelated, getRelated, getTransaction, getTransactionId, getTransactionIP, getUnique, getUniqueCondition, hashCode, inserted, isModified, isVirtual, list, list, list, list, list, list, list, list, list, list, list, list, list, listFileData, listFileData, listHistory, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listTree, listTree, listTree, listTree, listViaQuery, listViaQuery, load, load, load, load, loaded, loading, makeNew, makeVirtual, migrate, moduleName, nextVersion, objectLink, objectLink, objectLink, objectLinks, objectLinks, old, person, previousVersion, previousVersion, query, query, query, query, query, query, query, query, query, query, query, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, reload, reload, reloaded, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeReverseLinks, removeReverseLinks, save, save, save, save, save, save, save, save, save, save, save, save, save, save, saved, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, toDisplay, transacting, undelete, undelete, undeleted, updated, user, userId, validateChildAttach, validateChildDetach, validateChildUpdate, validateDelete, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, validateUpdate, valueEquals
-
Constructor Details
-
Method Details
-
columns
-
indices
-
displayColumns
-
setName
-
getName
-
validateData
Description copied from class:StoredObject
This will be invoked by the system whenever the object is saved to the DB. It will be invoked in all cases, while creating new objects and updating/deleting/un-deleting existing objects. If any exception is raised by this method, the process of saving to the DB will be abandoned.
Note: This method is mainly used to validate the data of all attributes of the object and it may be used by others for validating the object. For example, front-end data-entry systems can use this method for validating the object.
- Overrides:
validateData
in classStoredObject
- Parameters:
tm
- Current transaction manager.- Throws:
Exception
- If data is invalid.
-
validate
Description copied from class:StoredObject
This method is invoked internally by the system whenever the object gets saved to the DB (that means, while doing transactions). It will be invoked in all cases (while creating new objects and updating/deleting/un-deleting existing objects). If this method raises any exceptions, the process of saving to the DB will be abandoned.
This method is not usually used for validating data (For that purpose,
StoredObject.validateData(TransactionManager)
is recommended). It is mainly used for validating state of the object. Methods such asStoredObject.created()
,StoredObject.updated()
,StoredObject.deleted()
,StoredObject.undeleted()
etc. are used to check the specific states but overridden methods may check for other "application-specific"/"business-specific" states.This method is invoked only after one of the other operation-specific validate method is invoked depending on the save operation -
StoredObject.validateInsert()
,StoredObject.validateUpdate()
,StoredObject.validateDelete()
,StoredObject.validateUndelete()
.Note: When overridden "super" should be called, otherwise, a "design error" will occur.
- Overrides:
validate
in classStoredObject
- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
canBin
Check whether a particular item can be stored at this location or not.- Parameters:
item
- Item to check.- Returns:
- True or false.
-
canBin
Check whether a particular type of item (part number) can be stored at this location or not.- Parameters:
partNumber
- Item type to check.- Returns:
- True or false.
-
canStore
-
setCategory
-
getCategoryId
-
toString
Description copied from class:StoredObject
String representation of the instance. Mostly used for logging purposes.- Overrides:
toString
in classStoredObject
- Returns:
- String representation of the instance.
-
getEntityId
-
getType
public abstract int getType()Get the type of this location. Location type values are as follows:0: Inventory store bins
InventoryBin
1: Supplier locations (purchase of items are coming from supplier locations)
2: Consumer/customer locations (items sold to a customer go here)
3: Repair/Maintenance organization (items sent for repair or maintenance work will be located here)
4: Production unit
5: Maintenance unit (within the organization)
6: Scrap
7: Inventory shortage is booked here
8: Rented/Loaned out to (an outside organization)
9: Rented/Leased from (an outside organization)
10: Service Unit or Work Centers (providing services to external customers)
11: Repair unit (within the organization)
12: Initial inventory (used as a source for data pick-up)
13: Service/Subscription
14: Assembly (fitment positions on assembled items)
InventoryFitmentPosition
15: Thrash - used for keeping items that were entered with incorrect details
16: Internal consumption (Consume the item internally - typically consumables)
17: External owner (Can receive stock from these locations but the ownership is still theirs)
18: Custody (In the custody of someone. Mostly used for tools)
19: Packaged (Packaged in a package for sending it out)
20: Fixed asset
- Returns:
- Location type.
-
getTypeValues
-
getTypeValue
-
getTypeValue
-
getReturnPolicy
public int getReturnPolicy() -
setReturnPolicy
public void setReturnPolicy(int returnPolicy) -
getReturnPolicyValue
-
getReturnPolicyValues
-
getReturnPolicyValue
-
isInspectionRequired
public final boolean isInspectionRequired() -
isScrapAllowed
public final boolean isScrapAllowed() -
getReceiptText
-
getIssueText
-
canResurrect
public boolean canResurrect() -
isActive
public boolean isActive()
-