@PermitAll public class StoryEJB extends Object
| Constructor and Description |
|---|
StoryEJB() |
| Modifier and Type | Method and Description |
|---|---|
int |
calculatePagesSearch(String text,
int maxItems) |
void |
createStory(Date date,
String title,
String content,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Theme mainTheme,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Theme secondaryTheme,
Boolean published)
Creates a story.
|
es.uvigo.esei.dgss.teama.microstories.domain.entities.Story |
editStory(int id,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Story story)
Edit a story.
|
List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> |
exploreStory(es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Theme theme,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Publication publication,
int page,
int maxItems)
Search story that matches with genre, theme and publication
|
List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> |
findHottestStories(es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre,
Date startDate,
Date referenceDate,
int maxItems)
Find the stories that have been most read in the last month.
|
es.uvigo.esei.dgss.teama.microstories.domain.entities.Story |
getById(int id)
Search for a story by its primary key and add visit into table VISITDATE.
|
List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> |
getRecentStories() |
List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> |
getStoriesByText(String text,
int pageNumber,
int maxItems) |
int |
getTotalPagesSearchText(String text,
int maxItems)
Returns the total number of pages that the results of a text search will fill.
|
es.uvigo.esei.dgss.teama.microstories.domain.entities.User |
getUserByLogin(String login)
Search for a user by their login.
|
List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> |
searchStory(String text,
int page,
int maxItems)
Search story that content or title contains a text
|
public List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> getRecentStories()
public es.uvigo.esei.dgss.teama.microstories.domain.entities.Story getById(int id)
id - The story id to search.public List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> getStoriesByText(String text, int pageNumber, int maxItems)
public int calculatePagesSearch(String text, int maxItems)
public List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> searchStory(String text, int page, int maxItems)
text - The story id to search.page - The page number.maxItems - The size of the page.public List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> exploreStory(es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre, es.uvigo.esei.dgss.teama.microstories.domain.entities.Theme theme, es.uvigo.esei.dgss.teama.microstories.domain.entities.Publication publication, int page, int maxItems)
genre - The story genre to search.theme - The story theme to search.publication - The story publication to search.public List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> findHottestStories(es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre, Date startDate, Date referenceDate, int maxItems)
genre - The genre of the story.startDate - The date when start to search.referenceDate - The date on which the query is made.maxItems - The size of the page.@RolesAllowed(value="author") public void createStory(Date date, String title, String content, es.uvigo.esei.dgss.teama.microstories.domain.entities.Genre genre, es.uvigo.esei.dgss.teama.microstories.domain.entities.Theme mainTheme, es.uvigo.esei.dgss.teama.microstories.domain.entities.Theme secondaryTheme, Boolean published)
date - The date when the story is created.title - The title of the story.content - The content of the story.genre - The genre of the story.mainTheme - The main theme of the story.secondaryTheme - The secondary theme of the story.published - Indicates if the story has been published.@RolesAllowed(value="author") public es.uvigo.esei.dgss.teama.microstories.domain.entities.Story editStory(int id, es.uvigo.esei.dgss.teama.microstories.domain.entities.Story story)
id - The story id.story - The story to modify.public es.uvigo.esei.dgss.teama.microstories.domain.entities.User getUserByLogin(String login)
login - The login to find.public int getTotalPagesSearchText(String text, int maxItems)
text - The text that is used in the query.maxItems - The size of the page.Copyright © 2022. All rights reserved.