|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.dao.support.DaoSupport org.springframework.orm.hibernate.support.HibernateDaoSupport com.atlassian.hibernate.HibernateObjectDao com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateBlogPostDao
public class HibernateBlogPostDao
Hibernate implementation of the BlogPost DAO
Field Summary |
---|
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao |
---|
cacheFactory, confluenceUserDao |
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
HibernateBlogPostDao()
|
Method Summary | |
---|---|
BlogPost |
getBlogPost(java.lang.String spaceKey,
java.lang.String title,
java.util.Calendar day)
Get the blog post by name and date. |
BlogPost |
getBlogPost(java.lang.String spaceKey,
java.lang.String title,
java.util.Calendar day,
boolean eagerLoadComments)
Get the blog post by name and date. |
BlogPost |
getBlogPostByTitle(java.lang.String spaceKey,
java.lang.String title)
Get a blog post by name. |
long |
getBlogPostCount(java.lang.String spaceKey,
java.util.Calendar date,
int period)
Get total number of blogPost. |
java.util.List<java.util.Date> |
getBlogPostDates(java.lang.String spaceKey)
Returns a list of creation dates for all the blog posts in a space. |
java.util.List<java.util.Date> |
getBlogPostDates(java.lang.String spaceKey,
java.util.Calendar date,
int period)
Returns a list of creation dates for all the blog posts in a space for a particular period. |
java.util.List<BlogPost> |
getBlogPosts(Space space,
boolean currentOnly)
Return an iterator for the specified space. |
java.util.List |
getBlogPosts(java.lang.String spaceKey,
java.util.Calendar date,
int period)
Get the blog posts in a space for a particular period. |
java.util.List |
getBlogPosts(java.lang.String spaceKey,
java.util.Calendar date,
int period,
int startIndex,
int maxResultCount)
Get list of blogPost by Date. |
protected BlogPost |
getByClassId(long id)
Retrieve the object with a particular id from the database. |
BlogPost |
getById(long id)
Get a blog post by id. |
BlogPost |
getFirstPostAfter(BlogPost post)
Used for finding the "previous" post to an existing post. |
BlogPost |
getFirstPostAfter(java.lang.String spaceKey,
java.util.Date creationDate)
Used for finding the "previous" post to an existing post |
BlogPost |
getFirstPostBefore(BlogPost post)
Used for finding the "previous" post to an existing post. |
BlogPost |
getFirstPostBefore(java.lang.String spaceKey,
java.util.Date creationDate)
Used for finding the "previous" post to an existing post |
BlogPost |
getMostRecentBlogPost(java.lang.String spaceKey)
|
java.lang.Class |
getPersistentClass()
|
java.util.List |
getRecentlyAddedBlogPosts(int maxPosts,
java.util.Date timeSince,
java.lang.String spaceKey)
|
java.util.List |
getRecentlyAddedBlogPosts(int maxCount,
java.lang.String spaceKey)
Get list of recently created blog posts. |
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao |
---|
findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, findNamedQueryStringParams, save, setCacheFactory, setConfluenceUserDao, updateModificationData |
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
Methods inherited from class org.springframework.dao.support.DaoSupport |
---|
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.confluence.core.persistence.VersionedObjectDao |
---|
findLatestVersionsCount, findLatestVersionsIterator, save |
Methods inherited from interface bucket.core.persistence.ObjectDao |
---|
findAll, findAllSorted, findAllSorted, refresh, remove, replicate, save, saveRaw |
Constructor Detail |
---|
public HibernateBlogPostDao()
Method Detail |
---|
public java.lang.Class getPersistentClass()
getPersistentClass
in interface ObjectDao
public BlogPost getById(long id)
BlogPostDao
getById
in interface BlogPostDao
protected BlogPost getByClassId(long id)
HibernateObjectDao
getByClassId
in class HibernateObjectDao
id
- the id of the object to look up
public BlogPost getBlogPostByTitle(java.lang.String spaceKey, java.lang.String title)
BlogPostDao
getBlogPostByTitle
in interface BlogPostDao
spaceKey
- the spacetitle
- the title
public BlogPost getBlogPost(java.lang.String spaceKey, java.lang.String title, java.util.Calendar day)
BlogPostDao
getBlogPost
in interface BlogPostDao
spaceKey
- the space to look for the post intitle
- the title of the post we are looking forday
- the DAY the post was created on. Any part of the calendar more specific than
a day will be ignoredpublic BlogPost getBlogPost(java.lang.String spaceKey, java.lang.String title, java.util.Calendar day, boolean eagerLoadComments)
BlogPostDao
getBlogPost
in interface BlogPostDao
spaceKey
- the space to look for the post intitle
- the title of the post we are looking forday
- the DAY the post was created on. Any part of the calendar more specific than
a day will be ignoredpublic java.util.List getBlogPosts(java.lang.String spaceKey, java.util.Calendar date, int period)
BlogPostDao
getBlogPosts
in interface BlogPostDao
spaceKey
- the space to look for posts indate
- a calendar object representing the date range we are looking for. Any part of
the calendar more specific than the supplied period will be ignored.period
- one of the Calendar constants specifying the granularity of the search.
currently, only Calendar.MONTH and Calendar.DATE are supported
public java.util.List getBlogPosts(java.lang.String spaceKey, java.util.Calendar date, int period, int startIndex, int maxResultCount)
BlogPostDao
getBlogPosts
in interface BlogPostDao
spaceKey
- the space to look for posts indate
- a calendar object representing the date range we are looking for. Any part of
the calendar more specific than the supplied period will be ignored.period
- one of the Calendar constants specifying the granularity of the search.
currently, only Calendar.MONTH and Calendar.DATE are supportedstartIndex
- start number of postsmaxResultCount
- Maximum number of posts to return
public long getBlogPostCount(java.lang.String spaceKey, java.util.Calendar date, int period)
BlogPostDao
getBlogPostCount
in interface BlogPostDao
spaceKey
- the space to look for posts indate
- a calendar object representing the date range we are looking for. Any part of
the calendar more specific than the supplied period will be ignored.period
- one of the Calendar constants specifying the granularity of the search.
currently, only Calendar.MONTH and Calendar.DATE are supported
public java.util.List<java.util.Date> getBlogPostDates(java.lang.String spaceKey)
BlogPostDao
getBlogPostDates
in interface BlogPostDao
public java.util.List<java.util.Date> getBlogPostDates(java.lang.String spaceKey, java.util.Calendar date, int period)
BlogPostDao
getBlogPostDates
in interface BlogPostDao
spaceKey
- the space to look for posts in.date
- a calendar object representing the date range we are looking for. Any part of
the calendar more specific than the supplied period will be ignored.period
- one of the Calendar constants specifying the granularity of the search.
currently, only Calendar.YEAR, Calendar.MONTH and Calendar.DATE are supported
public java.util.List<BlogPost> getBlogPosts(Space space, boolean currentOnly)
BlogPostDao
getBlogPosts
in interface BlogPostDao
public java.util.List getRecentlyAddedBlogPosts(int maxCount, java.lang.String spaceKey)
BlogPostDao
getRecentlyAddedBlogPosts
in interface BlogPostDao
maxCount
- Maximum number of posts to returnspaceKey
- the spaceKey to look for the posts in. If this key is null, we look acrosns
all spaces
public BlogPost getFirstPostBefore(java.lang.String spaceKey, java.util.Date creationDate)
BlogPostDao
getFirstPostBefore
in interface BlogPostDao
spaceKey
- the space to look increationDate
- the date the post must be before
public BlogPost getFirstPostAfter(java.lang.String spaceKey, java.util.Date creationDate)
BlogPostDao
getFirstPostAfter
in interface BlogPostDao
spaceKey
- the space to look increationDate
- the date the post must be after
public BlogPost getFirstPostBefore(BlogPost post)
BlogPostDao
getFirstPostBefore
in interface BlogPostDao
post
- the blog post that this must preceed
public BlogPost getFirstPostAfter(BlogPost post)
BlogPostDao
getFirstPostAfter
in interface BlogPostDao
post
- the blog post that this must be after
public java.util.List getRecentlyAddedBlogPosts(int maxPosts, java.util.Date timeSince, java.lang.String spaceKey)
getRecentlyAddedBlogPosts
in interface BlogPostDao
public BlogPost getMostRecentBlogPost(java.lang.String spaceKey)
getMostRecentBlogPost
in interface BlogPostDao
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |