I would like to do something like this: 

```
Class A 
Class B extends A
Class C extends A

B b = new B();
C c = new C();

b->setField("foo");
c->getField; //return "foo"

```

Is it somehow possible to implement these classes? 

I need it for persistance in hibernate, to make entity split into two entites and have each in its own table. And I need to have some fields same (id, some FK, some values). So I would like to set these fields in one subclass and have the same values in second subclass. All subclasses need to have/share exactly same value. 

Any idea?