class CaseService extends RecordService {

    public List<Long> getGBVSearchResult(String shortId, String name, String location, Date registrationDate) {
        ConditionGroup conditionGroup = ConditionGroup.clause();
        conditionGroup.and(Condition.column(NameAlias.builder(RecordModel.COLUMN_OWNED_BY).build())
                .eq(PrimeroAppConfiguration.getCurrentUser().getUsername()));

        if (!TextUtils.isEmpty(shortId)) {
            conditionGroup.and(Condition.column(NameAlias.builder(RecordModel.COLUMN_SHORT_ID).build())
                    .like(getWrappedCondition(shortId)));
        }
        //      TODO
        if (!TextUtils.isEmpty(location)) {
            conditionGroup.and(Condition.column(NameAlias.builder(RecordModel.COLUMN_LOCATION).build())
                    .like(getWrappedCondition(location)));
        }
        if (registrationDate != null) {
            conditionGroup.and(Condition.column(NameAlias.builder(Case.COLUMN_REGISTRATION_DATE)
                    .build()).eq(registrationDate));
        }
        if (!TextUtils.isEmpty(name)) {
            conditionGroup.and(Condition.column(NameAlias.builder(RecordModel.COLUMN_NAME).build())
                    .like(getWrappedCondition(name)));
        }
        return extractIds(caseDao.getCaseListByConditionGroup(PrimeroAppConfiguration.getCurrentUsername(),
                PrimeroAppConfiguration.getApiBaseUrl(), conditionGroup));
    }

    public  CaseService(CaseDao caseDao, CasePhotoDao casePhotoDao, IncidentDao incidentDao);

}