Class InventoryFitmentPosition
- All Implemented Interfaces:
Displayable,StringFiller,HasId,HasInventoryItem,HasInventoryItemType
- Author:
- Syam
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]booleanIs the given part numberIdcompatible for this position?booleancanFit(InventoryItem item) Is the given item compatible for this position?booleancanFit(InventoryItemType partNumber) Is the given part number compatible for this position?static voidstatic InventoryFitmentPositionget(InventoryItem item, InventoryAssembly assembly) Get a fitment position for the given item and assembly.static InventoryFitmentPositionget(Transaction transaction, InventoryItem item, InventoryAssembly assembly) Get a fitment position for the given item and assembly.Get the item fitted at this position.getFittedItem(Transaction transaction) Get the item fitted at this position (checks within a transaction).Retrieves the inventory item associated with this entity.Returns the InventoryItemType (P/N) associated with this object.getItem()Retrieves the inventory item associated with this entity.intgetLevel()Get the level number for this assembly.getName()intgetType()Get the type of this location.static voidList of assemblies defined under this fitment position.static String[]voidsetAssembly(Id assemblyId) voidsetAssembly(InventoryAssembly assembly) voidsetAssembly(BigDecimal idValue) voidvoidsetItem(InventoryItem item) voidsetItem(BigDecimal idValue) voidDisplay representation of the instance used for human-friendly display.toDisplay(boolean includeFittedItem) voidThe system will invoke this 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, validateMethods 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, family, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getActor, getAttachment, getAttachmentId, getChildren, getContemporaryOf, 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, listDeletedIds, 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, loadAttributesFrom, 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, 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, valueEqualsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.storedobject.core.HasInventoryItem
getItemFromHistory, getQuantity
-
Constructor Details
-
InventoryFitmentPosition
public InventoryFitmentPosition()Constructor.
-
-
Method Details
-
columns
-
indices
-
searchColumns
-
browseColumns
-
setName
- Overrides:
setNamein classInventoryLocation
-
getName
- Overrides:
getNamein classInventoryLocation
-
setItem
-
setItem
-
setItem
-
getItemId
-
getItem
Description copied from interface:HasInventoryItemRetrieves the inventory item associated with this entity.- Specified by:
getItemin interfaceHasInventoryItem- Returns:
- the associated InventoryItem instance
-
getAssemblyId
-
getAssembly
-
setAssembly
-
setAssembly
-
setAssembly
-
validateData
Description copied from class:StoredObjectThe system will invoke this whenever the object is saved to the DB. It will be invoked in all cases while creating new objects and updating/deleting/undeleting 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:
validateDatain classInventoryLocation- Parameters:
tm- Current transaction manager.- Throws:
Exception- If data is invalid.
-
getType
public int getType()Description copied from class:InventoryLocationGet the type of this location. Location type values are as follows:0: Inventory store bins
InventoryBin1: Supplier locations (purchased 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)
InventoryFitmentPosition15: 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
21: Consumption by external entities
- Specified by:
getTypein classInventoryLocation- Returns:
- Location type.
-
getEntityId
- Specified by:
getEntityIdin 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:StoredObjectDisplay representation of the instance used for human-friendly display.- Specified by:
toDisplayin interfaceDisplayable- Overrides:
toDisplayin classStoredObject- Returns:
- Display representation of the instance.
-
toDisplay
-
getPosition
-
getFittedItem
Get the item 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 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, the 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.
-
getInventoryItem
Description copied from interface:HasInventoryItemRetrieves the inventory item associated with this entity.- Specified by:
getInventoryItemin interfaceHasInventoryItem- Returns:
- the associated InventoryItem instance
-
getInventoryItemType
Description copied from interface:HasInventoryItemTypeReturns the InventoryItemType (P/N) associated with this object.- Specified by:
getInventoryItemTypein interfaceHasInventoryItem- Specified by:
getInventoryItemTypein interfaceHasInventoryItemType- Returns:
- the InventoryItemType representing the type of the inventory item (P/N).
-