FileDocCategorySizeDatePackage
MessageSummaryImpl.javaAPI DocExample2052Sun Sep 02 14:59:04 BST 2001com.oreilly.forum.domain

MessageSummaryImpl

public class MessageSummaryImpl extends Object implements MessageSummary
Implementation of the MessageSummary interface.

Fields Summary
private long
id
private BoardSummary
board
private String
subject
private String
authorEmail
private DayMonthYear
createDate
private long
inReplyTo
Constructors Summary
public MessageSummaryImpl(long id, DayMonthYear createDate, BoardSummary board, String subject, String authorEmail, long inReplyTo)

        this.id = id;
        this.createDate = createDate;
        this.board = board;
        this.subject = subject;
        this.authorEmail = authorEmail;
        this.inReplyTo = inReplyTo;
    
Methods Summary
public intcompareTo(java.lang.Object obj)
Sorts by create date followed by message subject.

        if (this == obj) {
            return 0;
        }
        MessageSummaryImpl rhs = (MessageSummaryImpl) obj;

        int comparison = this.createDate.compareTo(rhs.createDate);
        if (comparison != 0) {
            return comparison;
        }

        comparison = this.subject.compareTo(rhs.subject);
        if (comparison != 0) {
            return comparison;
        }

        return 0;
    
public booleanequals(java.lang.Object obj)

        if (obj instanceof MessageSummaryImpl) {
            MessageSummaryImpl rhs = (MessageSummaryImpl) obj;
            return this.id == rhs.id;
        }
        return false;
    
public java.lang.StringgetAuthorEmail()

        return this.authorEmail;
    
public BoardSummarygetBoard()

        return this.board;
    
public DayMonthYeargetCreateDate()

        return this.createDate;
    
public longgetID()

        return this.id;
    
public longgetInReplyTo()

        return this.inReplyTo;
    
public java.lang.StringgetSubject()

        return this.subject;
    
public inthashCode()

        return (int) this.id;