Class ForumCountHelper
java.lang.Object
ch.tocco.nice2.optional.forum.impl.entitylistener.ForumCountHelper
helper class to check topic status and set topic and post counters
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
adjustPostCount
(Entity targetEntity, int amount) protected static void
adjustTopicCount
(Entity forum, int amount) protected static void
incrementPostCount
(Entity targetEntity) add 1 to post_count and set the last_post field to todayprotected static boolean
topicNotArchived
(Entity topic)
-
Field Details
-
ARCHIVED_STATUS
- See Also:
-
REL_TOPIC_STATUS
- See Also:
-
UNIQUE_ID_FIELD
- See Also:
-
LAST_POST_FIELD
- See Also:
-
POST_COUNT_FIELD
- See Also:
-
TOPIC_COUNT_FIELD
- See Also:
-
-
Method Details
-
topicNotArchived
-
incrementPostCount
add 1 to post_count and set the last_post field to today- Parameters:
targetEntity
- a forum or topic
-
adjustPostCount
- Parameters:
targetEntity
- a forum or topicamount
- how much to change the post_count by
-
adjustTopicCount
- Parameters:
forum
- a forumamount
- how much to change the topic_count by
-