Class ForumCountHelper

java.lang.Object
ch.tocco.nice2.optional.forum.impl.entitylistener.ForumCountHelper

public abstract class ForumCountHelper extends Object
helper class to check topic status and set topic and post counters
  • Field Details

  • Method Details

    • topicNotArchived

      protected static boolean topicNotArchived(Entity topic)
    • incrementPostCount

      protected static void incrementPostCount(Entity targetEntity)
      add 1 to post_count and set the last_post field to today
      Parameters:
      targetEntity - a forum or topic
    • adjustPostCount

      protected static void adjustPostCount(Entity targetEntity, int amount)
      Parameters:
      targetEntity - a forum or topic
      amount - how much to change the post_count by
    • adjustTopicCount

      protected static void adjustTopicCount(Entity forum, int amount)
      Parameters:
      forum - a forum
      amount - how much to change the topic_count by