Wednesday, August 26, 2009

How to transform a java object, a dto essentially, in a "shape" of the information it keeps

An object of the type I'm taking into consideration has few things to offer to be manipulated (and this is good): it has "getters" and "setters" methods, plus values kept is class variables accessed by these. Now, what do I mean for shape of an object ? I speak with myself but it is anyway a good question. Shape is the object represantion that can be viewed by an agent that must be able to do operations on these. I'm speaking about a composable information unit produced from a dto of data received by sensors. So, shape has not to change with time passing, and many read operations on the same object must find the same "shape". The conclusion of this analysis is that the shape of a dto is a sorted list of key-value pairs with its getters and setters methods names as key, and values retrieved by the calls to these as... values.

Example: object class "person"

key: value:
getName stefano
getAge 35

This seems to run fine until I don't get into considerations the writable methods: the setters.

No comments: