Hello,

I believe, it is considered a best practice to use DTOs
(transport/beans) to hold the default values of objects (although I've
heard that within Actions is the more appropriate place). How do you
guys do this when one of your DTOs has an array of child DTOs. For
example:

public class Policy extends DTO {

    private Integer id;
    private Integer clientId;
    private String name = "Default Policy Name";
    private String desc = "Third Policy";
    private FileExtension[] fileExtensions;
    ...

Assume DAO pattern, and that normally the default values are overridden
by data coming from the DB. But if not, how best do I set default values
for the 10 or so fileExtension objects in the example above?

Policy constructor? In the FileExtension constructor? In the action?

Thank You. 
--------------------------------------------------------
 
NOTICE: If received in error, please destroy and notify sender.  Sender does 
not waive confidentiality or privilege, and use is prohibited. 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to