public final class DocumentHome extends Object
Modifier and Type | Method and Description |
---|---|
static Document |
create(Document document)
Creation of an instance of document
|
static List<Document> |
findAll()
Get the list of every documents
|
static Collection<Integer> |
findAllPrimaryKeys()
Gets all documents id
|
static List<Document> |
findByFilter(DocumentFilter filter,
Locale locale)
Returns a collection of documents objects
|
static Document |
findByPrimaryKey(int nKey)
Returns an instance of a document whose identifier is specified in
parameter
|
static Document |
findByPrimaryKeyWithoutBinaries(int nKey)
Returns an instance of a document whose identifier is specified in
parameter
|
static List<Document> |
findByRelatedCategories(Document document,
Locale locale)
Returns a collection of documents objects
If more than one category is specified on filter,
the result will corresponding to the document wich matched with one
category at least.
|
static List<Document> |
findBySpaceKey(int nSpaceId)
Returns documents by space id
|
static Collection<Integer> |
findPrimaryKeysByFilter(DocumentFilter filter,
Locale locale)
Returns a collection of documents ids
|
static String |
getPageTemplateDocumentPath(int idPageTemplateDocument)
Load document pageTemplatePath
|
static DocumentResource |
getResource(int nDocumentId)
Get a document resource
|
static DocumentResource |
getValidatedResource(int nDocumentId,
int nAttributeId)
Get the validated resource of an attribute of a document
|
static DocumentResource |
getWorkingResource(int nDocumentId,
int nAttributeId)
Get the working resource of an attribute of a document
|
static void |
loadAttributes(Document document)
Load document attributes
|
static void |
loadAttributesWithoutBinaries(Document document,
boolean bValidated)
Load document attributes
|
static Document |
loadLastModifiedAttributes(int nDocumentId)
Load document type and date last modification for HTTP GET conditional
request ("If-Modified-Since")
|
static Document |
loadLastModifiedDocumentFromUser(String strUserName)
Load the data of last Document the user worked in from the table
|
static Document |
loadLastPublishedDocument()
Load the data of last Document the user worked in from the table
|
static int |
newPrimaryKey()
Get a new primary key
|
static void |
remove(int nDocumentId)
Remove the Document whose identifier is specified in parameter
|
static Document |
update(Document document,
boolean bUpdateContent)
Update of the document which is specified in parameter
|
static void |
validateAttributes(int nIdDocument)
Validate of the document attributes
|
public static Document create(Document document)
document
- The instance of the document which contains the
informations to storepublic static Document update(Document document, boolean bUpdateContent)
bUpdateContent
- True to update content, false otherwisedocument
- The instance of the document which contains the data to
storepublic static void validateAttributes(int nIdDocument)
nIdDocument
- The id of the documentpublic static void remove(int nDocumentId)
nDocumentId
- The id of the document to removepublic static Document findByPrimaryKey(int nKey)
nKey
- The Primary key of the documentpublic static Document findByPrimaryKeyWithoutBinaries(int nKey)
nKey
- The Primary key of the documentpublic static List<Document> findBySpaceKey(int nSpaceId)
nSpaceId
- The space Idpublic static Collection<Integer> findPrimaryKeysByFilter(DocumentFilter filter, Locale locale)
filter
- The filterlocale
- The localepublic static List<Document> findByFilter(DocumentFilter filter, Locale locale)
filter
- The filterlocale
- The localepublic static List<Document> findByRelatedCategories(Document document, Locale locale)
public static DocumentResource getValidatedResource(int nDocumentId, int nAttributeId)
nDocumentId
- The id of the documentnAttributeId
- The id of the attribute to get the resource ofpublic static DocumentResource getWorkingResource(int nDocumentId, int nAttributeId)
nDocumentId
- The id of the documentnAttributeId
- the id of the attributepublic static DocumentResource getResource(int nDocumentId)
nDocumentId
- The id of the documentpublic static int newPrimaryKey()
public static Collection<Integer> findAllPrimaryKeys()
public static List<Document> findAll()
public static void loadAttributes(Document document)
document
- the document referencepublic static void loadAttributesWithoutBinaries(Document document, boolean bValidated)
document
- the document referencebValidated
- true if the content of the document must be validated,
false otherwisepublic static String getPageTemplateDocumentPath(int idPageTemplateDocument)
idPageTemplateDocument
- the Id page template identifierpublic static Document loadLastModifiedAttributes(int nDocumentId)
nDocumentId
- The document idpublic static Document loadLastModifiedDocumentFromUser(String strUserName)
strUserName
- the user namepublic static Document loadLastPublishedDocument()
Copyright © 2020 City of Paris. All rights reserved.