org.spincast.website.models.NewsEntryDefault Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
package org.spincast.website.models;
import java.util.Date;
/**
* Spincast news entry implementation.
*/
public class NewsEntryDefault implements NewsEntry {
private final long id;
private final Date publishedDate;
private final String title;
private final String description;
/**
* Constructor
*/
public NewsEntryDefault(long id, Date publishedDate, String title, String description) {
this.id = id;
this.publishedDate = publishedDate;
this.title = title;
this.description = description;
}
@Override
public long getId() {
return this.id;
}
@Override
public Date getPublishedDate() {
return this.publishedDate;
}
@Override
public String getTitle() {
return this.title;
}
@Override
public String getDescription() {
return this.description;
}
@Override
public String toString() {
return getPublishedDate() + " - " + getTitle();
}
}