org.springframework.social.twitter.api
Class Tweet

java.lang.Object
  extended by org.springframework.social.twitter.api.TwitterObject
      extended by org.springframework.social.twitter.api.Tweet
All Implemented Interfaces:
Serializable

public class Tweet
extends TwitterObject
implements Serializable

Represents a Twitter status update (e.g., a "tweet").

See Also:
Serialized Form

Constructor Summary
Tweet(long id, String text, Date createdAt, String fromUser, String profileImageUrl, Long toUserId, long fromUserId, String languageCode, String source)
           
 
Method Summary
 boolean equals(Object o)
           
 Date getCreatedAt()
           
 Entities getEntities()
           
 Integer getFavoriteCount()
           
 String getFromUser()
           
 long getFromUserId()
           
 long getId()
           
 String getInReplyToScreenName()
           
 Long getInReplyToStatusId()
           
 Long getInReplyToUserId()
           
 String getLanguageCode()
           
 String getProfileImageUrl()
           
 Integer getRetweetCount()
          The number of times this tweet has been retweeted.
 Tweet getRetweetedStatus()
           
 String getSource()
           
 String getText()
          The text of the tweet.
 Long getToUserId()
           
 String getUnmodifiedText()
          Returns the unmodified text of the tweet.
 TwitterProfile getUser()
           
 int hashCode()
           
 boolean hasMedia()
           
 boolean hasMentions()
           
 boolean hasTags()
           
 boolean hasUrls()
           
 boolean isFavorited()
           
 boolean isRetweet()
           
 boolean isRetweeted()
           
 void setEntities(Entities ent)
           
 void setFavoriteCount(Integer favoriteCount)
           
 void setFavorited(boolean favorited)
           
 void setFromUser(String fromUser)
           
 void setFromUserId(long fromUserId)
           
 void setInReplyToScreenName(String inReplyToScreenName)
           
 void setInReplyToStatusId(Long inReplyToStatusId)
           
 void setInReplyToUserId(Long inReplyToUserId)
           
 void setLanguageCode(String languageCode)
           
 void setProfileImageUrl(String profileImageUrl)
           
 void setRetweetCount(Integer retweetCount)
           
 void setRetweeted(boolean retweeted)
           
 void setRetweetedStatus(Tweet tweet)
           
 void setSource(String source)
           
 void setToUserId(Long toUserId)
           
 void setUser(TwitterProfile prof)
           
 
Methods inherited from class org.springframework.social.twitter.api.TwitterObject
add, getExtraData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tweet

public Tweet(long id,
             String text,
             Date createdAt,
             String fromUser,
             String profileImageUrl,
             Long toUserId,
             long fromUserId,
             String languageCode,
             String source)
Method Detail

getText

public String getText()
The text of the tweet. If this tweet is a retweet of another tweet, the text may be preceeded with "RT \@someuser" and may be truncated at the end. To get the raw, unmodified text of the original tweet, use getUnmodifiedText().

Returns:
The text of the tweet.

getUnmodifiedText

public String getUnmodifiedText()
Returns the unmodified text of the tweet. If this tweet is a retweet, it returns the text of the original tweet. If it is not a retweet, then this method will return the same value as getText().

Returns:
The unmodified text of the tweet.

getCreatedAt

public Date getCreatedAt()

getFromUser

public String getFromUser()

setFromUser

public void setFromUser(String fromUser)

getId

public long getId()

getProfileImageUrl

public String getProfileImageUrl()

setProfileImageUrl

public void setProfileImageUrl(String profileImageUrl)

getToUserId

public Long getToUserId()

setToUserId

public void setToUserId(Long toUserId)

getFromUserId

public long getFromUserId()

setInReplyToStatusId

public void setInReplyToStatusId(Long inReplyToStatusId)

getInReplyToStatusId

public Long getInReplyToStatusId()

setFromUserId

public void setFromUserId(long fromUserId)

getLanguageCode

public String getLanguageCode()

setLanguageCode

public void setLanguageCode(String languageCode)

getSource

public String getSource()

setSource

public void setSource(String source)

setRetweetCount

public void setRetweetCount(Integer retweetCount)

getRetweetCount

public Integer getRetweetCount()
The number of times this tweet has been retweeted. Only available in timeline results. getRetweetCount() will return null for Tweet objects returned in search results.


setRetweeted

public void setRetweeted(boolean retweeted)

isRetweeted

public boolean isRetweeted()

getRetweetedStatus

public Tweet getRetweetedStatus()

setRetweetedStatus

public void setRetweetedStatus(Tweet tweet)

isRetweet

public boolean isRetweet()

setFavorited

public void setFavorited(boolean favorited)

isFavorited

public boolean isFavorited()

setFavoriteCount

public void setFavoriteCount(Integer favoriteCount)

getFavoriteCount

public Integer getFavoriteCount()

getEntities

public Entities getEntities()

setEntities

public void setEntities(Entities ent)

hasMentions

public boolean hasMentions()

hasMedia

public boolean hasMedia()

hasUrls

public boolean hasUrls()

hasTags

public boolean hasTags()

getUser

public TwitterProfile getUser()

setUser

public void setUser(TwitterProfile prof)

getInReplyToUserId

public Long getInReplyToUserId()

setInReplyToUserId

public void setInReplyToUserId(Long inReplyToUserId)

getInReplyToScreenName

public String getInReplyToScreenName()

setInReplyToScreenName

public void setInReplyToScreenName(String inReplyToScreenName)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object