Hello
Glenn,
Our
design has been made before Sun officially announced the concept of Date
Transfer Object, it is therefore the name DTO does not exist in our
architecture.
We do
differentiate between read-write VO from read-only VO
.
In it
most simple form, a read-write VO does consists of getter and setter methods for
all it fields.
In the
later case, we achieve the result of read-only VO by defining a VO
which uses its constructor to initialise all its fields and without
defining any setter method.
We
still have use-cases that a single VO will be used situationally as read-only
and read-write VO, we approach this problem by define a read-only flag in the
super class to indicate the read-only or read-write status of the VO. By
default, this flag is read-write and to change the flag value from
read-write to read-only is a ONE_WAY operation. We do not define any way to set
the flag of the VO from read-only back to read-write.
regards
Philip
|