Class BlogHome
java.lang.Object
fr.paris.lutece.plugins.blog.business.BlogHome
This class provides instances management methods (create, find, ...) for Blog objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic BlogaddInitialVersion(Blog blog) Create an initial version of an Blogstatic BlogaddNewVersion(Blog blog) Adds a new version of an Blogstatic BlogCreate an instance of the blog classstatic BlogcreateVersion(Blog blog) Create an instance of the blog classfindByFilter(BlogFilter filter) Returns a collection of blog objectsstatic BlogfindByName(String strName) Returns an instance of a blog whose identifier is specified in parameterstatic BlogfindByPrimaryKey(int nKey) Returns an instance of a blog whose identifier is specified in parameterstatic BlogfindVersion(int nId, int nVersion) Returns an instance of a blog whose identifier is specified in parameterstatic intgetActualVersionNumber(Timestamp strUpdateDate, int nId) Returns the actual version number of a blog It get the version number witch has is the closest to the update dategetBlogByTag(int nIdTag) Load the data of Blog objects and returns them as a listLoad the data of all the blog objects and returns them as a liststatic fr.paris.lutece.util.ReferenceListLoad the data of all the Blog objects and returns them as a referenceListgetBlogsVersionsList(int nId) Load the data of all the Blog objects and returns them as a listLoad the id of all the Blog objects and returns them as a listgetLastBlogVersionsList(int nId, int nLimit) Load the data of nLimit last versions of a specific blog and returns them as a listgetLastModifiedBlogsList(int nLimit) Load the data of nLimit last modified Blog objects and returns them as a listgetUsersEditedBlogVersions(int nId) Load the data of all users edited the Blog objects and returns them as a liststatic voidremove(int nKey) Remove the blog whose identifier is specified in parameterstatic voidremoveSpecificVersion(int nIdBlog, int nVersion) Remove a specific version from a blogstatic voidremoveVersions(int nKey) Remove the blog's versions whose identifier is specified in parameterselectByArchiveStatus(boolean isArchived) Select the list of blogs by archive statusReturns a collection of blog objectsstatic BlogUpdate of the blog which is specified in parameterstatic voidupdateBlogArchiveId(boolean isArchived, int blogId) Archive a blog
-
Method Details
-
create
Create an instance of the blog class- Parameters:
blog- The instance of the blog which contains the informations to store- Returns:
- The instance of blog which has been created with its primary key.
-
createVersion
Create an instance of the blog class- Parameters:
blog- The instance of the blog which contains the informations to store- Returns:
- The instance of blog which has been created with its primary key.
-
update
Update of the blog which is specified in parameter- Parameters:
blog- The instance of the blog which contains the data to store- Returns:
- The instance of the blog which has been updated
-
remove
public static void remove(int nKey) Remove the blog whose identifier is specified in parameter- Parameters:
nKey- The blog Id
-
removeVersions
public static void removeVersions(int nKey) Remove the blog's versions whose identifier is specified in parameter- Parameters:
nKey- The blog Id
-
removeSpecificVersion
public static void removeSpecificVersion(int nIdBlog, int nVersion) Remove a specific version from a blog- Parameters:
nIdBlog- The id of the blog to modifynIdVersion- The value of the version to remove
-
findByPrimaryKey
Returns an instance of a blog whose identifier is specified in parameter- Parameters:
nKey- The blog primary key- Returns:
- an instance of blog
-
findByName
Returns an instance of a blog whose identifier is specified in parameter- Parameters:
nKey- The blog primary key- Returns:
- an instance of blog
-
findVersion
Returns an instance of a blog whose identifier is specified in parameter- Parameters:
nId- The blog primary keynVersion-- Returns:
- an instance of blog
-
getBlogsList
Load the data of all the blog objects and returns them as a list- Returns:
- the list which contains the data of all the blog objects
-
getLastModifiedBlogsList
Load the data of nLimit last modified Blog objects and returns them as a list- Parameters:
nLimit- number of Blogument- Returns:
- The list which contains the data of of nLimit last modified Blog objects
-
getLastBlogVersionsList
Load the data of nLimit last versions of a specific blog and returns them as a list- Parameters:
nId- The blog's primary keynLimit- Maximum amount of Blog Object versions to return- Returns:
- The list which contains the data of nLimit last versions of the blog
-
getBlogsVersionsList
Load the data of all the Blog objects and returns them as a list- Returns:
- the list which contains the data of all the Blog objects
-
getUsersEditedBlogVersions
Load the data of all users edited the Blog objects and returns them as a list- Parameters:
nId- The Id- Returns:
- the list which contains the data of all users edited the Blog objects
-
getIdBlogsList
Load the id of all the Blog objects and returns them as a list- Returns:
- the list which contains the id of all the Blog objects
-
getBlogsReferenceList
public static fr.paris.lutece.util.ReferenceList getBlogsReferenceList()Load the data of all the Blog objects and returns them as a referenceList- Returns:
- the referenceList which contains the data of all the Blog objects
-
addInitialVersion
Create an initial version of an Blog- Parameters:
blog- The instance of the Blog which contains the informations to store- Returns:
- The instance of Blog which has been created with its primary key.
-
addNewVersion
Adds a new version of an Blog- Parameters:
blog- The instance of the blog which contains the informations to store- Returns:
- The instance of the blog which has been updated
-
findByFilter
Returns a collection of blog objects- Parameters:
filter- The filter- Returns:
- A collection of Blogs
-
getBlogByTag
Load the data of Blog objects and returns them as a list- Parameters:
nIdTag- Tag Id- Returns:
- The list which contains the data of Blog objects
-
selectWithoutBinaries
Returns a collection of blog objects- Returns:
-
getActualVersionNumber
Returns the actual version number of a blog It get the version number witch has is the closest to the update date- Parameters:
strUpdateDate- the update datenId- the blog id- Returns:
- the version number
-
updateBlogArchiveId
public static void updateBlogArchiveId(boolean isArchived, int blogId) Archive a blog- Parameters:
blogId- The id of the blog to archive
-
selectByArchiveStatus
Select the list of blogs by archive status- Parameters:
isArchived- The archive status- Returns:
- The list of blogs
-