Interface IDocumentDAO
-
- All Known Implementing Classes:
DocumentDAO
public interface IDocumentDAOInterface for DocumentDAO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(int nDocumentId)Delete a record from the tablejava.lang.StringgetPageTemplateDocumentPath(int idPageTemplateDocument)Load document pageTemplatePathvoidinsert(Document document)Insert a new record in the table.Documentload(int nDocumentId)Load the data of Document from the tablevoidloadAttributes(Document document)Load document attributesvoidloadAttributesWithoutBinaries(Document document, boolean bValidated)Load document attributesjava.util.List<Document>loadFromSpaceId(int nSpaceId)Returns documents by space idDocumentloadLastModifiedAttributes(int nDocumentId)Load document type and date last modification for HTTP GET conditional request ("If-Modified-Since")DocumentloadLastModifiedDocumentFromUser(java.lang.String strUserName)Load the data of last Document the user worked in from the tableDocumentloadLastPublishedDocument()Load the data of last Document the user worked in from the tableDocumentResourceloadResource(int nDocumentId)Load a resource (image, file, ...) corresponding to an attribute of a DocumentDocumentResourceloadSpecificResource(int nDocumentId, int nAttributeId, boolean bValidated)Load a resource (image, file, ...) corresponding to an attribute of a DocumentDocumentloadWithoutBinaries(int nDocumentId)Returns an instance of a document whose identifier is specified in parameterintnewPrimaryKey()Generates a new primary keyjava.util.List<Document>selectAll()Gets all documentsjava.util.Collection<java.lang.Integer>selectAllPrimaryKeys()Gets all documents idjava.util.List<Document>selectByFilter(DocumentFilter filter)Load the list of documentsjava.util.List<Document>selectByRelatedCategories(Document document)Load the list of published documents in relation with categories of specified documentjava.util.Collection<java.lang.Integer>selectPrimaryKeysByFilter(DocumentFilter filter)Load the list of documentsvoidstore(Document document, boolean bUpdateContent)Update the record in the tablevoidvalidateAttributes(int nDocumentId)Validate the document attributes
-
-
-
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
-
loadWithoutBinaries
Document loadWithoutBinaries(int nDocumentId)
Returns an instance of a document whose identifier is specified in parameter- Parameters:
nDocumentId- The Primary key of the document- Returns:
- An instance of document
-
loadFromSpaceId
java.util.List<Document> loadFromSpaceId(int nSpaceId)
Returns documents by space id- Parameters:
nSpaceId- The space Id- Returns:
- A list of documents
-
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, boolean bValidated)
Load a resource (image, file, ...) corresponding to an attribute of a Document- Parameters:
nDocumentId- The Document IdnAttributeId- The Attribute IdbValidated- true if we want the validated resource- Returns:
- the instance of the DocumentResource
-
selectAllPrimaryKeys
java.util.Collection<java.lang.Integer> selectAllPrimaryKeys()
Gets all documents id- Returns:
- A collection of Integer
-
selectAll
java.util.List<Document> selectAll()
Gets all documents- Returns:
- the document list
-
selectPrimaryKeysByFilter
java.util.Collection<java.lang.Integer> selectPrimaryKeysByFilter(DocumentFilter filter)
Load the list of documents- Parameters:
filter- The DocumentFilter Object- Returns:
- The Collection of the Document ids
-
selectByFilter
java.util.List<Document> selectByFilter(DocumentFilter filter)
Load the list of documents- Parameters:
filter- The DocumentFilter Object- Returns:
- The Collection of the Documents
-
selectByRelatedCategories
java.util.List<Document> selectByRelatedCategories(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 documentbUpdateContent- the boolean
-
loadAttributes
void loadAttributes(Document document)
Load document attributes- Parameters:
document- the reference of the document
-
loadAttributesWithoutBinaries
void loadAttributesWithoutBinaries(Document document, boolean bValidated)
Load document attributes- Parameters:
document- the reference of the documentbValidated- true if the content of the document must be validated, false otherwise
-
getPageTemplateDocumentPath
java.lang.String getPageTemplateDocumentPath(int idPageTemplateDocument)
Load document pageTemplatePath- Parameters:
idPageTemplateDocument- the Id page template identifier- Returns:
- The page template document path
-
loadLastModifiedAttributes
Document loadLastModifiedAttributes(int nDocumentId)
Load document type and date last modification for HTTP GET conditional request ("If-Modified-Since")- Parameters:
nDocumentId-- Returns:
- the document
-
validateAttributes
void validateAttributes(int nDocumentId)
Validate the document attributes- Parameters:
nDocumentId- the Id of the document
-
loadLastModifiedDocumentFromUser
Document loadLastModifiedDocumentFromUser(java.lang.String strUserName)
Load the data of last Document the user worked in from the table- Parameters:
strUserName- the user name- Returns:
- the instance of the Document
-
loadLastPublishedDocument
Document loadLastPublishedDocument()
Load the data of last Document the user worked in from the table- Returns:
- the instance of the Document
-
-