Skip to content

Commit ba5fba9

Browse files
committed
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>
1 parent 4b75132 commit ba5fba9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

utils/src/com/cloud/utils/db/GenericDao.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public interface GenericDao<T, ID extends Serializable> {
5555

5656
T findById(ID id, boolean fresh);
5757

58-
// Finds a VO object using uuid
59-
T findByXId(ID uuid);
58+
// Finds one unique VO using uuid
59+
T findByUuid(ID uuid);
6060

6161
/**
6262
* @return VO object ready to be used for update. It won't have any fields filled in.

utils/src/com/cloud/utils/db/GenericDaoBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ public T findById(final ID id) {
915915

916916
@Override @DB(txn=false)
917917
@SuppressWarnings("unchecked")
918-
public T findByXId(final ID uuid) {
918+
public T findByUuid(final ID uuid) {
919919
SearchCriteria<T> sc = createSearchCriteria();
920920
sc.addAnd("uuid", SearchCriteria.Op.EQ, uuid);
921921
return findOneBy(sc);

0 commit comments

Comments
 (0)