|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.openutils.migration.DefaultDbVersionManagerImpl
public class DefaultDbVersionManagerImpl
<bean class="it.openutils.migration.DefaultDbVersionManagerImpl">
<property name="dataSource" ref="dataSource" />
<property name="versionQuery">
<value>SELECT DBVERSION FROM DBVERSION</value>
</property>
<property name="versionUpdate">
<value>UPDATE DBVERSION SET DBVERSION = ?</value>
</property>
<property name="versionCreate">
<value>INSERT INTO DBVERSION(DBVERSION) VALUES (0)</value>
</property>
</bean>
| Constructor Summary | |
|---|---|
DefaultDbVersionManagerImpl()
|
|
| Method Summary | |
|---|---|
int |
getCurrentVersion()
Returns the current version for the db, usually reading from a configuration table. |
void |
setDataSource(javax.sql.DataSource dataSource)
Sets the dataSource. |
void |
setNewVersion(int version)
Saves a new version for the db. |
void |
setVersionCreate(java.lang.String versionCreate)
Sets the versionCreate. |
void |
setVersionQuery(java.lang.String versionQuery)
Sets the versionQuery. |
void |
setVersionUpdate(java.lang.String versionUpdate)
Sets the versionUpdate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultDbVersionManagerImpl()
| Method Detail |
|---|
public void setVersionCreate(java.lang.String versionCreate)
versionCreate - the versionCreate to setpublic void setVersionQuery(java.lang.String versionQuery)
versionQuery - the versionQuery to setpublic void setVersionUpdate(java.lang.String versionUpdate)
versionUpdate - the versionUpdate to setpublic void setDataSource(javax.sql.DataSource dataSource)
dataSource - the dataSource to setpublic int getCurrentVersion()
getCurrentVersion in interface DbVersionManagerpublic void setNewVersion(int version)
setNewVersion in interface DbVersionManagerversion - new version
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||