Class BlogDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.blog.business.BlogDAO
-
-
Constructor Summary
Constructors Constructor Description BlogDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tablevoiddeleteSpecificVersion(int nIdBlog, int nVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a blog's specific version record from the tablevoiddeleteVersions(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tableintgetActualVersionNumber(java.sql.Timestamp strUpdateDate, int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns the actual version number of a blog It get the version number witch has is the closest to the update datevoidinsert(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.voidinsertVersion(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.Blogload(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the tablejava.util.List<Blog>loadBlogByIdTag(int nIdTag, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the list of Blogs objects and returns them as a listBlogloadByName(java.lang.String strName, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the tableBlogloadVersion(int nId, int nVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the tableintnewPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)Generates a new primary keyintnewVersionPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)Generates a new primary keyjava.util.List<java.lang.String>selectAllUsersEditedBlog(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the users edited the blog and returns them as a listjava.util.List<Blog>selectBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the blog objects and returns them as a listjava.util.List<Blog>selectBlogsListByArchiveStatus(boolean isArchived, fr.paris.lutece.portal.service.plugin.Plugin plugin)fr.paris.lutece.util.ReferenceListselectBlogsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the Blog objects and returns them as a referenceListjava.util.List<Blog>selectBlogsVersionsList(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the blog objects and returns them as a listjava.util.List<Blog>selectByFilter(BlogFilter filter)Load the list of blogsjava.util.List<java.lang.Integer>selectIdBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the id of all the Blog objects and returns them as a listjava.util.List<Blog>selectLastBlogVersionsList(int nId, int nLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of nLimit last versions of a specific blog and returns them as a listjava.util.List<Blog>selectlastModifiedBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nLimit)Load the data of nLimit last modified blog objects and returns them as a listjava.util.List<Blog>selectWithoutBinaries(fr.paris.lutece.portal.service.plugin.Plugin plugin)voidstore(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the record in the tablevoidupdateBlogArchiveId(int nIdBlog, boolean bArchive, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the blog archive
-
-
-
Method Detail
-
newPrimaryKey
public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generates a new primary key- Parameters:
plugin- The Plugin- Returns:
- The new primary key
-
newVersionPrimaryKey
public int newVersionPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generates a new primary key- Parameters:
plugin- The Plugin- Returns:
- The new primary key
-
insert
public void insert(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.
-
insertVersion
public void insertVersion(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.- Specified by:
insertVersionin interfaceIBlogDAO- Parameters:
blog- instance of the blog object to insertplugin- the Plugin
-
load
public Blog load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table
-
loadByName
public Blog loadByName(java.lang.String strName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table- Specified by:
loadByNamein interfaceIBlogDAO- Parameters:
strName- The name of the blogplugin- the Plugin- Returns:
- The instance of the blog
-
loadVersion
public Blog loadVersion(int nId, int nVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table- Specified by:
loadVersionin interfaceIBlogDAO- Parameters:
nId- The identifier of the blognVersion- The versionplugin- the Plugin- Returns:
- The instance of the blog
-
delete
public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table
-
deleteVersions
public void deleteVersions(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table- Specified by:
deleteVersionsin interfaceIBlogDAO- Parameters:
nKey- The identifier of the blog to deleteplugin- the Plugin
-
deleteSpecificVersion
public void deleteSpecificVersion(int nIdBlog, int nVersion, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a blog's specific version record from the table- Specified by:
deleteSpecificVersionin interfaceIBlogDAO- Parameters:
nIdBlog- The identifier of the blog to processnVersion- The value of the version to deleteplugin- the Plugin
-
store
public void store(Blog blog, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table
-
selectBlogsList
public java.util.List<Blog> selectBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the blog objects and returns them as a list- Specified by:
selectBlogsListin interfaceIBlogDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the data of all the blog objects
-
selectBlogsListByArchiveStatus
public java.util.List<Blog> selectBlogsListByArchiveStatus(boolean isArchived, fr.paris.lutece.portal.service.plugin.Plugin plugin)
- Specified by:
selectBlogsListByArchiveStatusin interfaceIBlogDAO
-
selectlastModifiedBlogsList
public java.util.List<Blog> selectlastModifiedBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nLimit)
Load the data of nLimit last modified blog objects and returns them as a list- Specified by:
selectlastModifiedBlogsListin interfaceIBlogDAO- Parameters:
plugin- the PluginnLimit- number of blogument- Returns:
- The list which contains the data of of nLimit last modified blog objects
-
selectBlogsVersionsList
public java.util.List<Blog> selectBlogsVersionsList(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the blog objects and returns them as a list- Specified by:
selectBlogsVersionsListin interfaceIBlogDAOplugin- the Plugin- Returns:
- The list which contains the data of all the blog objects
-
selectAllUsersEditedBlog
public java.util.List<java.lang.String> selectAllUsersEditedBlog(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the users edited the blog and returns them as a list- Specified by:
selectAllUsersEditedBlogin interfaceIBlogDAOplugin- the Plugin- Returns:
- The list which contains the data of all the users edited blog objects
-
selectIdBlogsList
public java.util.List<java.lang.Integer> selectIdBlogsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the id of all the Blog objects and returns them as a list- Specified by:
selectIdBlogsListin interfaceIBlogDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the id of all the Blog objects
-
selectBlogsReferenceList
public fr.paris.lutece.util.ReferenceList selectBlogsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the Blog objects and returns them as a referenceList- Specified by:
selectBlogsReferenceListin interfaceIBlogDAO- Parameters:
plugin- the Plugin- Returns:
- The referenceList which contains the data of all the Blog objects
-
selectByFilter
public java.util.List<Blog> selectByFilter(BlogFilter filter)
Load the list of blogs- Specified by:
selectByFilterin interfaceIBlogDAO- Parameters:
filter- The blogFilter Object- Returns:
- The Collection of the blogs
-
loadBlogByIdTag
public java.util.List<Blog> loadBlogByIdTag(int nIdTag, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of Blogs objects and returns them as a list- Specified by:
loadBlogByIdTagin interfaceIBlogDAOplugin- the Plugin- Returns:
- the list of Blogs objects
-
selectWithoutBinaries
public java.util.List<Blog> selectWithoutBinaries(fr.paris.lutece.portal.service.plugin.Plugin plugin)
- Specified by:
selectWithoutBinariesin interfaceIBlogDAO
-
selectLastBlogVersionsList
public java.util.List<Blog> selectLastBlogVersionsList(int nId, int nLimit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of nLimit last versions of a specific blog and returns them as a list- Specified by:
selectLastBlogVersionsListin interfaceIBlogDAO- 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
-
getActualVersionNumber
public int getActualVersionNumber(java.sql.Timestamp strUpdateDate, int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns the actual version number of a blog It get the version number witch has is the closest to the update date- Specified by:
getActualVersionNumberin interfaceIBlogDAO- Parameters:
strUpdateDate- the update datenId- the blog id- Returns:
- the version number
-
updateBlogArchiveId
public void updateBlogArchiveId(int nIdBlog, boolean bArchive, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the blog archive- Specified by:
updateBlogArchiveIdin interfaceIBlogDAO- Parameters:
nIdBlog- The blog id
-
-