|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.unimi.dico.islab.idbs2.kc.session.KCManager
public class KCManager
Manages object saving and querying for KnowledgeChunk
wrapper. This class contains
most used interrogations (such as getKnowledgeChunkById
and methods for saving an
object of this class.
IMPORTANT: this class has no public constructor. A singleton instance of this class is contained
in KCSessionManager
class
Method Summary | |
---|---|
protected static KCManager |
getKCManager()
|
KnowledgeChunk |
getKnowledgeChunkById(String id)
Used to load a KnowledgeChunk instance from the database. |
void |
saveOrUpdate(KnowledgeChunk kc)
Give persistence to the given KnowledgeChunk object using associated Hibernate mappings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
protected static KCManager getKCManager()
public KnowledgeChunk getKnowledgeChunkById(String id)
getSessionFactory
method.
id
- the identifier of a Knowledge Chunk.
public void saveOrUpdate(KnowledgeChunk kc)
Give persistence to the given KnowledgeChunk
object using associated Hibernate mappings.
This method executes the saveOrUpdate
method of the Hibernate Session
using
internal Session Factory of KCSessionManager
.
As the KnowledgeChunk
is the main class of this package, by saving this object a cascade save is started for all connected objects (predicates
and all referred kcs, types, terms, documents and documentextractions).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |