gemire / daofusion

Automatically exported from code.google.com/p/daofusion
0 stars 1 forks source link

Persistent entity model enhancements #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, PersistentEntity<ID extends Serializable> class has three direct
subclasses:

- MutablePersistentEntity
- ImmutablePersistentEntity
- PersistentEnumeration

all of them using Long as the ID.

Introduction of bitemporal classes showed that this has to be revised:
BitemporalWrapper<V> extends MutablePersistentEntity essentially forces you
to track bitemporal data along with validity/record interval in a mapped
superclass (BitemporalWrapper) using Long as the primary key column type.

I propose that the <ID extends Serializable> type parameter should be
retained for the three subclasses mentioned above.

Additionally, we should consider adding an abstract implementation of
Persistable<ID> for entities which can't use @GeneratedValue annotation on
their id's (e.g. an alternative to PersistentEntity).

Original issue reported on code.google.com by Vojtech....@gmail.com on 8 Sep 2009 at 11:44