code: public Set<Category> getCategories(String pageTitle) throws WikiPageNotFoundException
      {
          if (pageTitle == null || pageTitle.length() == 0) {
              throw new WikiPageNotFoundException();
          }
  
          Session session = this.__getHibernateSession();
          session.beginTransaction();
          List<Integer> categoryHibernateIds = session.createQuery(
                  "select c from Page p left join p.categories c where p.name = :pageTitle", Integer.class)
                  .setParameter("pageTitle", pageTitle).list();
          session.getTransaction().commit();
  
          Set<Category> categorySet = new HashSet<Category>(categoryHibernateIds.size());
          for (int hibernateId : categoryHibernateIds) {
              try {
                  categorySet.add(new Category(this, hibernateId));
              } catch (WikiPageNotFoundException e) {
                  logger.warn("Could not load Category by it's HibernateId = '"+hibernateId+"'");
              }
          }
          return categorySet;
      }
docs: Gets the {@link Category categories} for a given {@link Page} identified by its {@code pageTitle}.
  @param pageTitle The title of a {@link Page}, not a category.
  @return The category objects which are associated with the given {@code pageTitle}.
  @throws WikiPageNotFoundException Thrown if no {@link Page} exists for the given {@code pageTitle}.