public class Thread extends Object
| Constructor and Description |
|---|
Thread()
Default constructor.
|
Thread(long threadId,
String communityId,
String userId,
Date creationDate,
String topic)
Full constructor.
|
Thread(String communityId,
String userId,
String topic)
Constructor used for creating a new thread; sets thread id to null and creation date to current date.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCommunityId()
Get the community id.
|
Date |
getCreationDate()
Get the creation date.
|
List<Post> |
getPosts()
Get the posts.
|
long |
getThreadId()
Get the thread id.
|
String |
getTopic()
Get the topic.
|
String |
getUserId()
Get the user id.
|
void |
setCommunityId(String communityId)
Set the community id.
|
void |
setCreationDate(Date creationDate)
Set the creation date.
|
void |
setPosts(List<Post> posts)
Set the posts.
|
void |
setThreadId(long threadId)
Set the thread id.
|
void |
setTopic(String topic)
Set the topic.
|
void |
setUserId(String userId)
Set the user id.
|
public Thread()
public Thread(long threadId,
String communityId,
String userId,
Date creationDate,
String topic)
threadId - the id of this threadcommunityId - the id of the community this thread belongs touserId - the id of the user that created this threadcreationDate - the date that this thread was createdtopic - the topic of this threadpublic Thread(String communityId, String userId, String topic)
communityId - the id of the community this thread belongs touserId - the id of the user that created this threadtopic - the topic of this threadpublic long getThreadId()
public void setThreadId(long threadId)
threadId - the new id of this threadpublic String getCommunityId()
public void setCommunityId(String communityId)
communityId - the id of the new community this thread belongs topublic String getUserId()
public void setUserId(String userId)
userId - the id of the new user that created this threadpublic Date getCreationDate()
public void setCreationDate(Date creationDate)
creationDate - the new date that this thread was createdpublic String getTopic()
public void setTopic(String topic)
topic - the new topic of this threadCopyright © 2017. All rights reserved.