vendredi 5 août 2016

Alternative for a Factory Design Patter

I am learning about design patterns and I wanted to know what would be an approachable design for this problem.

I have the class FormObject with different properties one of them being the Id. The flow will be something like so:

FormObject ---> processEngine -----> OutputClass

Process is basically going to take the id of FormObject and get different properties from other lists, and the results of these list I would like to return it in the OutputClass like so:

public class OutputClass {

  List<FormObjectDetails1> list1;
  List<FormObjectDetails2> list2;
  List<FormObjectDetails3> list3;
  List<FormObjectDetails4> list4;

  //getters and setters. 

}

The processEngine is what I have not determine what it will be. I have read about the factory design patter but I don't think path since this pattern relates more to related objects.

Can someone point me on the right direction? Thanks.

Aucun commentaire:

Enregistrer un commentaire