Class DocumentDAO
java.lang.Object
fr.paris.lutece.plugins.document.business.DocumentDAO
- All Implemented Interfaces:
IDocumentDAO
This class provides Data Access methods for Document objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nDocumentId) Delete a record from the tablegetPageTemplateDocumentPath(int nIdPageTemplateDocument) Load the path of page templatevoidInsert a new record in the table.load(int nDocumentId) Load the data of Document from the tablevoidloadAttributes(Document document) Load the attributes of Document from the tablevoidloadAttributesWithoutBinaries(Document document, boolean bValidated) Load the attributes of Document from the tableloadFromSpaceId(int nSpaceId) Load from space id.loadLastModifiedAttributes(int nIdDocument) Load document type and date last modification for HTTP GET conditional request ("If-Modified-Since")loadLastModifiedDocumentFromUser(String strUserName) Load the data of last Document the user worked in from the tableLoad the data of last Document the user worked in from the tableloadResource(int nDocumentId) Load a resource (image, file, ...) corresponding to an attribute of a DocumentloadSpecificResource(int nDocumentId, int nAttributeId, boolean bValidated) Load a resource (image, file, ...) corresponding to an attribute of a DocumentloadWithoutBinaries(int nDocumentId) Load the data of Document from the tableDeprecated.Gets all documents idselectByFilter(DocumentFilter filter) Load the list of documentsselectByRelatedCategories(Document document) Load the list of documents in relation with categories of specified documentLoad the list of documentsvoidUpdate the record in the tablevoidvalidateAttributes(int nDocumentId) validate a record from the table
-
Constructor Details
-
DocumentDAO
public DocumentDAO()
-
-
Method Details
-
insert
Insert a new record in the table.- Specified by:
insertin interfaceIDocumentDAO- Parameters:
document- The document object
-
load
Load the data of Document from the table- Specified by:
loadin interfaceIDocumentDAO- Parameters:
nDocumentId- The identifier of Document- Returns:
- the instance of the Document
-
loadWithoutBinaries
Load the data of Document from the table- Specified by:
loadWithoutBinariesin interfaceIDocumentDAO- Parameters:
nDocumentId- The identifier of Document- Returns:
- the instance of the Document
-
loadFromSpaceId
Load from space id.- Specified by:
loadFromSpaceIdin interfaceIDocumentDAO- Parameters:
nSpaceId- The id of the document space- Returns:
- the instance of the Document
-
loadAttributes
Load the attributes of Document from the table- Specified by:
loadAttributesin interfaceIDocumentDAO- Parameters:
document- Document object
-
loadAttributesWithoutBinaries
Load the attributes of Document from the table- Specified by:
loadAttributesWithoutBinariesin interfaceIDocumentDAO- Parameters:
document- Document objectbValidated- true if the content of the document must be validated, false otherwise
-
delete
public void delete(int nDocumentId) Delete a record from the table- Specified by:
deletein interfaceIDocumentDAO- Parameters:
nDocumentId- the document identifier
-
validateAttributes
public void validateAttributes(int nDocumentId) validate a record from the table- Specified by:
validateAttributesin interfaceIDocumentDAO- Parameters:
nDocumentId- The Document identifier
-
store
Update the record in the table- Specified by:
storein interfaceIDocumentDAO- Parameters:
document- The reference of documentbUpdateContent- the boolean
-
selectPrimaryKeysByFilter
Load the list of documents- Specified by:
selectPrimaryKeysByFilterin interfaceIDocumentDAO- Parameters:
filter- The DocumentFilter Object- Returns:
- The Collection of the Document ids
-
selectByFilter
Load the list of documents- Specified by:
selectByFilterin interfaceIDocumentDAO- Parameters:
filter- The DocumentFilter Object- Returns:
- The Collection of the Documents
-
selectByRelatedCategories
Load the list of documents in relation with categories of specified document- Specified by:
selectByRelatedCategoriesin interfaceIDocumentDAO- Parameters:
document- The document with the categories- Returns:
- The Collection of the Documents
-
loadResource
Load a resource (image, file, ...) corresponding to an attribute of a Document- Specified by:
loadResourcein interfaceIDocumentDAO- Parameters:
nDocumentId- The Document Id- Returns:
- the instance of the DocumentResource
-
loadSpecificResource
Load a resource (image, file, ...) corresponding to an attribute of a Document- Specified by:
loadSpecificResourcein interfaceIDocumentDAO- Parameters:
nDocumentId- The Document IdnAttributeId- The Attribute IdbValidated- true if we want the validated resource- Returns:
- the instance of the DocumentResource
-
selectAllPrimaryKeys
Gets all documents id- Specified by:
selectAllPrimaryKeysin interfaceIDocumentDAO- Returns:
- A collection of Integer
-
selectAll
Deprecated.Gets all documents- Specified by:
selectAllin interfaceIDocumentDAO- Returns:
- the document list
-
getPageTemplateDocumentPath
Load the path of page template- Specified by:
getPageTemplateDocumentPathin interfaceIDocumentDAO- Parameters:
nIdPageTemplateDocument- The identifier of page template- Returns:
- the page template path
-
loadLastModifiedAttributes
Load document type and date last modification for HTTP GET conditional request ("If-Modified-Since")- Specified by:
loadLastModifiedAttributesin interfaceIDocumentDAO- Parameters:
nIdDocument- The id of the document- Returns:
- the document
-
loadLastModifiedDocumentFromUser
Load the data of last Document the user worked in from the table- Specified by:
loadLastModifiedDocumentFromUserin interfaceIDocumentDAO- Parameters:
strUserName- the user name- Returns:
- the instance of the Document
-
loadLastPublishedDocument
Load the data of last Document the user worked in from the table- Specified by:
loadLastPublishedDocumentin interfaceIDocumentDAO- Returns:
- the instance of the Document
-