Class InventoryFitmentPosition
- All Implemented Interfaces:
Displayable
,StringFiller
,HasId
- Author:
- Syam
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
boolean
Is the given part numberId
compatible for this position?boolean
canFit
(InventoryItem item) Is the given item compatible for this position?boolean
canFit
(InventoryItemType partNumber) Is the given part number compatible for this position?static void
static InventoryFitmentPosition
get
(InventoryItem item, InventoryAssembly assembly) Get a fitment position for the given item and assembly.static InventoryFitmentPosition
get
(Transaction transaction, InventoryItem item, InventoryAssembly assembly) Get a fitment position for the given item and assembly.Get the item that is fitted at this position.getFittedItem
(Transaction transaction) Get the item that is fitted at this position (checks within a transaction).getItem()
int
getLevel()
Get the level number for this assembly.getName()
int
getType()
Get the type of this location.static void
List of assemblies defined under this fitment position.static String[]
void
setAssembly
(Id assemblyId) void
setAssembly
(InventoryAssembly assembly) void
setAssembly
(BigDecimal idValue) void
void
setItem
(InventoryItem item) void
setItem
(BigDecimal idValue) void
Display representation of the instance used for human-friendly display.toDisplay
(boolean includeFittedItem) void
This will be invoked by the system whenever the object is saved to the DB.Methods inherited from class com.storedobject.core.InventoryLocation
canBin, canBin, canResurrect, canStore, displayColumns, getCategoryId, getIssueText, getReceiptText, getReturnPolicy, getReturnPolicyValue, getReturnPolicyValue, getReturnPolicyValues, getTypeValue, getTypeValue, getTypeValues, isActive, isInspectionRequired, isScrapAllowed, setCategory, setReturnPolicy, toString, validate
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, transacting, undelete, undelete, undeleted, updated, user, userId, validateChildAttach, validateChildDetach, validateChildUpdate, validateDelete, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, validateUpdate, valueEquals
-
Constructor Details
-
InventoryFitmentPosition
public InventoryFitmentPosition()Constructor.
-
-
Method Details
-
columns
-
indices
-
searchColumns
-
browseColumns
-
setName
- Overrides:
setName
in classInventoryLocation
-
getName
- Overrides:
getName
in classInventoryLocation
-
setItem
-
setItem
-
setItem
-
getItemId
-
getItem
-
getAssemblyId
-
getAssembly
-
setAssembly
-
setAssembly
-
setAssembly
-
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 classInventoryLocation
- Parameters:
tm
- Current transaction manager.- Throws:
Exception
- If data is invalid.
-
getType
public int getType()Description copied from class:InventoryLocation
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
- Specified by:
getType
in classInventoryLocation
- Returns:
- Location type.
-
getEntityId
- Specified by:
getEntityId
in classInventoryLocation
-
canFit
Is the given part number compatible for this position?- Parameters:
partNumber
- Part number to check.- Returns:
- True or false.
-
canFit
Is the given item compatible for this position?- Parameters:
item
- Item to check.- Returns:
- True or false.
-
canFit
-
toDisplay
Description copied from class:StoredObject
Display representation of the instance used for human-friendly display.- Specified by:
toDisplay
in interfaceDisplayable
- Overrides:
toDisplay
in classStoredObject
- Returns:
- Display representation of the instance.
-
toDisplay
-
getPosition
-
getFittedItem
Get the item that is fitted at this position.- Returns:
- The item that is fitted at this position. Null is returned if nothing is fitted there.
-
getFittedItem
Get the item that is fitted at this position (checks within a transaction).- Parameters:
transaction
- Transaction.- Returns:
- The item that is fitted at this position. Null is returned if nothing is fitted there.
-
get
Get a fitment position for the given item and assembly.- Parameters:
item
- Item.assembly
- Assembly.- Returns:
- Fitment position.
-
get
public static InventoryFitmentPosition get(Transaction transaction, InventoryItem item, InventoryAssembly assembly) Get a fitment position for the given item and assembly. If the position doesn't exist, it will be created if the transaction is non-null, otherwise, a virtual instance will be created. Also, if the transaction is non-null and the creation fails, transaction will be rolled back and a virtual instance will be returned.- Parameters:
transaction
- Transactionitem
- Item.assembly
- Assembly.- Returns:
- Fitment position.
-
getLevel
public int getLevel()Get the level number for this assembly. Assembly level may not be determined correctly if no item is fitted here.- Returns:
- Level number in the hierarchy.
-
listImmediateAssemblies
List of assemblies defined under this fitment position. The assemblies under the assembly involved in this fitment position are listed. However, if this position is fitted with an APN, the immediate assemblies under that APN's assembly are listed.- Returns:
- List of assemblies.
-