Class DefaultOrgUnitDao<T extends OrgUnitModel>

    • Field Detail

      • QUOTE_DISTINCT_CODE_MAX_VERSION_QUERY

        protected static final java.lang.String QUOTE_DISTINCT_CODE_MAX_VERSION_QUERY
        Sub-query that makes sure only the latest version for each distinct quote code is returned.
        See Also:
        Constant Field Values
      • QUOTE_TO_EMPLOYEE_JOINS

        protected static final java.lang.String QUOTE_TO_EMPLOYEE_JOINS
        Joining the quote table with other tables (e.g. PrincipipalGroupRelation), so that all quotes associated to the employee's organizational units can be resolved.
        See Also:
        Constant Field Values
      • QUOTE_FOR_EMPLOYEE_QUERY_FORMAT

        protected static final java.lang.String QUOTE_FOR_EMPLOYEE_QUERY_FORMAT
        Query template to retrieve quotes associated to an employee. Takes a JOIN statement used to define the relation between quote and employee as a first argument and an additional clause to narrow down the result set as a second argument.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultOrgUnitDao

        public DefaultOrgUnitDao​(java.lang.String typeCode)
    • Method Detail

      • findRootUnits

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

        public <U extends PrincipalModelSearchPageData<U> findMembersOfType​(OrgUnitModel unit,
                                                                              java.lang.Class<U> memberType,
                                                                              PageableData pageableData)
        Description copied from interface: OrgUnitDao
        Find all unit members of a given type.
        Specified by:
        findMembersOfType in interface OrgUnitDao<T extends OrgUnitModel>
        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

        public <U extends PrincipalModelSearchPageData<U> findMembersOfType​(java.lang.Class<U> memberType,
                                                                              PageableData pageableData,
                                                                              java.lang.String... orgUnitUids)
        Description copied from interface: OrgUnitDao
        Find all units members of a given type.
        Specified by:
        findMembersOfType in interface OrgUnitDao<T extends OrgUnitModel>
        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
      • getQuoteForEmployeeQuery

        protected java.lang.String getQuoteForEmployeeQuery()
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)