txn.start();
SearchByUUID.and("uuid", SearchByUUID.entity().getUuid(), SearchCriteria.Op.EQ);
SearchByUUID.done();
SearchCriteria<CloudStackAccountVO> sc = SearchByUUID.create();
sc.setParameters("uuid", accountId);
CloudStackAccountVO account = findOneBy(sc);
if (null != account)
if (null != account.getDefaultZoneId())
return Long.toString(account.getDefaultZoneId());
return null;
} finally {
txn.commit();
txn.close();
}