Class BlogHome
- java.lang.Object
-
- fr.paris.lutece.plugins.blog.business.BlogHome
-
public final class BlogHome extends Object
This class provides instances management methods (create, find, ...) for Blog objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BlogaddInitialVersion(Blog blog)Create an initial version of an Blogstatic BlogaddNewVersion(Blog blog)Adds a new version of an Blogstatic Blogcreate(Blog blog)Create an instance of the blog classstatic BlogcreateVersion(Blog blog)Create an instance of the blog classstatic List<Blog>findByFilter(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 List<Blog>getBlogByTag(int nIdTag)Load the data of Blog objects and returns them as a liststatic List<Blog>getBlogsList()Load the data of all the blog objects and returns them as a liststatic fr.paris.lutece.util.ReferenceListgetBlogsReferenceList()Load the data of all the Blog objects and returns them as a referenceListstatic List<Blog>getBlogsVersionsList(int nId)Load the data of all the Blog objects and returns them as a liststatic List<Integer>getIdBlogsList()Load the id of all the Blog objects and returns them as a liststatic List<Blog>getLastBlogVersionsList(int nId, int nLimit)Load the data of nLimit last versions of a specific blog and returns them as a liststatic List<Blog>getLastModifiedBlogsList(int nLimit)Load the data of nLimit last modified Blog objects and returns them as a liststatic List<String>getUsersEditedBlogVersions(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 parameterstatic List<Blog>selectWithoutBinaries()Returns a collection of blog objectsstatic Blogupdate(Blog blog)Update of the blog which is specified in parameter
-
-
-
Method Detail
-
create
public static Blog create(Blog blog)
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
public static Blog createVersion(Blog blog)
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
public static Blog update(Blog blog)
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
public static Blog findByPrimaryKey(int nKey)
Returns an instance of a blog whose identifier is specified in parameter- Parameters:
nKey- The blog primary key- Returns:
- an instance of blog
-
findByName
public static Blog findByName(String strName)
Returns an instance of a blog whose identifier is specified in parameter- Parameters:
nKey- The blog primary key- Returns:
- an instance of blog
-
findVersion
public static Blog findVersion(int nId, int nVersion)
Returns an instance of a blog whose identifier is specified in parameter- Parameters:
nId- The blog primary keynVersion-- Returns:
- an instance of blog
-
getBlogsList
public static List<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
public static List<Blog> getLastModifiedBlogsList(int nLimit)
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
public static List<Blog> getLastBlogVersionsList(int nId, int nLimit)
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
public static List<Blog> getBlogsVersionsList(int nId)
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
public static List<String> getUsersEditedBlogVersions(int nId)
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
public static List<Integer> 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
public static Blog addInitialVersion(Blog blog)
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
public static Blog addNewVersion(Blog blog)
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
public static List<Blog> findByFilter(BlogFilter filter)
Returns a collection of blog objects- Parameters:
filter- The filter- Returns:
- A collection of Blogs
-
getBlogByTag
public static List<Blog> getBlogByTag(int nIdTag)
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
-
-