Interface OrgUnitDao<T extends OrgUnitModel>

    • Method Detail

      • findRootUnits

        <U extends OrgUnitModel> java.util.List<U> findRootUnits​(java.lang.Class<U> type,
                                                                 PageableData pageableData)
        Find all root units of the given type, i.e. the ones that don't have a parent unit of the same type.
        Parameters:
        type - the type to find root units for
        pageableData - paging information
        Returns:
        paged search results
      • findMembersOfType

        <U extends PrincipalModelSearchPageData<U> findMembersOfType​(OrgUnitModel unit,
                                                                       java.lang.Class<U> memberType,
                                                                       PageableData pageableData)
        Find all unit members of a given type.
        Parameters:
        unit - the unit to find all members for
        memberType - the model type of the members to find
        pageableData - paging information
        Returns:
        paged search results
      • findMembersOfType

        <U extends PrincipalModelSearchPageData<U> findMembersOfType​(java.lang.Class<U> memberType,
                                                                       PageableData pageableData,
                                                                       java.lang.String... orgUnitUids)
        Find all units members of a given type.
        Type Parameters:
        U - the generic type
        Parameters:
        memberType - the model type of the members to find
        pageableData - paging information
        orgUnitUids - the orgUnit uids to find all members for
        Returns:
        SearchPageData the search page data
      • findQuotesForEmployee

        SearchPageData<QuoteModel> findQuotesForEmployee​(EmployeeModel employee,
                                                         java.util.Set<QuoteState> states,
                                                         PageableData pageableData)
        Returns all QuoteModel instances associated with at least one of the given employee's units.
        Parameters:
        employee - an employee who is a member of an organizational unit
        pageableData - paging information
        Returns:
        SearchPageData containing the paged search result
      • findAllUnits

        <U extends OrgUnitModelSearchPageData<U> findAllUnits​(java.util.List<U> units,
                                                                PageableData pageableData)
        Find all units in the branches.
        Type Parameters:
        U - the generic type
        Parameters:
        units - the start point units to find their branches units
        pageableData - paging information
        Returns:
        SearchPageData the search page data