Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Serialization/Deserialization for Value Object Pattern  RSS feed

Pablo Pires
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
Pablo Pires
Belo Horizonte - Brazil
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!