# ClearBom.cls ## Overview The ClearBom class is responsible for clearing Bill of Materials (BOM) data from the system. ## Methods ### clearBom() Clears all BOM entries from the database. **Parameters:** - None **Returns:** - void ### clearBomByItem(String itemId) Clears BOM entries for a specific item. **Parameters:** - itemId: The unique identifier of the item **Returns:** - void ### clearBomByDate(Date startDate, Date endDate) Clears BOM entries within a specified date range. **Parameters:** - startDate: The beginning date of the range - endDate: The end date of the range **Returns:** - void ## Usage Example ClearBom clearer = new ClearBom(); // Clear all BOM entries clearer.clearBom(); // Clear BOM for specific item clearer.clearBomByItem('ITEM-001'); // Clear BOM entries for date range Date start = Date.newInstance(2023, 1, 1); Date end = Date.newInstance(2023, 12, 31); clearer.clearBomByDate(start, end); ## Error Handling - Throws `BomException` if clearing operation fails - Validates input parameters before processing - Logs all clearing operations for audit purposes ## Dependencies - Requires appropriate user permissions - Depends on BOM database tables - Requires logging system configuration