Let's say I create an object in java named Point with 2 attributes (int x & int y) and i store some instances in an objectdb file. I know how to retrieve all items (as objects) from that file but how can I access their attributes if I don't have the definition of the class Point anymore?
Point definition
Class Point {
int x;
int y;
}
Then I create 2 Points (0,0) (1,1) and store them in objectdb file (i can provide the code if needed)
I retrieve all Point instances with this statement
TypedQuery<Object> query = em.createQuery("SELECT o FROM Object o", Object.class);
List<Object> results = query.getResultList();
Supposedly i only have the objectdb file and not the Point class definition how can i get the values of x and y (even as simple string values)?
Thanks in advance