Yevgeny Zaspitsky has posted comments on this change. Change subject: core: Add JPA Java infrastructure ......................................................................
Patch Set 60: (2 comments) https://gerrit.ovirt.org/#/c/33835/60/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/HibernateTemplate.java File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/HibernateTemplate.java: Line 19: HibernateTemplate > 2. Done This can't be a singleton as its single constructor has an argument that will be supplied by each DAO, therefor it can't be injected and we need a factory for that EM will be injected into it and it'll be passed to the instance of HT. If we wont this class be a singleton we can pass Class or entity name parameter through methods interface like Spring's JpaTemplate does. Line 107: multiResults > No - because in some places we use queries that don't return the type you d Then using T parameter is irrelevant here. We should change the method signature to: public <R> List<R> multiResult(TypedQuery<R> query) If we doing this I'd reconsider having T as a class parameter and would think of making similar to Spring's JpaTemplate -- To view, visit https://gerrit.ovirt.org/33835 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ide82bf8cc647426e37dc42a113867c52699c3f0b Gerrit-PatchSet: 60 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liran Zelkha <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Liran Zelkha <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: Yevgeny Zaspitsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
