3.2. Properties and Collections

Naked Objects follows the usual JavaBean conventions for properties, and so any Groovy property is picked up automatically by Naked Objects. This also works for collections (a JavaBean property that returns a java.util.Collection, java.util.List or java.util.Set).

For example, the Claim object is rendered like this:

The corresponding Groovy source code is:

class Claim extends AbstractDomainObject {

  boolean rush
  String description
  Date date
  String status
  Claimant claimant
  Approver approver
  List<ClaimItem> items = new ArrayList<ClaimItem>()

  ...
}