public class StoryDTO extends Object
| Constructor and Description |
|---|
StoryDTO() |
StoryDTO(es.uvigo.esei.dgss.teamc.microstories.entities.Story story)
Creates a new StoryDAO from a Story entity.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAuthor() |
String |
getContent() |
Date |
getDate() |
es.uvigo.esei.dgss.teamc.microstories.entities.Genre |
getGenre() |
Long |
getId() |
es.uvigo.esei.dgss.teamc.microstories.entities.Theme |
getTheme1() |
es.uvigo.esei.dgss.teamc.microstories.entities.Theme |
getTheme2() |
String |
getTitle() |
int |
getViewCount() |
boolean |
isPublished() |
void |
setId(Long id) |
void |
setViewCount(int viewCount) |
static StoryDTO[] |
storyArrayToDTO(es.uvigo.esei.dgss.teamc.microstories.entities.Story[] stories)
For tests.
|
static List<StoryDTO> |
storyListToDTO(List<es.uvigo.esei.dgss.teamc.microstories.entities.Story> stories)
Creates a List of StoryDAO from a List of Story entities.
|
String |
toString() |
public StoryDTO()
public StoryDTO(es.uvigo.esei.dgss.teamc.microstories.entities.Story story)
story - the Story entity to create the DAO from.NullPointerException - if the given Story entity is null.public static List<StoryDTO> storyListToDTO(List<es.uvigo.esei.dgss.teamc.microstories.entities.Story> stories)
stories - the List of Story entities to create the List of StoryDAO from.NullPointerException - if the given List of Story entities is null.public static StoryDTO[] storyArrayToDTO(es.uvigo.esei.dgss.teamc.microstories.entities.Story[] stories)
stories - the array of stories to create the array of StoryDTO entities from.NullPointerException - if the given array of stories entities is null.public Long getId()
public String getTitle()
public es.uvigo.esei.dgss.teamc.microstories.entities.Genre getGenre()
public String getContent()
public String getAuthor()
public es.uvigo.esei.dgss.teamc.microstories.entities.Theme getTheme1()
public es.uvigo.esei.dgss.teamc.microstories.entities.Theme getTheme2()
public Date getDate()
public int getViewCount()
public void setViewCount(int viewCount)
public boolean isPublished()
public void setId(Long id)
Copyright © 2022. All rights reserved.