sampleAdapter is now TYPESAFE. implements check for objecttype, so we
can simple call it after generation on every object.
WORKS EVEN FOR RECREATION FROM DATABASE