org.apache.aries.samples.blog.persistence.jpa
Class BlogPersistenceServiceImpl
java.lang.Object
org.apache.aries.samples.blog.persistence.jpa.BlogPersistenceServiceImpl
- All Implemented Interfaces:
- BlogPersistenceService
public class BlogPersistenceServiceImpl
- extends Object
- implements BlogPersistenceService
This class is the implementation of the blogPersistenceService
|
Method Summary |
void |
createAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
|
void |
createBlogPost(String authorEmail,
String title,
String blogText,
List<String> tags)
|
Entry |
findBlogEntryByTitle(String title)
|
List<AuthorImpl> |
getAllAuthors()
|
List<EntryImpl> |
getAllBlogEntries()
|
AuthorImpl |
getAuthor(String emailAddress)
|
List<EntryImpl> |
getBlogEntries(int firstPostIndex,
int noOfPosts)
|
List<EntryImpl> |
getBlogEntriesModifiedBetween(Date start,
Date end)
|
EntryImpl |
getBlogEntryById(long postId)
|
List<EntryImpl> |
getBlogsForAuthor(String emailAddress)
|
int |
getNoOfBlogEntries()
|
void |
removeAuthor(String emailAddress)
|
void |
removeBlogEntry(long id)
|
void |
setDataSource(DataSource dataSource)
|
void |
setEntityManager(javax.persistence.EntityManager e)
|
void |
setPublishDate(long postId,
Date date)
|
void |
setUpdatedDate(long postId,
Date date)
|
void |
updateAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
|
void |
updateBlogEntry(long id,
String email,
String title,
String blogText,
List<String> tags,
Date updatedDate)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlogPersistenceServiceImpl
public BlogPersistenceServiceImpl()
setEntityManager
public void setEntityManager(javax.persistence.EntityManager e)
setDataSource
public void setDataSource(DataSource dataSource)
createAuthor
public void createAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
- Specified by:
createAuthor in interface BlogPersistenceService
createBlogPost
public void createBlogPost(String authorEmail,
String title,
String blogText,
List<String> tags)
- Specified by:
createBlogPost in interface BlogPersistenceService
findBlogEntryByTitle
public Entry findBlogEntryByTitle(String title)
- Specified by:
findBlogEntryByTitle in interface BlogPersistenceService
getAllAuthors
public List<AuthorImpl> getAllAuthors()
- Specified by:
getAllAuthors in interface BlogPersistenceService
getAllBlogEntries
public List<EntryImpl> getAllBlogEntries()
- Specified by:
getAllBlogEntries in interface BlogPersistenceService
getNoOfBlogEntries
public int getNoOfBlogEntries()
- Specified by:
getNoOfBlogEntries in interface BlogPersistenceService
getBlogEntries
public List<EntryImpl> getBlogEntries(int firstPostIndex,
int noOfPosts)
- Specified by:
getBlogEntries in interface BlogPersistenceService
getAuthor
public AuthorImpl getAuthor(String emailAddress)
- Specified by:
getAuthor in interface BlogPersistenceService
getBlogEntriesModifiedBetween
public List<EntryImpl> getBlogEntriesModifiedBetween(Date start,
Date end)
- Specified by:
getBlogEntriesModifiedBetween in interface BlogPersistenceService
getBlogsForAuthor
public List<EntryImpl> getBlogsForAuthor(String emailAddress)
- Specified by:
getBlogsForAuthor in interface BlogPersistenceService
updateAuthor
public void updateAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
- Specified by:
updateAuthor in interface BlogPersistenceService
updateBlogEntry
public void updateBlogEntry(long id,
String email,
String title,
String blogText,
List<String> tags,
Date updatedDate)
- Specified by:
updateBlogEntry in interface BlogPersistenceService
removeAuthor
public void removeAuthor(String emailAddress)
- Specified by:
removeAuthor in interface BlogPersistenceService
removeBlogEntry
public void removeBlogEntry(long id)
- Specified by:
removeBlogEntry in interface BlogPersistenceService
getBlogEntryById
public EntryImpl getBlogEntryById(long postId)
- Specified by:
getBlogEntryById in interface BlogPersistenceService
setPublishDate
public void setPublishDate(long postId,
Date date)
setUpdatedDate
public void setUpdatedDate(long postId,
Date date)
Copyright © 2009-2010 The Apache Software Foundation. All Rights Reserved.