org.nuiton.topia.migration
Class ManualMigrationEngine

java.lang.Object
  extended by org.nuiton.topia.migration.ManualMigrationEngine
All Implemented Interfaces:
EventListener, TopiaContextListener, TopiaTransactionVetoable, TopiaService, TopiaMigrationService

Deprecated. since 2.3.4, please use now the simplify service TopiaMigrationEngine

@Deprecated
public class ManualMigrationEngine
extends Object
implements TopiaMigrationService, TopiaContextListener, TopiaTransactionVetoable

TopiaMigrationServiceImpl.java

Classe principale du projet.

Author:
tchemit

Field Summary
protected  org.nuiton.util.Version applicationVersion
          Deprecated. Version courante de l'application (initialise en pre-init)
protected  ManualMigrationCallback callback
          Deprecated. CallbackHandler list (initialise en pre-init)
protected  boolean dbNotVersioned
          Deprecated. Drapeau pour savoir si la base est versionnée ou non
protected  org.nuiton.util.Version dbVersion
          Deprecated. Version courante de la base (initialise en pre-init)
protected  boolean init
          Deprecated. Un drapeau pour savoir si le service a bien ete initialise (i.e a bien fini la methode preInit)
protected  String mappingsDirectory
          Deprecated. Chemin du dossier contenant les schemas de toutes les versions (initialise en pre-init)
protected  boolean migrateOnInit
          Deprecated. Un drapeau pour effectuer la migration au demarrage (initialise en pre-init)
static String MIGRATION_APPLICATION_VERSION
          Deprecated. La version de référence
static String MIGRATION_MAPPING_DIRECTORY
          Deprecated. L'emplacement de tous les mappings
static String MIGRATION_MODEL_NAME
          Deprecated. Les noms des modèles connus
protected  TopiaContextImplementor rootContext
          Deprecated. topia root context (initialise en pre-init)
protected  boolean showProgression
          Deprecated. Un drapeau pour afficher la progression des requetes sql executees
protected  boolean showSql
          Deprecated. Un drapeau pour afficher les requetes sql executees
protected  org.hibernate.cfg.Configuration versionConfiguration
          Deprecated. Configuration hibernate ne mappant que l'entite version (initialise en pre-init)
protected  SortedSet<org.nuiton.util.Version> versions
          Deprecated. ensemble des versions connues par le service
protected  boolean versionTableExist
          Deprecated. Un drapeau pour savoir si la table version existe en base (initialise en pre-init)
 
Fields inherited from interface org.nuiton.topia.migration.TopiaMigrationService
MIGRATION_CALLBACK, MIGRATION_MIGRATE_ON_INIT, MIGRATION_SHOW_PROGRESSION, MIGRATION_SHOW_SQL, SERVICE_NAME, TOPIA_SERVICE_NAME
 
Constructor Summary
ManualMigrationEngine()
          Deprecated.  
 
Method Summary
 void beginTransaction(TopiaTransactionEvent event)
          Deprecated.  
protected  void checkInit()
          Deprecated.  
protected  void detectDbVersion()
          Deprecated. Recupere depuis la base les états internes du service :

versionTableExist dbVersion

 void doMigrateSchema()
          Deprecated.  
 Class<?>[] getPersistenceClasses()
          Deprecated.  
 String getServiceName()
          Deprecated.  
protected  SortedSet<org.nuiton.util.Version> getVersions()
          Deprecated. Recupere toutes les versions prises en charge par le service de migration.
 boolean migrateSchema()
          Deprecated.  
 void postCreateSchema(TopiaContextEvent event)
          Deprecated.  
 boolean postInit(TopiaContextImplementor context)
          Deprecated.  
 void postRestoreSchema(TopiaContextEvent event)
          Deprecated.  
 void postUpdateSchema(TopiaContextEvent event)
          Deprecated.  
 void preCreateSchema(TopiaContextEvent event)
          Deprecated.  
 boolean preInit(TopiaContextImplementor context)
          Deprecated.  
 void preRestoreSchema(TopiaContextEvent event)
          Deprecated.  
 void preUpdateSchema(TopiaContextEvent event)
          Deprecated.  
 void saveVersion(org.nuiton.util.Version version)
          Deprecated. Enregistre la version donnee en base avec creation de la table si elle n'existe pas.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIGRATION_APPLICATION_VERSION

public static final String MIGRATION_APPLICATION_VERSION
Deprecated. 
La version de référence

See Also:
Constant Field Values

MIGRATION_MAPPING_DIRECTORY

public static final String MIGRATION_MAPPING_DIRECTORY
Deprecated. 
L'emplacement de tous les mappings

See Also:
Constant Field Values

MIGRATION_MODEL_NAME

public static final String MIGRATION_MODEL_NAME
Deprecated. 
Les noms des modèles connus

See Also:
Constant Field Values

versionConfiguration

protected org.hibernate.cfg.Configuration versionConfiguration
Deprecated. 
Configuration hibernate ne mappant que l'entite version (initialise en pre-init)


mappingsDirectory

protected String mappingsDirectory
Deprecated. 
Chemin du dossier contenant les schemas de toutes les versions (initialise en pre-init)


versions

protected SortedSet<org.nuiton.util.Version> versions
Deprecated. 
ensemble des versions connues par le service


applicationVersion

protected org.nuiton.util.Version applicationVersion
Deprecated. 
Version courante de l'application (initialise en pre-init)


versionTableExist

protected boolean versionTableExist
Deprecated. 
Un drapeau pour savoir si la table version existe en base (initialise en pre-init)


dbVersion

protected org.nuiton.util.Version dbVersion
Deprecated. 
Version courante de la base (initialise en pre-init)


dbNotVersioned

protected boolean dbNotVersioned
Deprecated. 
Drapeau pour savoir si la base est versionnée ou non


migrateOnInit

protected boolean migrateOnInit
Deprecated. 
Un drapeau pour effectuer la migration au demarrage (initialise en pre-init)


callback

protected ManualMigrationCallback callback
Deprecated. 
CallbackHandler list (initialise en pre-init)


rootContext

protected TopiaContextImplementor rootContext
Deprecated. 
topia root context (initialise en pre-init)


init

protected boolean init
Deprecated. 
Un drapeau pour savoir si le service a bien ete initialise (i.e a bien fini la methode preInit)


showSql

protected boolean showSql
Deprecated. 
Un drapeau pour afficher les requetes sql executees


showProgression

protected boolean showProgression
Deprecated. 
Un drapeau pour afficher la progression des requetes sql executees

Constructor Detail

ManualMigrationEngine

public ManualMigrationEngine()
Deprecated. 
Method Detail

getPersistenceClasses

public Class<?>[] getPersistenceClasses()
Deprecated. 
Specified by:
getPersistenceClasses in interface TopiaService

getServiceName

public String getServiceName()
Deprecated. 
Specified by:
getServiceName in interface TopiaService

preInit

public boolean preInit(TopiaContextImplementor context)
Deprecated. 
Specified by:
preInit in interface TopiaService

postInit

public boolean postInit(TopiaContextImplementor context)
Deprecated. 
Specified by:
postInit in interface TopiaService

preCreateSchema

public void preCreateSchema(TopiaContextEvent event)
Deprecated. 
Specified by:
preCreateSchema in interface TopiaContextListener

preRestoreSchema

public void preRestoreSchema(TopiaContextEvent event)
Deprecated. 
Specified by:
preRestoreSchema in interface TopiaContextListener

preUpdateSchema

public void preUpdateSchema(TopiaContextEvent event)
Deprecated. 
Specified by:
preUpdateSchema in interface TopiaContextListener

postCreateSchema

public void postCreateSchema(TopiaContextEvent event)
Deprecated. 
Specified by:
postCreateSchema in interface TopiaContextListener

postUpdateSchema

public void postUpdateSchema(TopiaContextEvent event)
Deprecated. 
Specified by:
postUpdateSchema in interface TopiaContextListener

postRestoreSchema

public void postRestoreSchema(TopiaContextEvent event)
Deprecated. 
Specified by:
postRestoreSchema in interface TopiaContextListener

beginTransaction

public void beginTransaction(TopiaTransactionEvent event)
Deprecated. 
Specified by:
beginTransaction in interface TopiaTransactionVetoable

doMigrateSchema

public void doMigrateSchema()
                     throws MigrationServiceException
Deprecated. 
Throws:
MigrationServiceException

migrateSchema

public boolean migrateSchema()
                      throws MigrationServiceException
Deprecated. 
Specified by:
migrateSchema in interface TopiaMigrationService
Throws:
MigrationServiceException

saveVersion

public void saveVersion(org.nuiton.util.Version version)
Deprecated. 
Enregistre la version donnee en base avec creation de la table si elle n'existe pas.

Parameters:
version - la nouvelle version de la base

getVersions

protected SortedSet<org.nuiton.util.Version> getVersions()
                                                  throws MigrationServiceException
Deprecated. 
Recupere toutes les versions prises en charge par le service de migration.

Returns:
l'ensemble triee (par ordre croissant) de toutes les versions detectees a partir du repertoire des mappings pour le modele donne.
Throws:
MigrationServiceException - pour tout probleme

detectDbVersion

protected void detectDbVersion()
Deprecated. 
Recupere depuis la base les états internes du service :


checkInit

protected void checkInit()
Deprecated. 


Copyright © 2004-2010 CodeLutin. All Rights Reserved.