Package org.nuiton.topia.persistence
Class HibernateTopiaMigrationService
java.lang.Object
org.nuiton.topia.persistence.HibernateTopiaMigrationService
- All Implemented Interfaces:
TopiaMigrationService,TopiaService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Called when service is no longer necessary.voidThe schema has been created by ToPIA, the service should init the migration engine and store the schema version somewhere.voidinitTopiaService(TopiaApplicationContext topiaApplicationContext, Map<String, String> serviceConfiguration) Initialize the service.voidThe schema already exists in an unknown version, service should update the schema if necessary.
-
Field Details
-
topiaApplicationContext
-
-
Constructor Details
-
HibernateTopiaMigrationService
public HibernateTopiaMigrationService()
-
-
Method Details
-
initTopiaService
public void initTopiaService(TopiaApplicationContext topiaApplicationContext, Map<String, String> serviceConfiguration) Description copied from interface:TopiaServiceInitialize the service.- Specified by:
initTopiaServicein interfaceTopiaService- Parameters:
topiaApplicationContext- is theTopiaApplicationContextto which the current service is attached. It's the service responsibility to keep a reference to it.serviceConfiguration- all the configuration directives for this service.
-
getSchemaVersion
- Specified by:
getSchemaVersionin interfaceTopiaMigrationService- Returns:
- the schema version according to the meta-data information about the actual current state of the schema in the database.
-
initOnCreateSchema
public void initOnCreateSchema()Description copied from interface:TopiaMigrationServiceThe schema has been created by ToPIA, the service should init the migration engine and store the schema version somewhere.- Specified by:
initOnCreateSchemain interfaceTopiaMigrationService
-
runSchemaMigration
public void runSchemaMigration()Description copied from interface:TopiaMigrationServiceThe schema already exists in an unknown version, service should update the schema if necessary.- Specified by:
runSchemaMigrationin interfaceTopiaMigrationService
-
close
public void close()Description copied from interface:TopiaServiceCalled when service is no longer necessary. This method is called whenTopiaApplicationContext.close()is called.- Specified by:
closein interfaceTopiaService
-