AccountSearch.and("offering", AccountSearch.entity().getNetworkOfferingId(), Op.EQ);
final SearchBuilder<NetworkAccountVO> join = _accountsDao.createSearchBuilder();
join.and("account", join.entity().getAccountId(), Op.EQ);
AccountSearch.join("accounts", join, AccountSearch.entity().getId(), join.entity().getNetworkId(), JoinBuilder.JoinType.INNER);
AccountSearch.and("datacenter", AccountSearch.entity().getDataCenterId(), Op.EQ);
AccountSearch.and("cidr", AccountSearch.entity().getCidr(), Op.EQ);
RelatedConfigSearch.and("datacenter", RelatedConfigSearch.entity().getDataCenterId(), Op.EQ);
final SearchBuilder<NetworkAccountVO> join2 = _accountsDao.createSearchBuilder();
join2.and("account", join2.entity().getAccountId(), Op.EQ);
RelatedConfigSearch.join("account", join2, join2.entity().getNetworkId(), RelatedConfigSearch.entity().getId(), JoinType.INNER);
RelatedConfigSearch.done();
AccountNetworkSearch.and("networkId", AccountNetworkSearch.entity().getId(), Op.EQ);
final SearchBuilder<NetworkAccountVO> mapJoin = _accountsDao.createSearchBuilder();
mapJoin.and("accountId", mapJoin.entity().getAccountId(), Op.EQ);
AccountNetworkSearch.join("networkSearch", mapJoin, AccountNetworkSearch.entity().getId(), mapJoin.entity().getNetworkId(), JoinBuilder.JoinType.INNER);
AccountNetworkSearch.done();
NetworksRegularUserCanCreateSearch.select(null, Func.COUNT, NetworksRegularUserCanCreateSearch.entity().getId());
final SearchBuilder<NetworkAccountVO> join4 = _accountsDao.createSearchBuilder();
join4.and("account", join4.entity().getAccountId(), Op.EQ);
join4.and("isOwner", join4.entity().isOwner(), Op.EQ);
NetworksRegularUserCanCreateSearch.join("accounts", join4, NetworksRegularUserCanCreateSearch.entity().getId(), join4.entity().getNetworkId(),
JoinBuilder.JoinType.INNER);
final SearchBuilder<NetworkOfferingVO> join5 = _ntwkOffDao.createSearchBuilder();
.getId(), JoinBuilder.JoinType.LEFT);
final SearchBuilder<NetworkAccountVO> ntwkAccountJoin = _accountsDao.createSearchBuilder();