public interface BlogPostDao extends VersionedObjectDao
NON_CACHEABLE
Modifier and Type | Method and Description |
---|---|
BlogPost |
getBlogPost(Space space,
String title,
Calendar day,
boolean eagerLoadComments)
Get the blog post by name and date.
|
BlogPost |
getBlogPost(String spaceKey,
String title,
Calendar day)
Deprecated.
since 5.9.1. Use
getBlogPost(Space, String, Calendar, boolean) instead. |
BlogPost |
getBlogPost(String spaceKey,
String title,
Calendar day,
boolean eagerLoadComments)
Deprecated.
since 5.9.1. Use
getBlogPost(Space, String, Calendar, boolean) instead. |
BlogPost |
getBlogPostByTitle(String spaceKey,
String title)
Get a blog post by name.
|
int |
getBlogPostCount()
Counts the total number of blog posts, for all spaces and posting dates.
|
long |
getBlogPostCount(String spaceKey,
Calendar postingDate,
int period)
Get total number of blogPost.
|
List<Date> |
getBlogPostDates(Space space)
Returns a list of creation dates for all the blog posts in a space.
|
List<Date> |
getBlogPostDates(String spaceKey)
Deprecated.
since 5.9.1. Use
getBlogPostDates(Space) instead. |
List<Date> |
getBlogPostDates(String spaceKey,
Calendar date,
int period)
Returns a list of creation dates for all the blog posts in a space for a particular period.
|
List<BlogPost> |
getBlogPosts(Space space,
boolean currentOnly)
Return an iterator for the specified space.
|
List |
getBlogPosts(Space space,
Calendar date,
int period)
Get the blog posts in a space for a particular period.
|
List |
getBlogPosts(Space space,
Calendar postingDate,
int period,
int startIndex,
int maxResultCount)
Get list of blogPost by Date.
|
List |
getBlogPosts(String spaceKey,
Calendar date,
int period)
Deprecated.
since 5.9.1. Use
getBlogPosts(Space, Calendar, int) instead. |
List |
getBlogPosts(String spaceKey,
Calendar postingDate,
int period,
int startIndex,
int maxResultCount)
Deprecated.
since 5.9.1. Use
getBlogPosts(Space, Calendar, int, int, int) instead. |
List<BlogPost> |
getBlogPostsInTrash(String spaceKey,
String title)
Gets a blog post that is in the trash for a given space that matches the given title.
|
BlogPost |
getById(long id)
Get a blog post by id.
|
List<Long> |
getCurrentBlogPostIds()
Return a list of ids for all current blog posts.
|
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) |
List |
getRecentlyAddedBlogPosts(int maxPosts,
Date timeSince,
String spaceKey) |
List |
getRecentlyAddedBlogPosts(int maxCount,
String spaceKey)
Get list of recently created blog posts.
|
findLatestVersionsCount, findLatestVersionsIterator, save
findAll, findAllSorted, findAllSorted, findByClassIds, getPersistentClass, refresh, remove, replicate, save, saveRaw
BlogPost getById(long id)
BlogPost getBlogPostByTitle(String spaceKey, String title)
spaceKey
- the spacetitle
- the title@Deprecated BlogPost getBlogPost(String spaceKey, String title, Calendar day)
getBlogPost(Space, String, Calendar, boolean)
instead.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 ignoredList<BlogPost> getBlogPostsInTrash(String spaceKey, String title)
spaceKey
- The space key (case-insensitive) in which to look for the blogtitle
- The title (case-insensitive) of the blog to look for@Deprecated BlogPost getBlogPost(String spaceKey, String title, Calendar day, boolean eagerLoadComments)
getBlogPost(Space, String, Calendar, boolean)
instead.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 ignored@Nullable BlogPost getBlogPost(@Nonnull Space space, @Nonnull String title, @Nonnull Calendar day, boolean eagerLoadComments)
space
- 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 ignored@Deprecated List getBlogPosts(String spaceKey, Calendar date, int period)
getBlogPosts(Space, Calendar, int)
instead.TODO: add Calendar.WEEK range support.
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 supportedList getBlogPosts(@Nonnull Space space, @Nonnull Calendar date, int period)
TODO: add Calendar.WEEK range support.
space
- 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 supportedList<BlogPost> getBlogPosts(Space space, boolean currentOnly)
List<Long> getCurrentBlogPostIds()
@Deprecated List<Date> getBlogPostDates(String spaceKey)
getBlogPostDates(Space)
instead.List<Date> getBlogPostDates(@Nonnull Space space)
List<Date> getBlogPostDates(String spaceKey, Calendar date, int period)
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 supportedList getRecentlyAddedBlogPosts(int maxCount, @Nullable String spaceKey)
maxCount
- Maximum number of posts to returnspaceKey
- the spaceKey to look for the posts in. If this key is null, we look acrosns
all spacesBlogPost getFirstPostBefore(String spaceKey, Date creationDate)
spaceKey
- the space to look increationDate
- the date the post must be beforeBlogPost getFirstPostAfter(String spaceKey, Date creationDate)
spaceKey
- the space to look increationDate
- the date the post must be afterBlogPost getFirstPostBefore(BlogPost post)
post
- the blog post that this must preceedBlogPost getFirstPostAfter(BlogPost post)
post
- the blog post that this must be afterList getRecentlyAddedBlogPosts(int maxPosts, Date timeSince, String spaceKey)
@Deprecated List getBlogPosts(String spaceKey, Calendar postingDate, int period, int startIndex, int maxResultCount)
getBlogPosts(Space, Calendar, int, int, int)
instead.spaceKey
- the space to look for posts inpostingDate
- 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 returnList getBlogPosts(@Nonnull Space space, @Nonnull Calendar postingDate, int period, int startIndex, int maxResultCount)
space
- the space to look for posts inpostingDate
- 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 returnlong getBlogPostCount(String spaceKey, Calendar postingDate, int period)
spaceKey
- the space to look for posts inpostingDate
- 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 supportedint getBlogPostCount()
Copyright © 2003–2017 Atlassian. All rights reserved.