| java.lang.Object org.ofbiz.manufacturing.bom.BOMHelper
BOMHelper | public class BOMHelper (Code) | | Helper class containing static method useful when dealing
with product's bills of materials.
These methods are also available as services (see
BOMServices ).
author: Jacopo Cappellato |
Method Summary | |
public static int | getMaxDepth(String productId, String bomType, Date inDate, GenericDelegator delegator) Returns the product's low level code (llc) i.e. | public static GenericValue | searchDuplicatedAncestor(String productId, String productIdKey, String bomType, Date inDate, GenericDelegator delegator) Returns the ProductAssoc generic value for a duplicate productIdKey
ancestor if present, null otherwise.
Useful to avoid loops when adding new assocs (components)
to a bill of materials.
Parameters: productId - The product to which we want to add a new child. Parameters: productIdKey - The new component we want to add to the existing bom. Parameters: bomType - The bill of materials type (e.g. |
BOMHelper | public BOMHelper()(Code) | | Creates a new instance of BOMHelper
|
getMaxDepth | public static int getMaxDepth(String productId, String bomType, Date inDate, GenericDelegator delegator) throws GenericEntityException(Code) | | Returns the product's low level code (llc) i.e. the maximum depth
in which the productId can be found in any of the
bills of materials of bomType type.
The low level code for the productId. (0 = root, 1 = first level, etc...) Parameters: productId - The product id Parameters: bomType - The bill of materials type (e.g. manufacturing, engineering,...) Parameters: delegator - Validity date (if null, today is used). Parameters: inDate - The delegator throws: GenericEntityException - If a db problem occurs. |
searchDuplicatedAncestor | public static GenericValue searchDuplicatedAncestor(String productId, String productIdKey, String bomType, Date inDate, GenericDelegator delegator) throws GenericEntityException(Code) | | Returns the ProductAssoc generic value for a duplicate productIdKey
ancestor if present, null otherwise.
Useful to avoid loops when adding new assocs (components)
to a bill of materials.
Parameters: productId - The product to which we want to add a new child. Parameters: productIdKey - The new component we want to add to the existing bom. Parameters: bomType - The bill of materials type (e.g. manufacturing, engineering). Parameters: inDate - Validity date (if null, today is used). Parameters: delegator - The delegator used throws: GenericEntityException - If a db problem occurs the ProductAssoc generic value for a duplicate productIdKeyancestor if present, null otherwise. |
|
|