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);
RelatedConfigSearch.and("offering", RelatedConfigSearch.entity().getNetworkOfferingId(), 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);
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);
NetworksRegularUserCanCreateSearch.and("displayNetwork", NetworksRegularUserCanCreateSearch.entity().getDisplayNetwork(), Op.EQ);
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);
OfferingAccountNetworkSearch.join("ntwkOfferingSearch", ntwkOfferingJoin, OfferingAccountNetworkSearch.entity().getNetworkOfferingId(), ntwkOfferingJoin.entity()
.getId(), JoinBuilder.JoinType.LEFT);
final SearchBuilder<NetworkAccountVO> ntwkAccountJoin = _accountsDao.createSearchBuilder();
ntwkAccountJoin.and("accountId", ntwkAccountJoin.entity().getAccountId(), Op.EQ);
OfferingAccountNetworkSearch.join("ntwkAccountSearch", ntwkAccountJoin, OfferingAccountNetworkSearch.entity().getId(), ntwkAccountJoin.entity().getNetworkId(),