aspose file tools*
The moose likes Web Services and the fly likes Serialization/Deserialization for Value Object Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Serialization/Deserialization for Value Object Pattern" Watch "Serialization/Deserialization for Value Object Pattern" New topic
Author

Serialization/Deserialization for Value Object Pattern

Pablo Pires
Greenhorn

Joined: May 19, 2003
Posts: 7
Hi Ranchers!
I use the Value Object Pattern with flags indicating if the attribute has changed, like this:
private string attibute;
private boolean attributeHasChanged;
(...)
public void setAttribute(String attribute) {
this.attribute = attribute;
attributeHasChanged(true); // new task
}
public void attributeHasChanged(boolean state) {
this.attributeHasChanged = state;
}

The problem is that I can't just use the BeanSerialization/BeanDeserialization because inside my setAttribute I have a new operation to do (call method attributeHasChanged()).
What are the best solution for my case, or at least which ones??
Thanks
Pablo Pires
Belo Horizonte - Brazil
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Serialization/Deserialization for Value Object Pattern