|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.AbstractUpdateToSchemaVersion
public abstract class AbstractUpdateToSchemaVersion
This abstract class contains methods to perform incremental update and adjustment of existing database items from a previous schema version to the version corresponding to this class. It contains common attributes and methods performing general consistency checks and update of schema version, and is intended to be the extended by classes that overrides the methods performing the actual update and adjustments of database items. Based on BASE2 class src/core/net/sf/basedb/core/Update.java, but adapted to use a main updater class that performs a general update by calling methods in classes that an incremental update from one version to the next.
| Constructor Summary | |
|---|---|
AbstractUpdateToSchemaVersion()
|
|
| Method Summary | |
|---|---|
int |
adjustExistingItems(org.hibernate.Session session)
Adjust the existing items in the database to be compatible with the latest mappings corresponding to this class. |
protected abstract int |
adjustItemsToNewSchemaVersion(org.hibernate.Session session)
Adjust the existing items in the database to be compatible with the latest mappings corresponding to this class. |
abstract int |
getUpdateSchemaVersion()
Get the update schema version. |
int |
update(org.hibernate.Session session)
Update the database by modifying existing items to follow new requirements. |
protected abstract int |
updateToNewSchemaVersion(org.hibernate.Session session)
Updates the database to the version corresponding to this class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractUpdateToSchemaVersion()
| Method Detail |
|---|
public int update(org.hibernate.Session session)
throws BaseException
update in interface UpdateToSchemaVersionInterfacesession - org.hibernate.Session a Hibernate session to use for transactions.
BaseException
public int adjustExistingItems(org.hibernate.Session session)
throws BaseException
adjustExistingItems in interface UpdateToSchemaVersionInterfacesession - org.hibernate.Session the Hibernate session to use.
BaseExceptionpublic abstract int getUpdateSchemaVersion()
protected abstract int updateToNewSchemaVersion(org.hibernate.Session session)
throws BaseException
session - org.hibernate.Session the Hibernate session to use.
BaseException
protected abstract int adjustItemsToNewSchemaVersion(org.hibernate.Session session)
throws BaseException
session - org.hibernate.Session the Hibernate session to use.
BaseException
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||