Class ReferencedInventoryUtil


  • public class ReferencedInventoryUtil
    extends Object
    Utility class for Referenced Inventory feature
    • Constructor Detail

      • ReferencedInventoryUtil

        public ReferencedInventoryUtil()
    • Method Detail

      • cloneAttributeSetInstance

        public static final AttributeSetInstance cloneAttributeSetInstance​(AttributeSetInstance _originalAttributeSetInstance,
                                                                           ReferencedInventory referencedInventory)
        Create and return a new AttributeSetInstance from the given originalAttributeSetInstance and link it to the given referencedInventory
      • getAlreadyClonedAttributeSetInstance

        public static final AttributeSetInstance getAlreadyClonedAttributeSetInstance​(AttributeSetInstance _originalAttributeSetInstance,
                                                                                      ReferencedInventory referencedInventory)
        Returns an AttributeSetInstance previously created from the given _originalAttributeSetInstance and referenced inventory. If not found returns null.
      • getAttributeSetInstanceDescriptionForReferencedInventory

        public static final String getAttributeSetInstanceDescriptionForReferencedInventory​(String originalDesc,
                                                                                            ReferencedInventory referencedInventory)
        Generates a description with the originalDesc + "[" + referenced Inventory search key + "]"
      • getParentAttributeSetInstance

        public static final AttributeSetInstance getParentAttributeSetInstance​(StorageDetail storageDetail)
        Returns the parent attribute set instance for the given storage detail. If not found it returns null
      • getProposedValueFromSequenceOrNull

        public static String getProposedValueFromSequenceOrNull​(String referencedInventoryTypeId,
                                                                boolean updateNext)
        If the given referenced inventory type id is associated to a sequence, it then return the next value in that sequence. Otherwise returns null.
        Parameters:
        referencedInventoryTypeId - Referenced Inventory Type Id used to get its sequence
        updateNext - if true updates the sequence's next value in database
      • avoidUpdatingIfLinkedToReferencedInventory

        public static void avoidUpdatingIfLinkedToReferencedInventory​(String attributeSetInstanceId)
        Throw an exception if the given attribute set instance is linked to a referenced inventory
      • getAvailableStockReservations

        public static org.hibernate.ScrollableResults getAvailableStockReservations​(StorageDetail storageDetail,
                                                                                    Locator newStorageBin)
        Returns a ScrollableResults with the available stock reservations for the given storage detail that can be boxed to the given newStorageBin. They are ordered by first non-allocated, without a defined attribute set instance at reservation header first and with the lower reserved quantity