Class CategoryDAO

    • Constructor Detail

      • CategoryDAO

        protected CategoryDAO()
        Hide constructor of utility class
    • Method Detail

      • deleteUserData

        public void deleteUserData​(String userId)
                            throws SQLException
        Deletes all categories created by a user.
        Parameters:
        userId - the identifier of the user for which the resources must be deleted.
        Throws:
        SQLException - on SQL problem
      • getAllCategoriesByUser

        public List<CategoryDetail> getAllCategoriesByUser​(String userId)
                                                    throws SQLException
        Retrieve all user categories.
        Parameters:
        userId - the user identifier
        Returns:
        categories of user links
        Throws:
        SQLException - on SQL problem
      • getCategory

        public CategoryDetail getCategory​(int id)
                                   throws SQLException
        Retrieve category from its identifier
        Parameters:
        id - the category identifier
        Returns:
        the category detail
        Throws:
        SQLException - on SQL problem
      • deleteCategory

        public void deleteCategory​(int id)
                            throws SQLException
        Remove a category
        Parameters:
        id - the category identifier to remove
        Throws:
        SQLException - on SQL problem