Maor Lipchuk has posted comments on this change.

Change subject: core: introduce LibvirtSecretDao
......................................................................


Patch Set 4:

(2 comments)

https://gerrit.ovirt.org/#/c/41551/4/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/LibvirtSecretDao.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/LibvirtSecretDao.java:

Line 7: 
Line 8: /**
Line 9:  * <code>LibvirtSecretDao</code> defines a type which performs CRUD 
operations on instances of {@link LibvirtSecret}.
Line 10:  */
Line 11: public interface LibvirtSecretDao extends DAO, 
GenericDao<LibvirtSecret, Guid> {
1. No need to extend DAO, GenericDao already extends it (actually ReadDao).
2. There is no need to use save, update, remove and get, this should already be 
done with generic DAO
Line 12:     /**
Line 13:      * Retrieves the secret with the specified id.
Line 14:      *
Line 15:      * @param id the id


https://gerrit.ovirt.org/#/c/41551/4/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/LibvirtSecretDaoDbFacadeImpl.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/LibvirtSecretDaoDbFacadeImpl.java:

Line 30:                 .addValue("secret_value", 
DbFacadeUtils.encryptPassword(entity.getValue()))
Line 31:                 .addValue("secret_usage_type", entity.getUsageType())
Line 32:                 .addValue("secret_description", 
entity.getDescription())
Line 33:                 .addValue("provider_id", entity.getProviderId())
Line 34:                 .addValue("_create_date", entity.getCreationDate());
_create_date has a default value in the DB.
either remove the create_date default from the DB script, or remove this 
instead.
Probably better to just remove this default declaration from the DB.
Line 35:     }
Line 36: 
Line 37:     @Override
Line 38:     protected MapSqlParameterSource createIdParameterMapper(Guid uuid) 
{


-- 
To view, visit https://gerrit.ovirt.org/41551
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I33625086f2f7bcaef755b8e75b8ba07f688f33b2
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to