CodeBeamer 5.4.0.1-RC API

com.intland.codebeamer.persistence.dto.base
Class AbstractCommentDto

java.lang.Object
  extended by com.intland.codebeamer.persistence.dto.base.IdentifiableDto
      extended by com.intland.codebeamer.persistence.dto.base.NamedDto
          extended by com.intland.codebeamer.persistence.dto.base.DescribeableDto
              extended by com.intland.codebeamer.persistence.dto.base.AbstractCommentDto
All Implemented Interfaces:
BaseDto, IndexableDto, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
ArtifactCommentDto, ArtifactHistoryEntryDto, ForumPostDto, ScmChangeSetDto, TrackerItemCommentDto

public abstract class AbstractCommentDto
extends DescribeableDto
implements IndexableDto

Each comment DTO must extend this.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.base.DescribeableDto
DescribeableDto.DescriptionComparator
 
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.base.NamedDto
NamedDto.NameComparator
 
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.base.IdentifiableDto
IdentifiableDto.IdComparator
 
Constructor Summary
AbstractCommentDto()
           
AbstractCommentDto(AbstractCommentDto comment)
           
AbstractCommentDto(java.util.Date submittedAt, UserDto submitter, java.lang.String name, java.lang.String description, java.lang.String format)
           
 
Method Summary
static int compareDates(java.util.Date d1, java.util.Date d2)
          Compare two Dates that may be null
 int compareTo(java.lang.Object obj)
          Caution: NamedDto compareTo violates the rule that a.equals(b) is equivalent to a.compareTo(b) == 0, because only the names are compared
 boolean equals(java.lang.Object obj)
           
 java.util.Date getSubmittedAt()
          Get the date and time this comment was submitted/created
 UserDto getSubmitter()
          Get the user that submitted this post
 boolean isIndexed()
          Check whether this post has been indexed for search
 void setIndexed(boolean indexed)
          Set whether this post has been indexed for search
 void setSubmittedAt(java.util.Date submittedAt)
          Set the date and time this post was submitted/created
 void setSubmitter(UserDto submitter)
          Set the user that submitted this post
 
Methods inherited from class com.intland.codebeamer.persistence.dto.base.DescribeableDto
compareByDescription, getDescription, getDescriptionFormat, setDescription, setDescriptionFormat
 
Methods inherited from class com.intland.codebeamer.persistence.dto.base.NamedDto
compareNames, compareString, compareStringIgnoreCase, createLookupMap, getName, hashCode, setName, toString
 
Methods inherited from class com.intland.codebeamer.persistence.dto.base.IdentifiableDto
clone, compare, compareInteger, equals, getId, hashCode, setId
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractCommentDto

public AbstractCommentDto()

AbstractCommentDto

public AbstractCommentDto(java.util.Date submittedAt,
                          UserDto submitter,
                          java.lang.String name,
                          java.lang.String description,
                          java.lang.String format)

AbstractCommentDto

public AbstractCommentDto(AbstractCommentDto comment)
Method Detail

getSubmittedAt

public java.util.Date getSubmittedAt()
Get the date and time this comment was submitted/created

Returns:
the submit/creation date of this comment

setSubmittedAt

public void setSubmittedAt(java.util.Date submittedAt)
Set the date and time this post was submitted/created

Parameters:
submittedAt - date (and time)

getSubmitter

public UserDto getSubmitter()
Get the user that submitted this post

Returns:
the user that submitted this post

setSubmitter

public void setSubmitter(UserDto submitter)
Set the user that submitted this post

Parameters:
submitter - is the user that submitted this post

isIndexed

public boolean isIndexed()
Check whether this post has been indexed for search

Specified by:
isIndexed in interface IndexableDto
Returns:
true if this post has been indexed, otherwise false

setIndexed

public void setIndexed(boolean indexed)
Set whether this post has been indexed for search

Specified by:
setIndexed in interface IndexableDto
Parameters:
indexed - is true if the post has been indexed for search, otherwise false

compareTo

public int compareTo(java.lang.Object obj)
Description copied from class: NamedDto
Caution: NamedDto compareTo violates the rule that a.equals(b) is equivalent to a.compareTo(b) == 0, because only the names are compared

Specified by:
compareTo in interface java.lang.Comparable
Overrides:
compareTo in class NamedDto

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class NamedDto

compareDates

public static int compareDates(java.util.Date d1,
                               java.util.Date d2)
Compare two Dates that may be null

Parameters:
d1 - is the first Date, or null
d2 - is the second Date, or null
Returns:
a value < 0 if d1 is less than d2, a value > 0 if d1 greater than d2, and 0 if d1 equals d2

CodeBeamer 5.4.0.1-RC API

Copyright © 2006-2009 Intland Software. All rights reserved.