Class BlogCategoryServiceImpl

    • Constructor Detail

      • BlogCategoryServiceImpl

        public BlogCategoryServiceImpl()
    • Method Detail

      • searchCategories

        public java.util.List<BlogCategory> searchCategories​(java.lang.String query,
                                                             java.lang.String from,
                                                             java.lang.String to)
        Description copied from interface: BlogCategoryService
        This method does search requests and returns data as list.
        Specified by:
        searchCategories in interface BlogCategoryService
        Parameters:
        query - search query
        from - field which filter and returned items
        to - field which filter and returned items
        Returns:
        database entities as list
      • createCategory

        @Transactional
        public java.util.Optional<BlogCategory> createCategory​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> categoryAsMap)
        Description copied from interface: BlogCategoryService
        This method creates a database entity.
        Specified by:
        createCategory in interface BlogCategoryService
        Parameters:
        categoryAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • addChildCategory

        @Transactional
        public BlogCategory addChildCategory​(java.lang.String parentId,
                                             java.lang.String childId)
        Description copied from interface: BlogCategoryService
        This method does add child entity in parent entity.
        Specified by:
        addChildCategory in interface BlogCategoryService
        Parameters:
        parentId - identification for database entity which will be updated
        childId - identification for database entity which will be added in parent database entity
        Returns:
        database entity
      • updateCategory

        @Transactional
        public BlogCategory updateCategory​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> categoryAsMap)
        Description copied from interface: BlogCategoryService
        This method updates of database entity.
        Specified by:
        updateCategory in interface BlogCategoryService
        Parameters:
        categoryAsMap - map-representation of database entity
        Returns:
        updated instance of database entity
      • addRelations

        private void addRelations​(BlogCategory categoryUI)
      • removeCategoryFromTranslation

        @Transactional
        public void removeCategoryFromTranslation​(java.lang.String categoryId,
                                                  java.lang.String translationId)
        Description copied from interface: BlogCategoryService
        This method removes relationship between database entities.
        Specified by:
        removeCategoryFromTranslation in interface BlogCategoryService
        Parameters:
        categoryId - identification for database entity which will be removed
        translationId - identification for database entity which will be updated
      • removeCategoryWithDescendants

        @Transactional
        public void removeCategoryWithDescendants​(java.lang.String itemId)
        Description copied from interface: BlogCategoryService
        This method removes database entity with child database entity.
        Specified by:
        removeCategoryWithDescendants in interface BlogCategoryService
        Parameters:
        itemId - identification for child database entity which will be removed and whose parent entity will be removed
      • removeContainerFromBlogCategory

        @Transactional
        public void removeContainerFromBlogCategory​(java.lang.String containerId,
                                                    java.lang.String categoryId)
        Description copied from interface: BlogCategoryService
        This method removes relationship between database entities.
        Specified by:
        removeContainerFromBlogCategory in interface BlogCategoryService
        Parameters:
        containerId - identification for database entity which will be removed
        categoryId - identification for database entity which will be updated
      • removeCategoriesByIds

        @Transactional
        public void removeCategoriesByIds​(java.util.ArrayList<java.lang.String> categoriesIds)
        Description copied from interface: BlogCategoryService
        This method removes a list of database entities.
        Specified by:
        removeCategoriesByIds in interface BlogCategoryService
        Parameters:
        categoriesIds - the list of database entities which will be removed
      • rebuildAllCategories

        @Transactional
        public java.util.List<BlogCategory> rebuildAllCategories​(java.util.ArrayList<java.lang.Object> categories)
        Description copied from interface: BlogCategoryService
        This method rebuilds a list of database entities.
        Specified by:
        rebuildAllCategories in interface BlogCategoryService
        Parameters:
        categories - the list of database entities which will be removed and updated
        Returns:
        list of blog categories