Introduces an abstract base JPA entity class.

Changes the structure of database tables according to the base entity
class.