mirror of https://github.com/apache/cloudstack.git
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>
This commit is contained in:
parent
4b75132aa2
commit
ba5fba939c
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue