|
Gareth,
Do you stop outside objects changing contents
?
If yes then how do you do this if the VO has
setters (would be using an interface?) to the VO?
----- Original Message -----
Sent: Thursday, January 16, 2003 5:21
PM
Subject: Re: VOs
We use them to represent a snapshot of the underlying data. So they
are mutable but do not change the underlying data until passed back to the
"model" (ie entity-bean or stored proc layer) for the change to be
applied. So when we "ask" the entity bean for the current value of an
account - it responds with a VO and if we want to change the value of the
account the entity-bean expects the changes in the form of a VO.
So the VO has getters and setters but the underlying database tables don't
get changed until the model is invoked.
>From: Glenn Dickson <[EMAIL PROTECTED]>
>Reply-To: Glenn Dickson <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: VOs
>Date: Thu, 16 Jan 2003 16:20:50 +0800
>
>Hi All
>Just wondering about VO Value Objects they are to be immutable.
I understand (from some people around me) that the vo cannot be changed onyl
through createing a new one using constructor.
>
>Is this true and what are the rule that govern this object. In
other words what is the industry standard for these object types?
>
>I would appreciate your comments.
>
>
>TIA
>Glenn
|