I need an expert advice on how to represent BOM
concept in a class. So far in my application I had only one Equipment
. But now there is a CR for BOM
integration. So i have to modify my existing Equipment
class. How can I represent BOM
child and parent relationship in proper way?
I have one suggestion.
class Equipment {
List <Equipment> childEquipmentList;
public void addChildEquipment(EREquipmentVO childObject) {
if(null == childEquipmentList) childEquipmentList = new ArrayList<EREquipmentVO>();
this.childEquipmentList.add(childObject);
}
public List<EREquipmentVO> getChildEquipmentList() {
return childEquipmentList;
}
}
Want to know is there any other better way to implement BOM
relationship in Equipment
object.
Aucun commentaire:
Enregistrer un commentaire