incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [3/5] git commit: api: Fix method name findByXId to findByUuid
Date Wed, 19 Dec 2012 01:44:46 GMT
api: Fix method name findByXId to findByUuid

- findByXId is read as find using some external Id (used by external network devices for ex.)
- what we really need is findByUuid that finds a unique VO using a uuid string

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/ba5fba93
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ba5fba93
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ba5fba93

Branch: refs/heads/api_refactoring
Commit: ba5fba939c1af0f936ac752da280fc040b5bdd09
Parents: 4b75132
Author: Rohit Yadav <bhaisaab@apache.org>
Authored: Tue Dec 18 16:22:37 2012 -0800
Committer: Rohit Yadav <bhaisaab@apache.org>
Committed: Tue Dec 18 17:44:17 2012 -0800

----------------------------------------------------------------------
 utils/src/com/cloud/utils/db/GenericDao.java     |    4 ++--
 utils/src/com/cloud/utils/db/GenericDaoBase.java |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ba5fba93/utils/src/com/cloud/utils/db/GenericDao.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/db/GenericDao.java b/utils/src/com/cloud/utils/db/GenericDao.java
index 082748a..2fae1af 100755
--- a/utils/src/com/cloud/utils/db/GenericDao.java
+++ b/utils/src/com/cloud/utils/db/GenericDao.java
@@ -55,8 +55,8 @@ public interface GenericDao<T, ID extends Serializable> {
     
     T findById(ID id, boolean fresh);
 
-    // Finds a VO object using uuid
-    T findByXId(ID uuid);
+    // Finds one unique VO using uuid
+    T findByUuid(ID uuid);
     
     /**
      * @return VO object ready to be used for update.  It won't have any fields filled in.

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ba5fba93/utils/src/com/cloud/utils/db/GenericDaoBase.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/db/GenericDaoBase.java b/utils/src/com/cloud/utils/db/GenericDaoBase.java
index 6bc49bf..92e9e1c 100755
--- a/utils/src/com/cloud/utils/db/GenericDaoBase.java
+++ b/utils/src/com/cloud/utils/db/GenericDaoBase.java
@@ -915,7 +915,7 @@ public abstract class GenericDaoBase<T, ID extends Serializable>
implements Gene
 
     @Override @DB(txn=false)
     @SuppressWarnings("unchecked")
-    public T findByXId(final ID uuid) {
+    public T findByUuid(final ID uuid) {
         SearchCriteria<T> sc = createSearchCriteria();
         sc.addAnd("uuid", SearchCriteria.Op.EQ, uuid);
         return findOneBy(sc);


Mime
View raw message