Value Object Module

Value Objects (<<value-object>>) are meant for passing data between application tiers. They build on the POJO functionality but add the follow features:

  • By default getter and setter methods are generated for each attribute unless marked with the <<field>> stereotype.
  • A no-arguments constructor and all-arguments constructor are generated.
  • toString, equals, and hashCode methods are generated.
  • Implements java.io.Serializable interface.

Value Objects are often what the client receives back in response to a server query. They are often clustered in arbitrary lists or trees as needed by the client. Both the generated equals and hashCode methods are deep implementations to accommodate this usage pattern.