Page 1 of 1

About Question enthuware.ocpjp.v7.2.1116 :

Posted: Sun Jun 23, 2013 3:12 am
by The_Nick
Once you get the Student object with getStudent, you are going to use method in the student class. Therefore the Data transfer object setters and getters. So is it possible to use in the business object both DAO and DTO? DAO in order to get a Student Object and a DTO to set and get data about the object? Furthermore the setters of a DTO... Do they actually change the database?

Thanks in advance.

The_Nick.

Re: About Question enthuware.ocpjp.v7.2.1116 :

Posted: Sun Jun 23, 2013 11:21 am
by admin
Yes, business objects typically use both DAO (to do database updates) and DTO/VO (to send the objects to other layers.

No, DTOs do not update the database. They contain no logic.