samedi 12 août 2017

Java : Builder Design Pattern

I have classes which has been autowired with all the attributes related to it. I need to return the object of these classes when a request for a particular class is received. A senior developer is suggesting to use the builder pattern. However the information I would be passing is just the request. I am confused can someone help.

Class DogDetailsProvider{

@Autowired
DogVendor dVendor;

@Autowired
DogOwner dOwner;

@Autowired
DogHealth dHealth;
}


Class CatDetailsProvider{

@Autowired
CatVendor cVendor;

@Autowired
CatOwner cOwner;

@Autowired
CatHealth cHealth;
}

Class ElephantDetailsProvider{

@Autowired
EleVendor eVendor;

@Autowired
EleOwner eOwner;

@Autowired
EleHealth eHealth;
}

Aucun commentaire:

Enregistrer un commentaire