Roy Golan has posted comments on this change.

Change subject: core: WIP: Adding JPA to ovirt
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/22806/1/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java:

Line 26:  * <code>VdsGroupDAODbFacadeImpl</code> provides an implementation of 
{@link VdsGroupDAO} that uses code previously
Line 27:  * found in {@link org.ovirt.engine.core.dal.dbbroker.DbFacade}.
Line 28:  *
Line 29:  */
Line 30: public class VdsGroupDAODbFacadeImpl extends HibernateFacade 
implements VdsGroupDAO {
> I want to do the change in a transitional way, so I'm not that will be poss
since now we can inject the EntityManager the HibernateFacade can look 
different now.

moreover I think for the CRUD case developers would be tempted to just inject 
the EntityManager into a Command and just use it directly no? 


@Inject EntityManager em;

execute() {
  em.find(...);
  em.save(...);
}

 I don't have experience with Hibernate but it looks like a valid scenraio so 
we may see usage outside the Dao itself

what's your take on that?
Line 31:     @Override
Line 32:     public VDSGroup get(Guid id) {
Line 33:         return getEntityManager().find(VDSGroup.class, id);
Line 34:     }


-- 
To view, visit http://gerrit.ovirt.org/22806
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3cd0bbf9f0913955cb3e1facfa9a4bdc1f1ab24d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa 
<[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[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

Reply via email to