fr.paris.lutece.plugins.document.business
Interface IDocumentDAO

All Known Implementing Classes:
DocumentDAO

public interface IDocumentDAO

Interface for DocumentDAO


Method Summary
 void delete(int nDocumentId)
          Delete a record from the table
 boolean documentIsPublished(int nDocumentId)
          Tests if an document is published before deleting
 java.lang.String getPageTemplateDocumentPath(int IdPageTemplateDocument)
          Load document pageTemplatePath
 void insert(Document document)
          Insert a new record in the table.
 Document load(int nDocumentId)
          Load the data of Document from the table
 void loadAttributes(Document document)
          Load document attributes
 DocumentResource loadResource(int nDocumentId)
          Load a resource (image, file, ...) corresponding to an attribute of a Document
 DocumentResource loadSpecificResource(int nDocumentId, int nAttributeId)
          Load a resource (image, file, ...) corresponding to an attribute of a Document
 int newPrimaryKey()
          Generates a new primary key
 java.util.List<Document> selectAll()
          Gets all documents
 java.util.List<Document> selectByFilter(DocumentFilter filter)
          Load the list of documents
 java.util.List<Document> selectPublishedByRelatedCategories(Document document)
          Load the list of published documents in relation with categories of specified document
 void store(Document document, boolean bUpdateContent)
          Update the record in the table
 

Method Detail

newPrimaryKey

int newPrimaryKey()
Generates a new primary key

Returns:
The new primary key

delete

void delete(int nDocumentId)
Delete a record from the table

Parameters:
nDocumentId - the document identifier

insert

void insert(Document document)
Insert a new record in the table.

Parameters:
document - The document object

load

Document load(int nDocumentId)
Load the data of Document from the table

Parameters:
nDocumentId - The identifier of Document
Returns:
the instance of the Document

loadResource

DocumentResource loadResource(int nDocumentId)
Load a resource (image, file, ...) corresponding to an attribute of a Document

Parameters:
nDocumentId - The Document Id
Returns:
the instance of the DocumentResource

loadSpecificResource

DocumentResource loadSpecificResource(int nDocumentId,
                                      int nAttributeId)
Load a resource (image, file, ...) corresponding to an attribute of a Document

Parameters:
nDocumentId - The Document Id
nAttributeId - The Attribute Id
Returns:
the instance of the DocumentResource

selectAll

java.util.List<Document> selectAll()
Gets all documents

Returns:
the document list

selectByFilter

java.util.List<Document> selectByFilter(DocumentFilter filter)
Load the list of documents

Parameters:
filter - The DocumentFilter Object
Returns:
The Collection of the Documents

selectPublishedByRelatedCategories

java.util.List<Document> selectPublishedByRelatedCategories(Document document)
Load the list of published documents in relation with categories of specified document

Parameters:
document - The document with the categories
Returns:
The Collection of the Documents

store

void store(Document document,
           boolean bUpdateContent)
Update the record in the table

Parameters:
document - The reference of document
bUpdateContent - the boolean

documentIsPublished

boolean documentIsPublished(int nDocumentId)
Tests if an document is published before deleting

Parameters:
nDocumentId - The identifier of the document
Returns:
true if the document is published, false otherwise

loadAttributes

void loadAttributes(Document document)
Load document attributes

Parameters:
document - the reference of the document

getPageTemplateDocumentPath

java.lang.String getPageTemplateDocumentPath(int IdPageTemplateDocument)
Load document pageTemplatePath

Parameters:
IdPageTemplateDocument - the Id page template identifier


Copyright © 2007 Mairie de Paris. All Rights Reserved.