Class ReferencedInventoryUtil
- java.lang.Object
-
- org.openbravo.materialmgmt.refinventory.ReferencedInventoryUtil
-
public class ReferencedInventoryUtil extends Object
Utility class for Referenced Inventory feature
-
-
Field Summary
Fields Modifier and Type Field Description static String
REFERENCEDINVENTORYPREFIX
static String
REFERENCEDINVENTORYSUFFIX
-
Constructor Summary
Constructors Constructor Description ReferencedInventoryUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
avoidUpdatingIfLinkedToReferencedInventory(String attributeSetInstanceId)
Throw an exception if the given attribute set instance is linked to a referenced inventorystatic AttributeSetInstance
cloneAttributeSetInstance(AttributeSetInstance _originalAttributeSetInstance, ReferencedInventory referencedInventory)
Create and return a new AttributeSetInstance from the given originalAttributeSetInstance and link it to the given referencedInventorystatic AttributeSetInstance
getAlreadyClonedAttributeSetInstance(AttributeSetInstance _originalAttributeSetInstance, ReferencedInventory referencedInventory)
Returns an AttributeSetInstance previously created from the given _originalAttributeSetInstance and referenced inventory.static String
getAttributeSetInstanceDescriptionForReferencedInventory(String originalDesc, ReferencedInventory referencedInventory)
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.static AttributeSetInstance
getParentAttributeSetInstance(StorageDetail storageDetail)
Returns the parent attribute set instance for the given storage detail.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.
-
-
-
Field Detail
-
REFERENCEDINVENTORYPREFIX
public static final String REFERENCEDINVENTORYPREFIX
- See Also:
- Constant Field Values
-
REFERENCEDINVENTORYSUFFIX
public static final String REFERENCEDINVENTORYSUFFIX
- See Also:
- Constant Field Values
-
-
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)
-
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 sequenceupdateNext
- 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
-
-