|
||||||||||
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 |
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
HibernateBlogPostDao()
|
Method Summary | |
---|---|
BlogPost |
getBlogPost(String spaceKey,
String title,
Calendar day)
Get the blog post by name and date. |
BlogPost |
getBlogPost(String spaceKey,
String title,
Calendar day,
boolean eagerLoadComments)
Get the blog post by name and date. |
BlogPost |
getBlogPostByTitle(String spaceKey,
String title)
Get a blog post by name. |
List |
getBlogPosts(Space space,
boolean currentOnly)
Return an iterator for the specified space. |
List |
getBlogPosts(String spaceKey,
Calendar date,
int period)
Get the blog posts in a space for a particular period. |
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(String spaceKey,
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(String spaceKey,
Date creationDate)
Used for finding the "previous" post to an existing post |
BlogPost |
getMostRecentBlogPost(String spaceKey)
|
Class |
getPersistentClass()
|
List |
getRecentlyAddedBlogPosts(int maxPosts,
Date timeSince,
String spaceKey)
|
List |
getRecentlyAddedBlogPosts(int maxCount,
String spaceKey)
Get list of recently created blog posts. |
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao |
---|
findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, save, setCacheFactory, 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 Class getPersistentClass()
getPersistentClass
in interface ObjectDao
public BlogPost getById(long id)
BlogPostDao
getById
in interface BlogPostDao
public BlogPost getBlogPostByTitle(String spaceKey, String title)
BlogPostDao
getBlogPostByTitle
in interface BlogPostDao
spaceKey
- the spacetitle
- the title
public BlogPost getBlogPost(String spaceKey, String title, 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(String spaceKey, String title, 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 List getBlogPosts(String spaceKey, 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 List getBlogPosts(Space space, boolean currentOnly)
BlogPostDao
getBlogPosts
in interface BlogPostDao
public List getRecentlyAddedBlogPosts(int maxCount, 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(String spaceKey, Date creationDate)
BlogPostDao
getFirstPostBefore
in interface BlogPostDao
spaceKey
- the space to look increationDate
- the date the post must be before
public BlogPost getFirstPostAfter(String spaceKey, 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 List getRecentlyAddedBlogPosts(int maxPosts, Date timeSince, String spaceKey)
getRecentlyAddedBlogPosts
in interface BlogPostDao
public BlogPost getMostRecentBlogPost(String spaceKey)
getMostRecentBlogPost
in interface BlogPostDao
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |