lundi 28 novembre 2016

Data transfer object class can contain other objects?

I just wanted to know DTO class contain another objects or not. Please tell me the below code is valid DTO class or not?

class Address implements Serializable{

private String city;
private String location

}

class EmployeeDTO implements Serializable{
private String name;
private int age;
private Address address;
//setters and getters
}

Aucun commentaire:

Enregistrer un commentaire