private void explodeProduct(int productId,boolean isComponent){
  MProduct product=MProduct.get(getCtx(),productId);
  List<MPPProductBOM> list=getBOMs(product,isComponent);
  if (!isComponent && list.size() == 0) {
    throw new AdempiereException("@Error@ Product is not a BOM");
  }
  for (  MPPProductBOM bom : list) {
    if (!isComponent) {
      createLines(bom,null);
    }
    m_LevelNo++;
    for (    MPPProductBOMLine bomLine : bom.getLines()) {
      if (!bomLine.isActive()) {
        continue;
      }
      createLines(bom,bomLine);
      explodeProduct(bomLine.getM_Product_ID(),true);
    }
    m_LevelNo--;
  }
}

private void explodeProduct ( int productId , boolean isComponent ) { MProduct product = MProduct . get ( getCtx ( ) , productId ) ; List < MPPProductBOM > list = getBOMs ( product , isComponent ) ; if ( ! isComponent && list . size ( ) == 0 ) { throw new AdempiereException ( "@Error@ Product is not a BOM" ) ; } for ( MPPProductBOM bom : list ) { if ( ! isComponent ) { createLines ( bom , null ) ; } m_LevelNo ++ ; for ( MPPProductBOMLine bomLine : bom . getLines ( ) ) { if ( ! bomLine . isActive ( ) ) { continue ; } createLines ( bom , bomLine ) ; explodeProduct ( bomLine . getM_Product_ID ( ) , true ) ; } m_LevelNo -- ; } }
generate an explosion for this product
