I have this requirement where I need to add a List<SomeObject>
to a POJO before I make an API call.
For Example, I have a POJO Bank:
public class Bank{
private String name;
private String type;
//getters & setters
}
class Location{
private String locationID;
private String locationDetails;
//Getters & Setters
}
Now I may have to append List<Location>
to Bank object based on some logic before I make a REST call.
I don't want to simply have a List object in Bank POJO. Is there a way to achieve this in Java?
Thanks, Esh
Aucun commentaire:
Enregistrer un commentaire