Class DocumentPublicationHome
- java.lang.Object
-
- fr.paris.lutece.plugins.document.business.publication.DocumentPublicationHome
-
public class DocumentPublicationHome extends Object
This class provides instances management methods for DocumentPublication objects
-
-
Constructor Summary
Constructors Constructor Description DocumentPublicationHome()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcreate(DocumentPublication documentPublication)Create the documentsPublication objectstatic Collection<DocumentPublication>findByDocumentId(int nDocumentId)Find the list ofDocumentPublicationobjects specified by the document idstatic Collection<DocumentPublication>findByDocumentIdAndStatus(int nDocumentId, int nStatus)Find the list ofDocumentPublicationobjects specified by the document id and the statusstatic Collection<DocumentPublication>findByPortletId(int nPortletId)Find the list ofDocumentPublicationobjects specified by the portlet idstatic Collection<DocumentPublication>findByPortletIdAndStatus(int nPortletId, int nStatus)Find the list ofDocumentPublicationobjects specified by the portlet id and the statusstatic DocumentPublicationfindByPrimaryKey(int nPortletId, int nDocumentId)Find theDocumentPublicationobject specified by the portlet id and document idstatic intfindMaxDocumentOrderByPortletId(int nPortletId)Find the max document order from aPortletidstatic Collection<DocumentPublication>findSinceDatePublishingAndStatus(Date datePublishing, int nStatus)Find the list ofDocumentPublicationobjects specified the status and published at or after the specified datestatic voidremove(int nPortletId, int nDocumentId)Remove theDocumentPublicationobject specified by portlet id and document idstatic voidremoveFromDocumentId(int nDocumentId)Remove allDocumentPublicationobjects specified by document idstatic voidremoveFromPortletId(int nPortletId)Remove allDocumentPublicationobjects specified by portlet idstatic voidupdate(DocumentPublication documentPublication)Update theDocumentPublicationobject
-
-
-
Method Detail
-
create
public static void create(DocumentPublication documentPublication)
Create the documentsPublication object- Parameters:
documentPublication- The document Publication object
-
update
public static void update(DocumentPublication documentPublication)
Update theDocumentPublicationobject- Parameters:
documentPublication- TheDocumentPublicationobject
-
remove
public static void remove(int nPortletId, int nDocumentId)Remove theDocumentPublicationobject specified by portlet id and document id- Parameters:
nPortletId- the portlet identifiernDocumentId- the document identifier
-
removeFromPortletId
public static void removeFromPortletId(int nPortletId)
Remove allDocumentPublicationobjects specified by portlet id- Parameters:
nPortletId- the portlet identifier
-
removeFromDocumentId
public static void removeFromDocumentId(int nDocumentId)
Remove allDocumentPublicationobjects specified by document id- Parameters:
nDocumentId- the document identifier
-
findByPrimaryKey
public static DocumentPublication findByPrimaryKey(int nPortletId, int nDocumentId)
Find theDocumentPublicationobject specified by the portlet id and document id- Parameters:
nPortletId- The portlet identifiernDocumentId- The document identifier- Returns:
- The
DocumentPublicationobject or null if the object does not exists
-
findByPortletId
public static Collection<DocumentPublication> findByPortletId(int nPortletId)
Find the list ofDocumentPublicationobjects specified by the portlet id- Parameters:
nPortletId- The portlet identifier- Returns:
- The
DocumentPublicationobjectsCollectionordered by documentOrder ascending. The list is empty if no objects found.
-
findByDocumentId
public static Collection<DocumentPublication> findByDocumentId(int nDocumentId)
Find the list ofDocumentPublicationobjects specified by the document id- Parameters:
nDocumentId- The document identifier- Returns:
- The
DocumentPublicationobjectsCollectionordered by documentOrder ascending. The list is empty if no objects found.
-
findByPortletIdAndStatus
public static Collection<DocumentPublication> findByPortletIdAndStatus(int nPortletId, int nStatus)
Find the list ofDocumentPublicationobjects specified by the portlet id and the status- Parameters:
nPortletId- The portlet identifiernStatus- The status- Returns:
- The
DocumentPublicationobjectsCollectionordered by documentOrder ascending. The list is empty if no objects found.
-
findByDocumentIdAndStatus
public static Collection<DocumentPublication> findByDocumentIdAndStatus(int nDocumentId, int nStatus)
Find the list ofDocumentPublicationobjects specified by the document id and the status- Parameters:
nDocumentId- The document identifiernStatus- The status- Returns:
- The
DocumentPublicationobjectsCollectionordered by documentOrder ascending. The list is empty if no objects found.
-
findSinceDatePublishingAndStatus
public static Collection<DocumentPublication> findSinceDatePublishingAndStatus(Date datePublishing, int nStatus)
Find the list ofDocumentPublicationobjects specified the status and published at or after the specified date- Parameters:
datePublishing- The publication datenStatus- The status- Returns:
- The
DocumentPublicationobjectsCollectionordered by documentOrder ascending. The list is empty if no objects found.
-
findMaxDocumentOrderByPortletId
public static int findMaxDocumentOrderByPortletId(int nPortletId)
Find the max document order from aPortletid- Parameters:
nPortletId- thePortletidentifer- Returns:
- The max document order
-
-