protected ProjectAccountDaoImpl() { AllFieldsSearch = createSearchBuilder(); AllFieldsSearch.and("role", AllFieldsSearch.entity().getAccountRole(), SearchCriteria.Op.EQ); AllFieldsSearch.and("projectId", AllFieldsSearch.entity().getProjectId(), SearchCriteria.Op.EQ); AllFieldsSearch.and("accountId", AllFieldsSearch.entity().getAccountId(), SearchCriteria.Op.EQ); AllFieldsSearch.and("projectAccountId", AllFieldsSearch.entity().getProjectAccountId(), SearchCriteria.Op.EQ); AllFieldsSearch.done(); AdminSearch = createSearchBuilder(Long.class); AdminSearch.selectFields(AdminSearch.entity().getProjectId()); AdminSearch.and("role", AdminSearch.entity().getAccountRole(), Op.EQ); AdminSearch.and("accountId", AdminSearch.entity().getAccountId(), Op.EQ); AdminSearch.done(); ProjectAccountSearch = createSearchBuilder(Long.class); ProjectAccountSearch.selectFields(ProjectAccountSearch.entity().getProjectAccountId()); ProjectAccountSearch.and("accountId", ProjectAccountSearch.entity().getAccountId(), Op.EQ); ProjectAccountSearch.done(); CountByRoleSearch = createSearchBuilder(Long.class); CountByRoleSearch.select(null, Func.COUNT, CountByRoleSearch.entity().getId()); CountByRoleSearch.and("accountId", CountByRoleSearch.entity().getAccountId(), Op.EQ); CountByRoleSearch.and("role", CountByRoleSearch.entity().getAccountRole(), Op.EQ); CountByRoleSearch.done(); }