Make ID and Version of PersistentDTO template-able through generics
commit7f5d0dca5d21ea931a6c554d510b5fabf8fa2c41
authorImran M Yousuf <imyousuf@smartitengineering.com>
Wed, 1 Sep 2010 01:35:06 +0000 (1 07:35 +0600)
committerImran M Yousuf <imyousuf@smartitengineering.com>
Wed, 1 Sep 2010 01:35:06 +0000 (1 07:35 +0600)
tree03bb1beedbaff24bd570cc3ffa59d6f3774ab561
parentb4ee7512a7df25dfc655cb3b59b531373bb81bb7
Make ID and Version of PersistentDTO template-able through generics

The main reason to do it is the use case of HBase where ID is a byte array
and version is a timestamp represented as a long. Similarly in other cases
it might be that ID and Version are different other data types. So we keep
it generic in the API as well, but with the constraint that they must be
Comparable.

As a result the old Persistent DTO is out of date but its being used in a
lot of places thus kept it intact but deprecated it to discourage future
use. In any case since it extends the new abstract class there is no extra
code to maintain.

Also had to modify the codes where stupidly extends and implements were
being used together.

Signed-off-by: Imran M Yousuf <imyousuf@smartitengineering.com>
12 files changed:
smart-cache/src/test/java/com/smartitengineering/dao/common/cache/CacheEventRegistrarTest.java
smart-domain/src/main/java/com/smartitengineering/domain/AbstractGenericPersistentDTO.java [new file with mode: 0644]
smart-domain/src/main/java/com/smartitengineering/domain/AbstractPersistentDTO.java [copied from smart-domain/src/main/java/com/smartitengineering/domain/PersistentDTO.java with 78% similarity]
smart-domain/src/main/java/com/smartitengineering/domain/PersistentDTO.java
smart-hibernate-abstract-dao/src/test/java/com/smartitengineering/dao/impl/hibernate/AbstractDAOTest.java
smart-hibernate-abstract-dao/src/test/java/com/smartitengineering/dao/impl/hibernate/domain/Author.java
smart-hibernate-abstract-dao/src/test/java/com/smartitengineering/dao/impl/hibernate/domain/Book.java
smart-hibernate-abstract-dao/src/test/java/com/smartitengineering/dao/impl/hibernate/domain/Publisher.java
smart-version/smart-version-jgit-impl/src/main/java/com/smartitengineering/version/impl/jgit/domain/Author.java
smart-version/smart-version-jgit-impl/src/main/java/com/smartitengineering/version/impl/jgit/domain/Commit.java
smart-version/smart-version-jgit-impl/src/main/java/com/smartitengineering/version/impl/jgit/domain/Resource.java
smart-version/smart-version-jgit-impl/src/main/java/com/smartitengineering/version/impl/jgit/domain/Revision.java