applied type object pattern to Persistent class hierarchy