public class DocumentManager extends Object
Document
wrapper. This class contains
most used interrogations (such as getDocumentChunkById
and methods for saving an
object of Document
class.
IMPORTANT: this class has no public constructor. A singleton instance of this class is contained
in KCSessionManager
class
Modifier and Type | Method and Description |
---|---|
Document |
getDocumentByUrl(String docUrl)
Used to load a Document instance from the database.
|
protected static DocumentManager |
getDocumentManager() |
void |
save(Document doc)
Give persistence to the given
Document object using associated Hibernate mappings. |
protected static DocumentManager getDocumentManager()
public Document getDocumentByUrl(String docUrl)
docUrl
- docUrl
as primary key.public void save(Document doc)
Give persistence to the given Document
object using associated Hibernate mappings.
This method executes the saveOrUpdate
method of the Hibernate Session
.
Every Document
object is saved in cascade mode by default when saving the owner KnowledgeChunk
object:
invoking this method directly will save doc
object and its parameters; no action will be performed for
other connected objects.
Document