public final class DocumentDAO extends Object implements IDocumentDAO
| Constructor and Description |
|---|
DocumentDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(int nDocumentId)
Delete a record from the table
|
String |
getPageTemplateDocumentPath(int nIdPageTemplateDocument)
Load the path of page template
|
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 the attributes of Document from the table
|
void |
loadAttributesWithoutBinaries(Document document,
boolean bValidated)
Load the attributes of Document from the table
|
List<Document> |
loadFromSpaceId(int nSpaceId)
Load from space id.
|
Document |
loadLastModifiedAttributes(int nIdDocument)
Load document type and date last modification for HTTP GET conditional
request ("If-Modified-Since")
|
Document |
loadLastModifiedDocumentFromUser(String strUserName)
Load the data of last Document the user worked in from the table
|
Document |
loadLastPublishedDocument()
Load the data of last Document the user worked in from the table
|
DocumentResource |
loadResource(int nDocumentId)
Load a resource (image, file, ...) corresponding to an attribute of a
Document
|
DocumentResource |
loadSpecificResource(int nDocumentId,
int nAttributeId,
boolean bValidated)
Load a resource (image, file, ...) corresponding to an attribute of a
Document
|
Document |
loadWithoutBinaries(int nDocumentId)
Load the data of Document from the table
|
int |
newPrimaryKey()
Generates a new primary key
|
List<Document> |
selectAll()
Deprecated.
|
Collection<Integer> |
selectAllPrimaryKeys()
Gets all documents id
|
List<Document> |
selectByFilter(DocumentFilter filter)
Load the list of documents
|
List<Document> |
selectByRelatedCategories(Document document)
Load the list of documents in relation with categories of specified
document
|
Collection<Integer> |
selectPrimaryKeysByFilter(DocumentFilter filter)
Load the list of documents
|
void |
store(Document document,
boolean bUpdateContent)
Update the record in the table
|
void |
validateAttributes(int nDocumentId)
validate a record from the table
|
public int newPrimaryKey()
newPrimaryKey in interface IDocumentDAOpublic void insert(Document document)
insert in interface IDocumentDAOdocument - The document objectpublic Document load(int nDocumentId)
load in interface IDocumentDAOnDocumentId - The identifier of Documentpublic Document loadWithoutBinaries(int nDocumentId)
loadWithoutBinaries in interface IDocumentDAOnDocumentId - The identifier of Documentpublic List<Document> loadFromSpaceId(int nSpaceId)
loadFromSpaceId in interface IDocumentDAOnSpaceId - The id of the document spacepublic void loadAttributes(Document document)
loadAttributes in interface IDocumentDAOdocument - Document objectpublic void loadAttributesWithoutBinaries(Document document, boolean bValidated)
loadAttributesWithoutBinaries in interface IDocumentDAOdocument - Document objectbValidated - true if the content of the document must be validated,
false otherwisepublic void delete(int nDocumentId)
delete in interface IDocumentDAOnDocumentId - the document identifierpublic void validateAttributes(int nDocumentId)
validateAttributes in interface IDocumentDAOnDocumentId - The Document identifierpublic void store(Document document, boolean bUpdateContent)
store in interface IDocumentDAOdocument - The reference of documentbUpdateContent - the booleanpublic Collection<Integer> selectPrimaryKeysByFilter(DocumentFilter filter)
selectPrimaryKeysByFilter in interface IDocumentDAOfilter - The DocumentFilter Objectpublic List<Document> selectByFilter(DocumentFilter filter)
selectByFilter in interface IDocumentDAOfilter - The DocumentFilter Objectpublic List<Document> selectByRelatedCategories(Document document)
selectByRelatedCategories in interface IDocumentDAOdocument - The document with the categoriespublic DocumentResource loadResource(int nDocumentId)
loadResource in interface IDocumentDAOnDocumentId - The Document Idpublic DocumentResource loadSpecificResource(int nDocumentId, int nAttributeId, boolean bValidated)
loadSpecificResource in interface IDocumentDAOnDocumentId - The Document IdnAttributeId - The Attribute IdbValidated - true if we want the validated resourcepublic Collection<Integer> selectAllPrimaryKeys()
selectAllPrimaryKeys in interface IDocumentDAOpublic List<Document> selectAll()
selectAll in interface IDocumentDAOpublic String getPageTemplateDocumentPath(int nIdPageTemplateDocument)
getPageTemplateDocumentPath in interface IDocumentDAOnIdPageTemplateDocument - The identifier of page templatepublic Document loadLastModifiedAttributes(int nIdDocument)
loadLastModifiedAttributes in interface IDocumentDAOnIdDocument - The id of the documentpublic Document loadLastModifiedDocumentFromUser(String strUserName)
loadLastModifiedDocumentFromUser in interface IDocumentDAOstrUserName - the user namepublic Document loadLastPublishedDocument()
loadLastPublishedDocument in interface IDocumentDAOCopyright © 2020 City of Paris. All rights reserved.