com.j2biz.blogunity.dao
Class EntryDAO

java.lang.Object
  extended bycom.j2biz.blogunity.dao.AbstractDAO
      extended bycom.j2biz.blogunity.dao.EntryDAO

public class EntryDAO
extends AbstractDAO

Since:
0.1
Author:
michelson

Field Summary
 
Fields inherited from class com.j2biz.blogunity.dao.AbstractDAO
eventService
 
Constructor Summary
EntryDAO()
           
 
Method Summary
 Serializable createEntry(Entry entry)
           
 void deleteEntry(Entry entry)
           
 List geEntriesForDay(String blogName, Calendar day, boolean includeDraftEntries)
           
 List getEntiresByUserpic(Userpic pic)
           
 List getEntriesForDay(String blogName, int year, int month, int day, boolean includeDraftEntries)
           
 List getEntriesForMonth(String blogName, Calendar month, boolean includeDraftEntries)
           
 List getEntriesForMonth(String blogName, int year, int month, boolean includeDraftEntries)
           
 List getEntriesForYear(String blogName, Calendar year, boolean includeDraftEntries)
           
 List getEntriesForYear(String blogName, int year, boolean includeDraftEntries)
           
 Entry getEntryByAliasname(String alias, String blogname)
           
 Entry getEntryByID(long id)
           
 Entry getEntryByID(Long id)
           
 Entry getEntryByIDorAliasname(String param, String blogname)
           
 List getLastPostedEntries(int count)
           
 int getNumberOfEntries(Blog b)
          Optimized query for fetching total number of entries for given blog.
 List getPaginatedCommunityBlogsTape(User user, int firstResult, int maxResults)
           
 List getPaginatedEntries(Long blogId, int firstResult, int maxResults, boolean includeDraftEntries)
           
 List getPaginatedEntries(String urlname, int firstResult, int maxResults, boolean includeDraftEntries)
           
 List getPaginatedEntriesByCategory(Long blogId, Long categoryId, int firstResult, int maxResults, boolean includeDraftEntries)
           
 List getPaginatedEntriesByCategory(String blogUrlname, Long categoryId, int firstResult, int maxResults, boolean includeDraftEntries)
           
 List getPaginatedFavoriteBlogsTape(User user, int firstResult, int maxResults)
           
 List getPaginatedFoundedBlogsTape(User user, int firstResult, int maxResults)
           
 List getPaginatedFriendsTape(User user, int firstResult, int maxResults)
           
 List getRecentBlogEntries(Blog b, boolean includeDraftEntries)
          Returns last 10 entries for the given blog.
 void updateEntry(Entry entry)
           
 
Methods inherited from class com.j2biz.blogunity.dao.AbstractDAO
create, delete, getByID, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryDAO

public EntryDAO()
Method Detail

getEntryByID

public Entry getEntryByID(long id)
                   throws BlogunityException
Throws:
BlogunityException

getEntryByID

public Entry getEntryByID(Long id)
                   throws BlogunityException
Throws:
BlogunityException

getEntiresByUserpic

public List getEntiresByUserpic(Userpic pic)
                         throws BlogunityException
Throws:
BlogunityException

getPaginatedEntriesByCategory

public List getPaginatedEntriesByCategory(Long blogId,
                                          Long categoryId,
                                          int firstResult,
                                          int maxResults,
                                          boolean includeDraftEntries)
                                   throws BlogunityException
Throws:
BlogunityException

getPaginatedEntriesByCategory

public List getPaginatedEntriesByCategory(String blogUrlname,
                                          Long categoryId,
                                          int firstResult,
                                          int maxResults,
                                          boolean includeDraftEntries)
                                   throws BlogunityException
Throws:
BlogunityException

getPaginatedEntries

public List getPaginatedEntries(String urlname,
                                int firstResult,
                                int maxResults,
                                boolean includeDraftEntries)
                         throws BlogunityException
Throws:
BlogunityException

getRecentBlogEntries

public List getRecentBlogEntries(Blog b,
                                 boolean includeDraftEntries)
                          throws BlogunityException
Returns last 10 entries for the given blog.

Returns:
Throws:
BlogunityException

getPaginatedEntries

public List getPaginatedEntries(Long blogId,
                                int firstResult,
                                int maxResults,
                                boolean includeDraftEntries)
                         throws BlogunityException
Parameters:
blogId -
firstResult -
maxResults -
Returns:
Throws:
BlogunityException

getEntryByIDorAliasname

public Entry getEntryByIDorAliasname(String param,
                                     String blogname)
                              throws BlogunityException
Throws:
BlogunityException

getEntryByAliasname

public Entry getEntryByAliasname(String alias,
                                 String blogname)
                          throws BlogunityException
Throws:
BlogunityException

getPaginatedFriendsTape

public List getPaginatedFriendsTape(User user,
                                    int firstResult,
                                    int maxResults)
                             throws BlogunityException
Throws:
BlogunityException

getPaginatedFavoriteBlogsTape

public List getPaginatedFavoriteBlogsTape(User user,
                                          int firstResult,
                                          int maxResults)
                                   throws BlogunityException
Throws:
BlogunityException

getPaginatedCommunityBlogsTape

public List getPaginatedCommunityBlogsTape(User user,
                                           int firstResult,
                                           int maxResults)
                                    throws BlogunityException
Throws:
BlogunityException

getPaginatedFoundedBlogsTape

public List getPaginatedFoundedBlogsTape(User user,
                                         int firstResult,
                                         int maxResults)
                                  throws BlogunityException
Throws:
BlogunityException

getEntriesForDay

public List getEntriesForDay(String blogName,
                             int year,
                             int month,
                             int day,
                             boolean includeDraftEntries)
                      throws BlogunityException
Throws:
BlogunityException

geEntriesForDay

public List geEntriesForDay(String blogName,
                            Calendar day,
                            boolean includeDraftEntries)
                     throws BlogunityException
Throws:
BlogunityException

getEntriesForMonth

public List getEntriesForMonth(String blogName,
                               int year,
                               int month,
                               boolean includeDraftEntries)
                        throws BlogunityException
Throws:
BlogunityException

getEntriesForMonth

public List getEntriesForMonth(String blogName,
                               Calendar month,
                               boolean includeDraftEntries)
                        throws BlogunityException
Throws:
BlogunityException

getEntriesForYear

public List getEntriesForYear(String blogName,
                              int year,
                              boolean includeDraftEntries)
                       throws BlogunityException
Throws:
BlogunityException

getEntriesForYear

public List getEntriesForYear(String blogName,
                              Calendar year,
                              boolean includeDraftEntries)
                       throws BlogunityException
Throws:
BlogunityException

createEntry

public Serializable createEntry(Entry entry)
                         throws BlogunityException
Throws:
BlogunityException

deleteEntry

public void deleteEntry(Entry entry)
                 throws BlogunityException
Throws:
BlogunityException

updateEntry

public void updateEntry(Entry entry)
                 throws BlogunityException
Throws:
BlogunityException

getLastPostedEntries

public List getLastPostedEntries(int count)
                          throws BlogunityException
Throws:
BlogunityException

getNumberOfEntries

public int getNumberOfEntries(Blog b)
                       throws BlogunityException
Optimized query for fetching total number of entries for given blog.

Parameters:
b -
Returns:
Throws:
BlogException
BlogunityException


Copyright (c)j2biz.com