|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.topia.ContextUtil
public abstract class ContextUtil
ContextUtil.java Created: 17 avril 2009
| Constructor Summary | |
|---|---|
protected |
ContextUtil()
|
protected |
ContextUtil(java.lang.Class current)
Constructeur avec Class correspondant à la sous-classe qui hérite de ContextUtil |
| Method Summary | |
|---|---|
void |
close()
Fermeture de la transaction courante |
void |
commit()
Commit de la transaction courante |
void |
disconnect()
Fermeture de la connexion à la BD |
TopiaContext |
getContext()
Retourne le contexte global pour créer les transactions |
void |
init()
Initialisation du TopiaContext global loadProperties est définit par les sous-classes pour charger le fichier de configuration et les classes pour Hibernate Une initialisation de la base de données est possible via la méthode initDB() à redéfinir par les sous-classes |
protected void |
initDB()
Initialisation de la base de données à redéfinir |
boolean |
isInit()
|
protected java.util.Properties |
loadFileProperties(java.lang.String filename)
Chargement d'un fichier de propriété |
protected abstract java.util.Properties |
loadProperties()
Chargement du ou des fichiers de propriétés nécessaires à Topia |
void |
rollback()
|
TopiaContext |
transaction()
Récupération transaction courante (ou création) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ContextUtil(java.lang.Class current)
current - protected ContextUtil()
| Method Detail |
|---|
public void init()
protected void initDB()
throws TopiaException
TopiaException
protected abstract java.util.Properties loadProperties()
throws java.io.IOException,
java.net.URISyntaxException
props -
java.io.IOException
java.net.URISyntaxException
protected java.util.Properties loadFileProperties(java.lang.String filename)
throws java.net.URISyntaxException,
java.io.IOException
filename - nom du fichierprops - propriétés à charger
java.net.URISyntaxException
java.io.IOExceptionpublic boolean isInit()
public TopiaContext getContext()
public void disconnect()
public TopiaContext transaction()
throws TopiaException
TopiaException
public void commit()
throws TopiaException
TopiaException
public void rollback()
throws TopiaException
TopiaException
public void close()
throws TopiaException
TopiaException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||