@Entity(name="View") public class View extends Object
| Constructor and Description |
|---|
View() |
View(Long id,
Story story,
Date date)
Creates a new instance of
View with id. |
View(Story story,
Date date)
Creates a new instance of
View |
| Modifier and Type | Method and Description |
|---|---|
Date |
getDate()
Returns the date when the view was created.
|
Long |
getId()
Returns the id of the view.
|
Story |
getStory()
Returns the story that was viewed.
|
void |
setDate(Date date)
Sets the date when the view was created.
|
public View()
public View(Story story, Date date)
Viewstory - The story that is being viewed. Cannot be null.date - The date when the view was created. Cannot be null and must be after the story's publication date.IllegalArgumentException - if date is before the story's publication date.NullPointerException - if any of the parameters is null.public Long getId()
public Story getStory()
public Date getDate()
public void setDate(Date date)
date - the date when the view was created. Cannot be null and must be after the story's publication date.IllegalArgumentException - If date is null or if date is before the story's publication date.Copyright © 2022. All rights reserved.