Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Decision

Details

The access interface needs to suit the users of the data. It must also acknowledge the underlying data structure.

There are two main options: Providing behavior interfaces on a logical representation of the data; Providing behavior interfaces on the CPS and explicitly providing reference to the data

Option A
Code Block
languagejava
CPSDataObject cpsRootObject = CPS.getRootObject(uuid_to_identify_inventory_item);
System.out.println(cpsRootObject);
List<CPSDataObject> kids = cpsRootObject.getChildren();
for (CPSDataObject kid: kids) {
	System.out.println(kid.getParent());
}
Option B
Code Block
languagejava
CPSDataObject cpsRootObject = CPS.getRootObject(uuid_to_identify_inventory_item);
System.out.println(cpsRootObject);
List<CPSDataObject> kids = CPS.getChildren(cpsRootObject);
for (CPSDataObject kid: kids) {
	System.out.println(CPS.getParent(kid));
}


Discussion