public class ForumDaoJdbc extends Object
Constructor and Description |
---|
ForumDaoJdbc() |
Modifier and Type | Method and Description |
---|---|
void |
decreasePostedMessages(String topicId,
ITransaction transaction)
Decrease the count of messages (by one) on the specified topic and it's forum.
|
void |
decreasePostedTopics(String topicId,
ITransaction transaction)
Decrease the count of messages from the specified topic on it's forum.
|
ForumCategoryConfig |
getCategory(String categoryId,
ITransaction transaction)
Gets the
ForumCategoryConfig for the specified categoryId. |
String |
getContentIdByPrimaryKey(String primaryKeyValue)
Returns the contentId corresponding to the given primary key.
|
ForumConfig |
getForum(String forumId,
ITransaction transaction) |
String |
getForumIdByTopicId(String topicId,
ITransaction transaction) |
Collection<String> |
getForumIdsByCategory(String categoryContentId,
ITransaction transaction) |
Collection<String> |
getForumTopicIds(String forumContentId,
ITransaction transaction) |
String |
getLastPostedMessageId(String topicContentId,
String excludedMessageId,
ITransaction transaction)
Returns the id of the last message posted on the specified topic.
|
String |
getLastPostedTopicId(String forumContentId,
String excludedTopicId,
ITransaction transaction)
Returns the id of the last updated topic on the specified forum.
|
ForumMessageConfig |
getMessage(String messageId,
ITransaction transaction)
Gets the
ForumMessageConfig for the specified message id. |
String |
getPrimaryKeyByContentId(String contentId)
Returns the primary key through the given contentId.
|
ForumTopicConfig |
getTopic(String topicId,
ITransaction transaction)
Gets the
ForumTopicConfig for the specified topicId. |
void |
increasePostedMessages(String topicId,
ITransaction transaction)
Increase topic and forum's message counters.
|
void |
increasePostedTopics(String topicId,
ITransaction transaction)
Increase the forum's topic counter.
|
void |
increaseTopicViews(String topicId,
ITransaction transaction)
Increase the topic view counter.
|
void |
setForumLastMessageInfo(String forumId,
String lastTopicUser,
Timestamp lastTopicDate,
ITransaction transaction)
Sets the forum's last message post date and user.
|
void |
setForumState(String forumId,
int state,
ITransaction transaction) |
void |
setTopicFirstMessage(String topicId,
String messageId,
ITransaction transaction)
Updates the topic's firstMessageId colum with the specified messageId.
|
void |
setTopicLastMessageInfo(String topicId,
String lastMessageUser,
Timestamp lastMessageDate,
ITransaction transaction)
Sets the topic's last message post date and user.
|
void |
setTopicState(String topicId,
int state,
ITransaction transaction)
Sets the topic state.
|
void |
setTopicSubject(String topicId,
String subject,
ITransaction transaction)
Updates the topic subject.
|
public String getForumIdByTopicId(String topicId, ITransaction transaction) throws PortalException
PortalException
public String getPrimaryKeyByContentId(String contentId)
contentId
- the content identifier.public String getContentIdByPrimaryKey(String primaryKeyValue) throws PortalException
primaryKeyValue
- the primary key.PortalException
public void setTopicSubject(String topicId, String subject, ITransaction transaction) throws PortalException
topicId
- subject
- transaction
- PortalException
public void setTopicFirstMessage(String topicId, String messageId, ITransaction transaction) throws PortalException
topicId
- messageId
- transaction
- PortalException
public void increasePostedTopics(String topicId, ITransaction transaction) throws PortalException
topicId
- transaction
- PortalException
public void increasePostedMessages(String topicId, ITransaction transaction) throws PortalException
topicId
- transaction
- PortalException
public void decreasePostedTopics(String topicId, ITransaction transaction) throws PortalException
topicId
- transaction
- PortalException
public void decreasePostedMessages(String topicId, ITransaction transaction) throws PortalException
topicId
- transaction
- PortalException
public String getLastPostedTopicId(String forumContentId, String excludedTopicId, ITransaction transaction) throws PortalException
forumContentId
- excludedTopicId
- transaction
- PortalException
public String getLastPostedMessageId(String topicContentId, String excludedMessageId, ITransaction transaction) throws PortalException
topicContentId
- the topic content identifier.excludedMessageId
- transaction
- PortalException
public void setTopicLastMessageInfo(String topicId, String lastMessageUser, Timestamp lastMessageDate, ITransaction transaction) throws PortalException
topicId
- lastMessageUser
- lastMessageDate
- transaction
- PortalException
public void setForumLastMessageInfo(String forumId, String lastTopicUser, Timestamp lastTopicDate, ITransaction transaction) throws PortalException
forumId
- lastTopicUser
- lastTopicDate
- transaction
- PortalException
public ForumTopicConfig getTopic(String topicId, ITransaction transaction) throws PortalException
ForumTopicConfig
for the specified topicId.topicId
- transaction
- PortalException
public ForumMessageConfig getMessage(String messageId, ITransaction transaction) throws PortalException
ForumMessageConfig
for the specified message id.messageId
- transaction
- PortalException
public ForumCategoryConfig getCategory(String categoryId, ITransaction transaction) throws PortalException
ForumCategoryConfig
for the specified categoryId.categoryId
- transaction
- PortalException
public ForumConfig getForum(String forumId, ITransaction transaction) throws PortalException
PortalException
public void increaseTopicViews(String topicId, ITransaction transaction) throws PortalException
topicId
- the topic identifier.transaction
- the transaction for persistence access.PortalException
public void setTopicState(String topicId, int state, ITransaction transaction) throws PortalException
topicId
- the topic identifier.state
- the state to set.transaction
- the transaction for persistence access.PortalException
public void setForumState(String forumId, int state, ITransaction transaction) throws PortalException
PortalException
public Collection<String> getForumTopicIds(String forumContentId, ITransaction transaction) throws PortalException
PortalException
public Collection<String> getForumIdsByCategory(String categoryContentId, ITransaction transaction) throws PortalException
PortalException
LumisXP 12.1.0.191010 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.