org.exoplatform.social.client.core.model
Class RestCommentImpl

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by org.json.simple.JSONObject
              extended by org.exoplatform.social.client.core.model.ModelImpl
                  extended by org.exoplatform.social.client.core.model.RestCommentImpl
All Implemented Interfaces:
Serializable, Cloneable, Map, Model, RestComment, org.json.simple.JSONAware, org.json.simple.JSONStreamAware

public class RestCommentImpl
extends ModelImpl
implements RestComment

Implementation of RestComment.

Since:
May 26, 2011
Author:
hoatle (hoatlevan at gmail dot com)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface org.exoplatform.social.client.api.model.RestComment
RestComment.Field
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.exoplatform.social.client.core.model.ModelImpl
propertyChanges
 
Constructor Summary
RestCommentImpl()
          Constructor without any params.
RestCommentImpl(String id, String identityId, String activityId, Long postedTime, String createdAt)
          Constructor.
 
Method Summary
 RestActivity getActivity()
          Gets the activity is associated with this comment.
 String getActivityId()
          Gets the activity id which is associated with this comment.
 String getCreatedAt()
          Gets the created at of this comment as a time string value.
 String getId()
          Gets the comment id.
 RestIdentity getIdentity()
          Gets the identity who commented.
 String getIdentityId()
          Gets identity id who posted this comment.
 Long getPostedTime()
          Gets the posted time of this comment as timestamp value.
 RestIdentity getPosterIdentity()
          Gets the identity who commented.
 String getText()
          Gets the comment content.
 void setActivityId(String activityId)
          Sets the activity which is associated with this comment.
 void setCreatedAt(String createdAt)
          Sets the created at of this comment as a time string value.
 void setId(String id)
          Sets the comment id.
 void setIdentityId(String identityId)
          Sets identity id who posted this comment.
 void setPostedTime(Long postedTime)
          Sets the posted time of this comment as timestamp value.
 void setPosterIdentity(RestIdentity restIdentity)
          Sets the identity who commented.
 void setText(String content)
          Sets the comment content.
 
Methods inherited from class org.exoplatform.social.client.core.model.ModelImpl
addPropertyChangeListener, addToListField, findPropertyChangeListeners, getField, getFieldAsList, getFieldAsMap, getFieldAsString, getFieldNames, hasField, isFieldMultikeyed, isFieldMultivalued, removePropertyChangeListener, setField
 
Methods inherited from class org.json.simple.JSONObject
escape, toJSONString, toJSONString, toString, toString, writeJSONString, writeJSONString
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.exoplatform.social.client.api.model.Model
addPropertyChangeListener, addToListField, findPropertyChangeListeners, getField, getFieldAsList, getFieldAsMap, getFieldAsString, getFieldNames, hasField, isFieldMultikeyed, isFieldMultivalued, removePropertyChangeListener, setField
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from interface org.json.simple.JSONAware
toJSONString
 
Methods inherited from interface org.json.simple.JSONStreamAware
writeJSONString
 

Constructor Detail

RestCommentImpl

public RestCommentImpl()
Constructor without any params.


RestCommentImpl

public RestCommentImpl(String id,
                       String identityId,
                       String activityId,
                       Long postedTime,
                       String createdAt)
Constructor.

Parameters:
id - the comment id
identityId - the identity id
activityId - the activity id
postedTime - the posted time
Method Detail

getId

public String getId()
Gets the comment id.

Specified by:
getId in interface RestComment
Returns:
the comment id

setId

public void setId(String id)
Sets the comment id.

Specified by:
setId in interface RestComment
Parameters:
id - the comment id

getIdentityId

public String getIdentityId()
Gets identity id who posted this comment.

Specified by:
getIdentityId in interface RestComment
Returns:
the identity id

setIdentityId

public void setIdentityId(String identityId)
Sets identity id who posted this comment.

Specified by:
setIdentityId in interface RestComment
Parameters:
identityId - the identity id

getActivityId

public String getActivityId()
Gets the activity id which is associated with this comment.

Specified by:
getActivityId in interface RestComment
Returns:
the activity id.

setActivityId

public void setActivityId(String activityId)
Sets the activity which is associated with this comment.

Specified by:
setActivityId in interface RestComment
Parameters:
activityId - the activity id

getText

public String getText()
Gets the comment content.

Specified by:
getText in interface RestComment
Returns:
the comment content.

setText

public void setText(String content)
Sets the comment content.

Specified by:
setText in interface RestComment
Parameters:
content - the comment content

getPostedTime

public Long getPostedTime()
Gets the posted time of this comment as timestamp value.

Specified by:
getPostedTime in interface RestComment
Returns:
the posted time of this comment

setPostedTime

public void setPostedTime(Long postedTime)
Sets the posted time of this comment as timestamp value.

Specified by:
setPostedTime in interface RestComment
Parameters:
postedTime - the posted time of this comment.

getCreatedAt

public String getCreatedAt()
Gets the created at of this comment as a time string value.

Specified by:
getCreatedAt in interface RestComment
Returns:
the time string value

setCreatedAt

public void setCreatedAt(String createdAt)
Sets the created at of this comment as a time string value.

Specified by:
setCreatedAt in interface RestComment
Parameters:
createdAt - the time string value

getActivity

public RestActivity getActivity()
Gets the activity is associated with this comment. This must be lazy loading for better performance.

Specified by:
getActivity in interface RestComment
Returns:
the activity

getIdentity

public RestIdentity getIdentity()
Gets the identity who commented. This must be lazy loading for better performance.

Specified by:
getIdentity in interface RestComment
Returns:
the identity

getPosterIdentity

public RestIdentity getPosterIdentity()
Gets the identity who commented. if poster identity is null this will be lazy loading the identity from Rest.

Specified by:
getPosterIdentity in interface RestComment
Returns:

setPosterIdentity

public void setPosterIdentity(RestIdentity restIdentity)
Sets the identity who commented.

Specified by:
setPosterIdentity in interface RestComment


Copyright © 2011 eXo Platform. All Rights Reserved.