@Entity(name="Story") public class Story extends Object implements Serializable
| Constructor and Description |
|---|
Story() |
Story(Long id,
String title,
GenreType genre,
String content,
Date publishedAt,
Collection<ThemeType> themes) |
Story(String title,
GenreType genre,
String content,
Collection<ThemeType> themes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTheme(ThemeType theme) |
void |
addView(Date viewDate) |
User |
getAuthor() |
String |
getContent() |
Set<User> |
getFavoritedBy()
Returns the set of users who have marked this story as a favorite.
|
GenreType |
getGenre() |
Long |
getId() |
Date |
getPublishedAt() |
Set<ThemeType> |
getThemes() |
String |
getTitle() |
Set<Date> |
getViews() |
boolean |
isComplete()
Checks if this story has all required data to be published.
|
boolean |
isPublished()
Checks if this story is published.
|
void |
removeTheme(ThemeType theme) |
void |
setAuthor(User author) |
void |
setContent(String content) |
void |
setGenre(GenreType genre) |
void |
setId(Long id) |
void |
setInternalAuthor(User author) |
void |
setPublishedAt(Date publishedAt) |
void |
setThemes(Set<ThemeType> themes) |
void |
setTitle(String title) |
protected void |
setViews(Set<Date> views) |
public Story()
public Story(String title, GenreType genre, String content, Collection<ThemeType> themes)
public Long getId()
public void setId(Long id)
public String getTitle()
public void setTitle(String title)
public GenreType getGenre()
public void setGenre(GenreType genre)
public void addTheme(ThemeType theme)
public void removeTheme(ThemeType theme)
public String getContent()
public void setContent(String content)
public Date getPublishedAt()
public void setPublishedAt(Date publishedAt)
public boolean isPublished()
public void addView(Date viewDate)
public User getAuthor()
public void setAuthor(User author)
public void setInternalAuthor(User author)
public boolean isComplete()
Copyright © 2025. All rights reserved.