public class OpenHelperCallbacksImpl extends Object implements OpenHelperCallbacks
| Constructor and Description |
|---|
OpenHelperCallbacksImpl(String puName)
Create ClassyOpenHelperCallbacks object
|
| Modifier and Type | Method and Description |
|---|---|
void |
onCreate(com.j256.ormlite.support.ConnectionSource connectionSource)
What to do when your database needs to be created.
|
void |
onUpgrade(com.j256.ormlite.support.ConnectionSource connectionSource,
int oldVersion,
int newVersion)
What to do when your database needs to be updated.
|
void |
setDatabaseAdmin(DatabaseAdmin databaseAdmin) |
void |
setPersistenceAdmin(PersistenceAdmin persistenceAdmin) |
public OpenHelperCallbacksImpl(String puName)
puName - PersistenceUnitAdmin Unit namepublic void setDatabaseAdmin(DatabaseAdmin databaseAdmin)
setDatabaseAdmin in interface OpenHelperCallbackspublic void setPersistenceAdmin(PersistenceAdmin persistenceAdmin)
setPersistenceAdmin in interface OpenHelperCallbackspublic void onCreate(com.j256.ormlite.support.ConnectionSource connectionSource)
NOTE: You should use the connectionSource argument that is passed into this method call or the one returned by getConnectionSource(). If you use your own, a recursive call or other unexpected results may result.
onCreate in interface OpenHelperCallbacksconnectionSource - To use get connections to the database to be created.public void onUpgrade(com.j256.ormlite.support.ConnectionSource connectionSource,
int oldVersion,
int newVersion)
NOTE: You should use the connectionSource argument that is passed into this method call or the one returned by getConnectionSource(). If you use your own, a recursive call or other unexpected results may result.
onUpgrade in interface OpenHelperCallbacksconnectionSource - To use get connections to the database to be updated.oldVersion - The version of the current database so we can know what to do to the database.newVersion - The version that we are upgrading the database to.This documentation is licensed by Andrew Bowley under the GPLv3 License.