|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.aries.samples.blog.persistence.jdbc.BlogPersistenceServiceImpl
public class BlogPersistenceServiceImpl
This class is the implementation of the blogPersistenceService
| Constructor Summary | |
|---|---|
BlogPersistenceServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
createAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
Create an author record |
void |
createBlogPost(String authorEmail,
String title,
String blogText,
List<String> tags)
Create a blog entry record |
void |
destroy()
|
EntryImpl |
findBlogEntryByTitle(String title)
Find the blog entry record with the specified title |
List<AuthorImpl> |
getAllAuthors()
Return all author records in the Author table |
List<EntryImpl> |
getAllBlogEntries()
Return all blog entry records from BlogEntry table with the most recent published blog entries first |
AuthorImpl |
getAuthor(String emailAddress)
Return the author with the specified email address |
List<EntryImpl> |
getBlogEntries(int firstPostIndex,
int noOfPosts)
Return the portion of blog Entries |
List<EntryImpl> |
getBlogEntriesModifiedBetween(Date start,
Date end)
Return the blog entries modified between the date range of [start, end] |
EntryImpl |
getBlogEntryById(long postId)
Return the blog entry record with the specified id |
List<EntryImpl> |
getBlogsForAuthor(String emailAddress)
Return a list of blog entries belonging to the author with the specified email address |
int |
getNoOfBlogEntries()
Return the number of the blog entry records |
void |
init()
|
void |
removeAuthor(String emailAddress)
Delete the author record with the specified email address |
void |
removeBlogEntry(long id)
Delete the blog entry record specified by the blogEntry |
void |
setDataSource(DataSource dataSource)
set data source |
void |
updateAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
Update the author record |
void |
updateBlogEntry(long id,
String email,
String title,
String blogText,
List<String> tags,
Date updatedDate)
Update the blog entry record |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BlogPersistenceServiceImpl()
| Method Detail |
|---|
public void setDataSource(DataSource dataSource)
public void init()
public void destroy()
public void createAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
createAuthor in interface BlogPersistenceServicea - The author object to be created
ParseException
ParseException
public void createBlogPost(String authorEmail,
String title,
String blogText,
List<String> tags)
createBlogPost in interface BlogPersistenceServicea - The authortitle - The title of the postblogText - The text of the posttags - public EntryImpl findBlogEntryByTitle(String title)
findBlogEntryByTitle in interface BlogPersistenceServiceThe - title to be searched
public List<AuthorImpl> getAllAuthors()
getAllAuthors in interface BlogPersistenceServicepublic List<EntryImpl> getAllBlogEntries()
getAllBlogEntries in interface BlogPersistenceServicepublic int getNoOfBlogEntries()
getNoOfBlogEntries in interface BlogPersistenceService
public List<EntryImpl> getBlogEntries(int firstPostIndex,
int noOfPosts)
getBlogEntries in interface BlogPersistenceServicefirstPostIndex - The index of the first blog entry to be returnednoOfPosts - The number of blog entry to be returned
public AuthorImpl getAuthor(String emailAddress)
getAuthor in interface BlogPersistenceServiceemailAddress - The email address
public List<EntryImpl> getBlogEntriesModifiedBetween(Date start,
Date end)
getBlogEntriesModifiedBetween in interface BlogPersistenceServicestart - The start dateend - The end date
public List<EntryImpl> getBlogsForAuthor(String emailAddress)
getBlogsForAuthor in interface BlogPersistenceServiceemailAddress - the author's email address
public void updateAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
updateAuthor in interface BlogPersistenceServiceemail - The email associated with an authordob - The author's date of birthname - the author's namedisplayName - The displayNamebio - The aouthor's bio
public void updateBlogEntry(long id,
String email,
String title,
String blogText,
List<String> tags,
Date updatedDate)
updateBlogEntry in interface BlogPersistenceServicepublic void removeAuthor(String emailAddress)
removeAuthor in interface BlogPersistenceServiceemailAddress - The author's email addresspublic void removeBlogEntry(long id)
removeBlogEntry in interface BlogPersistenceServiceblogEntry - the blog entry record to be deletedpublic EntryImpl getBlogEntryById(long postId)
getBlogEntryById in interface BlogPersistenceServicepostId - The blogEntry record id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||