Let's say I have the following class:
public class FormContainer {
@EJB
private ExternalDao externalDao;
private final OrderForm orderForm;
private final List<OrderFormContent> formContents;
public FormContainer(OrderForm orderForm) {
this.orderForm = orderForm
initializeOrderForm();
}
private void initializeOrderForm() {
formContents = externalDao.getFormContents(orderForm);
}
}
I use this class to be able to hold all the fields that I need to access through the application. I'm still involved in good design and bad design practice, so I wonder if this bad design will initialize the orderForm properties.
If so, how can this be improved?
source
share