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);
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();
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();
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();
final SearchBuilder<NetworkAccountVO> ntwkAccountJoin = _accountsDao.createSearchBuilder();
ntwkAccountJoin.and("accountId", ntwkAccountJoin.entity().getAccountId(), Op.EQ);
OfferingAccountNetworkSearch.join("ntwkAccountSearch", ntwkAccountJoin, OfferingAccountNetworkSearch.entity().getId(), ntwkAccountJoin.entity().getNetworkId(),
JoinBuilder.JoinType.INNER);
OfferingAccountNetworkSearch.and("zoneId", OfferingAccountNetworkSearch.entity().getDataCenterId(), Op.EQ);