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 IDocumentDAO
public void insert(Document document)
insert
in interface IDocumentDAO
document
- The document objectpublic Document load(int nDocumentId)
load
in interface IDocumentDAO
nDocumentId
- The identifier of Documentpublic Document loadWithoutBinaries(int nDocumentId)
loadWithoutBinaries
in interface IDocumentDAO
nDocumentId
- The identifier of Documentpublic List<Document> loadFromSpaceId(int nSpaceId)
loadFromSpaceId
in interface IDocumentDAO
nSpaceId
- The id of the document spacepublic void loadAttributes(Document document)
loadAttributes
in interface IDocumentDAO
document
- Document objectpublic void loadAttributesWithoutBinaries(Document document, boolean bValidated)
loadAttributesWithoutBinaries
in interface IDocumentDAO
document
- Document objectbValidated
- true if the content of the document must be validated,
false otherwisepublic void delete(int nDocumentId)
delete
in interface IDocumentDAO
nDocumentId
- the document identifierpublic void validateAttributes(int nDocumentId)
validateAttributes
in interface IDocumentDAO
nDocumentId
- The Document identifierpublic void store(Document document, boolean bUpdateContent)
store
in interface IDocumentDAO
document
- The reference of documentbUpdateContent
- the booleanpublic Collection<Integer> selectPrimaryKeysByFilter(DocumentFilter filter)
selectPrimaryKeysByFilter
in interface IDocumentDAO
filter
- The DocumentFilter Objectpublic List<Document> selectByFilter(DocumentFilter filter)
selectByFilter
in interface IDocumentDAO
filter
- The DocumentFilter Objectpublic List<Document> selectByRelatedCategories(Document document)
selectByRelatedCategories
in interface IDocumentDAO
document
- The document with the categoriespublic DocumentResource loadResource(int nDocumentId)
loadResource
in interface IDocumentDAO
nDocumentId
- The Document Idpublic DocumentResource loadSpecificResource(int nDocumentId, int nAttributeId, boolean bValidated)
loadSpecificResource
in interface IDocumentDAO
nDocumentId
- The Document IdnAttributeId
- The Attribute IdbValidated
- true if we want the validated resourcepublic Collection<Integer> selectAllPrimaryKeys()
selectAllPrimaryKeys
in interface IDocumentDAO
public List<Document> selectAll()
selectAll
in interface IDocumentDAO
public String getPageTemplateDocumentPath(int nIdPageTemplateDocument)
getPageTemplateDocumentPath
in interface IDocumentDAO
nIdPageTemplateDocument
- The identifier of page templatepublic Document loadLastModifiedAttributes(int nIdDocument)
loadLastModifiedAttributes
in interface IDocumentDAO
nIdDocument
- The id of the documentpublic Document loadLastModifiedDocumentFromUser(String strUserName)
loadLastModifiedDocumentFromUser
in interface IDocumentDAO
strUserName
- the user namepublic Document loadLastPublishedDocument()
loadLastPublishedDocument
in interface IDocumentDAO
Copyright © 2020 City of Paris. All rights reserved.