Interface OrgUnitDao<T extends OrgUnitModel>

All Superinterfaces:
PagedGenericDao<T>
All Known Implementing Classes:
DefaultB2BOrgUnitDao, DefaultOrgUnitDao

public interface OrgUnitDao<T extends OrgUnitModel> extends PagedGenericDao<T>
Interface for OrgUnitModel related paged data access.
  • Method Details

    • findRootUnits

      <U extends OrgUnitModel> List<U> findRootUnits(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 PrincipalModel> SearchPageData<U> findMembersOfType(OrgUnitModel unit, 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 PrincipalModel> SearchPageData<U> findMembersOfType(Class<U> memberType, PageableData pageableData, 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, 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 OrgUnitModel> SearchPageData<U> findAllUnits(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