G
Giovanni Azua
hi all,
I was playing a bit with these three implementations in order to provide
another Generic Dao implementation other than Hibernate for the next release
of perfectjpattern. My conclusion was to go for EclipseLink rather than the
other two and the reasons are the following:
1-. EclipseLink has a open source friendly license (Eclipse Public License)
2-. EclipseLink has internal support for JPA API whereas pure TopLink does
not support some of the JPA API's e.g.
a) Creating explicit DatabaseQuery out of aSqlString corresponding to JPA
EntityManager.createQuery(aSqlString) API, you are kind of responsible to
create the appropriate DatabaseQuery subclass according to the aSqlString
e.g. new ReportQuery, ReadAllQuery or any of the other which is kind of
awkward, you would be doing a parser's job here ...
b) Pure TopLink seems not to support JPQL e.g. I tried many of its API e.g.
UnitOfWork.executeQuery and does not recognize entity names
c) Did not find any implementations of EntityManager in TopLink's source
code.
3-. EclipseLink ReadAllQuery supports the required "setExampleObject" for
implementing the DAO's findByExample.
4-. EclipseLink releases have a proper Maven 2 repository while
TopLink/TopLink Essentials do not really (they are outdated or require
manual installations)
5-. EclipseLink offers a superset of both TopLink and TopLink Essentials
e.g. OR mapping using the Workbench and TableCreator whereas Essentials does
not.
TopLink and TopLink Essentials seem two parallel branches of the same thing
but Essentials is hardly a subset of the full TopLink product:
- TopLink has support for findByExample but not a full JPA implementation
- Essentials implements JPA but does not offer findByExample neither support
for integration with TopLink Workbench e.g. TableCreator functionality.
Any advice or feedback about this would be nice.
Thanks in advance,
Best regards,
Giovanni
PS: I did not consider OpenJPA for a GenericDao implementation because it
seems not to support the functionality needed for findByExample. On the
other hand OpenJPA can be directly plugged into the BaseDao implementation.
I was playing a bit with these three implementations in order to provide
another Generic Dao implementation other than Hibernate for the next release
of perfectjpattern. My conclusion was to go for EclipseLink rather than the
other two and the reasons are the following:
1-. EclipseLink has a open source friendly license (Eclipse Public License)
2-. EclipseLink has internal support for JPA API whereas pure TopLink does
not support some of the JPA API's e.g.
a) Creating explicit DatabaseQuery out of aSqlString corresponding to JPA
EntityManager.createQuery(aSqlString) API, you are kind of responsible to
create the appropriate DatabaseQuery subclass according to the aSqlString
e.g. new ReportQuery, ReadAllQuery or any of the other which is kind of
awkward, you would be doing a parser's job here ...
b) Pure TopLink seems not to support JPQL e.g. I tried many of its API e.g.
UnitOfWork.executeQuery and does not recognize entity names
c) Did not find any implementations of EntityManager in TopLink's source
code.
3-. EclipseLink ReadAllQuery supports the required "setExampleObject" for
implementing the DAO's findByExample.
4-. EclipseLink releases have a proper Maven 2 repository while
TopLink/TopLink Essentials do not really (they are outdated or require
manual installations)
5-. EclipseLink offers a superset of both TopLink and TopLink Essentials
e.g. OR mapping using the Workbench and TableCreator whereas Essentials does
not.
TopLink and TopLink Essentials seem two parallel branches of the same thing
but Essentials is hardly a subset of the full TopLink product:
- TopLink has support for findByExample but not a full JPA implementation
- Essentials implements JPA but does not offer findByExample neither support
for integration with TopLink Workbench e.g. TableCreator functionality.
Any advice or feedback about this would be nice.
Thanks in advance,
Best regards,
Giovanni
PS: I did not consider OpenJPA for a GenericDao implementation because it
seems not to support the functionality needed for findByExample. On the
other hand OpenJPA can be directly plugged into the BaseDao implementation.