Class InventoryTransfer
- All Implemented Interfaces:
Displayable,StringFiller,HasId,HasReference,OfEntity
- Direct Known Subclasses:
InventoryReturn,InventorySale,MaterialReturned,MaterialTransferred
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.core.HasReference
HasReference.Amend<T extends StoredObject> -
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionamend(Transaction transaction) Amend this.static voidgetActionDescription(ActionType actionType) Returns the action description based on the specified action type.final <O extends StoredObject>
HasReference.Amend<O> getAmend()final intbooleangetDate()final Entityfinal EntityGet the name of the location from which the items are being transferred.intGet the type of the location from which the items are being transferred.intgetNo()final Stringintstatic StringgetStatusValue(int value) static String[]Get the prefix of the tag to be used for generating the reference.Get the name of the location to which the items are being transferred.intGet the type of the location to which the items are being transferred.static voidstatic String[]voidreceive(Transaction transaction) static String[]voidsend(Transaction transaction) final voidsetAmendment(int amendment) voidsetApprovalRequired(boolean approvalRequired) voidvoidsetFromLocation(Id fromLocationId) voidsetFromLocation(InventoryLocation fromLocation) voidsetFromLocation(BigDecimal idValue) voidsetInvoiceDate(Date invoiceDate) voidsetInvoiceNumber(String invoiceNumber) voidsetNo(int no) voidsetReferenceNumber(String referenceNumber) voidvoidsetStatus(int status) voidsetSystemEntity(Id systemEntityId) voidsetSystemEntity(SystemEntity systemEntity) voidsetSystemEntity(BigDecimal idValue) voidsetToLocation(Id toLocationId) voidsetToLocation(InventoryLocation toLocation) voidsetToLocation(BigDecimal idValue) Display representation of the instance used for human-friendly display.voidThe system will invoke this whenever the object is saved to the DB.voidThis method will be invoked whenever an existing instance is deleted from the database.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, 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, toString, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildAttach, validateChildDetach, validateChildUpdate, 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.HasReference
getTagSuffix, serialTagMethods inherited from interface com.storedobject.core.OfEntity
check, findSystemEntityId
-
Constructor Details
-
InventoryTransfer
public InventoryTransfer()
-
-
Method Details
-
columns
-
indices
-
protectedColumns
-
searchColumns
-
setSystemEntity
- Specified by:
setSystemEntityin interfaceOfEntity
-
setSystemEntity
-
setSystemEntity
-
getSystemEntityId
- Specified by:
getSystemEntityIdin interfaceHasReference- Specified by:
getSystemEntityIdin interfaceOfEntity
-
getSystemEntity
- Specified by:
getSystemEntityin interfaceHasReference- Specified by:
getSystemEntityin interfaceOfEntity
-
setNo
public void setNo(int no) -
getNo
- Specified by:
getNoin interfaceHasReference
-
getTagPrefix
Description copied from interface:HasReferenceGet the prefix of the tag to be used for generating the reference.Warning: This should be a fixed string value.
- Specified by:
getTagPrefixin interfaceHasReference- Returns:
- A fixed tag value to be used as the prefix.
-
getReference
- Specified by:
getReferencein interfaceHasReference
-
getAmend
- Specified by:
getAmendin interfaceHasReference
-
setAmendment
public final void setAmendment(int amendment) -
getAmendment
-
setDate
-
getDate
- Specified by:
getDatein interfaceHasReference
-
setInvoiceNumber
-
getInvoiceNumber
-
setReferenceNumber
-
getReferenceNumber
-
setInvoiceDate
-
getInvoiceDate
-
setFromLocation
-
setFromLocation
-
setFromLocation
-
getFromLocationId
-
getFromLocation
-
setToLocation
-
setToLocation
-
setToLocation
-
getToLocationId
-
getToLocation
-
setStatus
public void setStatus(int status) -
getStatus
-
getStatusValues
-
getStatusValue
-
getStatusValue
-
setRemark
-
getRemark
-
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 classStoredObject- Parameters:
tm- Current transaction manager.- Throws:
Exception- If data is invalid.
-
getFromLocationType
public int getFromLocationType()Get the type of the location from which the items are being transferred.Note: An overridden class should always return a constant value.
- Returns:
- Location type. A negative value means that the location type is not known.
-
getFromLocationName
Get the name of the location from which the items are being transferred.Note: An overridden class should always return a constant value.
- Returns:
- Location name.
-
getToLocationType
public int getToLocationType()Get the type of the location to which the items are being transferred.Note: An overridden class should always return a constant value.
- Returns:
- Location type. A negative value means that the location type is not known.
-
getToLocationName
Get the name of the location to which the items are being transferred.Note: An overridden class should always return a constant value.
- Returns:
- Location name.
-
getActionDescription
Returns the action description based on the specified action type.- Parameters:
actionType- The type of the action, represented as an instance ofActionType. It could be one of the following: NOUN, VERB_PRESENT, VERB_PAST, or VERB_PAST_PARTICIPLE.- Returns:
- A string representing the action description. Returns "Transfer" for NOUN and VERB_PRESENT. Returns "Transferred" for VERB_PAST and VERB_PAST_PARTICIPLE.
-
validateDelete
Description copied from class:StoredObjectThis method will be invoked whenever an existing instance is deleted from the database. So, it will be called within an active transaction. Child classes can override this method to do validation when an existing instance is deleted from the database.Note: When overridden "super" should be called, otherwise, a "design error" will occur.
Also, see
StoredObject.validate().- Overrides:
validateDeletein classStoredObject- Throws:
Exception- By raising an exception from this method, the current transaction can be abandoned.
-
send
- Throws:
Exception
-
receive
- Throws:
Exception
-
amend
Amend this. This entry will be closed (marked with status as "returned"), and another entry will be created with all the items under it. Any new item added to it will be added with a new amendment number.- Parameters:
transaction- Transaction.- Returns:
- The id of the newly created (and saved) entry.
- Throws:
Exception- If any exception occurs while carrying out the transaction.
-
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.
-
setApprovalRequired
public void setApprovalRequired(boolean approvalRequired) -
getApprovalRequired
public boolean getApprovalRequired() -
getEntityFrom
-
getEntityTo
-