EJB 3.0 entities as interfaces or abstract classes?

157 Views Asked by At

Recently I have come across through this doubt. Is it possible that a EJB3.0 entities can be interfaces or abstract classes? If yes, In what cases? As I think that entities has to override hashcode and equal method and also they have getter and setter methods. Abstract is possible though but what about interfaces?

1

There are 1 best solutions below

0
On

You can inherit with EJB, but at the end you have to create concrete classes. You cannot have EJB entities as abstract classes instances or interfaces instances (there is no somehting like this)