Maor Lipchuk has posted comments on this change.

Change subject: core: Exaple: Use UUID for handling database Guids
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/BaseDAODbFacade.java
Line 130:     }
Line 131: 
Line 132:     /**
Line 133:      * Returns a {@link Guid} representing the column's value or a 
<code>null</code>
Line 134:      * if the column was <code>null</code>.
IIUC the value that is being checked in getGuid(..) is a field, not a column.
If I misunderstood it, then probably the comment should be more clearer...
Line 135:      *
Line 136:      * <b>Note:</b> Postgres' driver returns a {@link UUID} when 
{@link ResultSet#getObject(String)} is called on a
Line 137:      * uuid column. This behavior is trusted to work with Postgres 
8.x and 9.x and is used to achieve the best
Line 138:      * performance. If it is ever broken on Postgres' side, this 
method should be rewritten.


Line 134:      * if the column was <code>null</code>.
Line 135:      *
Line 136:      * <b>Note:</b> Postgres' driver returns a {@link UUID} when 
{@link ResultSet#getObject(String)} is called on a
Line 137:      * uuid column. This behavior is trusted to work with Postgres 
8.x and 9.x and is used to achieve the best
Line 138:      * performance. If it is ever broken on Postgres' side, this 
method should be rewritten.
I don't think we should mention the postgres version in the comment,
since it is common since also the behaviour postgres provides reflects on many 
of the operations that we do.
but like I said it is a matter of style.
Line 139:      *
Line 140:      * @param resultSet the ResultSet to extract the result from.
Line 141:      * @param columnName the name of the column.
Line 142:      * @return a {@link Guid} representing the UUID in the column, or 
the default value if it was <code>null</code>.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4d30e1ab7303ecad68dbc9005ac5c6ef733f1707
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to