Package com.openindex.openestate.tool.db
Class DbUpdateHandlerImpl
- java.lang.Object
-
- com.openindex.openestate.tool.db.DbUpdateHandlerImpl
-
- All Implemented Interfaces:
DbUpdateHandler,Comparable<DbUpdateHandler>
- Direct Known Subclasses:
HSqlDbUpdateHandler
public abstract class DbUpdateHandlerImpl extends Object implements DbUpdateHandler
DbUpdateHandlerImpl.- Author:
- Andreas Rudolph
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDbUpdateHandlerImpl.Type
-
Field Summary
-
Fields inherited from interface com.openindex.openestate.tool.db.DbUpdateHandler
PRIORITY_APP, PRIORITY_PLUGIN, PRIORITY_PLUGIN_RELATION
-
-
Constructor Summary
Constructors Constructor Description DbUpdateHandlerImpl(String id, DbUpdateHandlerImpl.Type type, long localVersion, String uninstallQuery, String resourcePath, ClassLoader classLoader, AbstractDbUpdateListener listener)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(DbUpdateHandler o)booleanequals(Object o)abstract voidexecute(Connection c, String file)ClassLoadergetClassLoader()longgetDbVersion(Connection c, DbExtension dbExtension)StringgetId()longgetLocalVersion()StringgetParentUpdateId(long version)LonggetParentUpdateVersion(long version)intgetPriority()StringgetResourcePath()DbUpdateHandlerImpl.TypegetType()StringgetUninstallQuery()inthashCode()protected PropertiesloadSettings()voidregister(Connection c, AbstractDbDriver dbDriver, DbExtension dbExtension, long version)voidupdate(Connection c, AbstractDbDriver dbDriver, long version)voidupdateFinish(Connection c, AbstractDbDriver dbDriver, long version)voidupdateFinished(Connection c, AbstractDbDriver dbDriver, DbExtension dbExtension, long oldDbVersion, long newDbVersion)
-
-
-
Constructor Detail
-
DbUpdateHandlerImpl
public DbUpdateHandlerImpl(String id, DbUpdateHandlerImpl.Type type, long localVersion, String uninstallQuery, String resourcePath, ClassLoader classLoader, AbstractDbUpdateListener listener)
-
-
Method Detail
-
compareTo
public int compareTo(DbUpdateHandler o)
- Specified by:
compareToin interfaceComparable<DbUpdateHandler>
-
execute
public abstract void execute(Connection c, String file) throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getClassLoader
public final ClassLoader getClassLoader()
-
getDbVersion
public final long getDbVersion(Connection c, DbExtension dbExtension) throws SQLException, IOException
- Specified by:
getDbVersionin interfaceDbUpdateHandler- Throws:
SQLExceptionIOException
-
getLocalVersion
public final long getLocalVersion()
- Specified by:
getLocalVersionin interfaceDbUpdateHandler
-
getId
public final String getId()
- Specified by:
getIdin interfaceDbUpdateHandler
-
getParentUpdateId
public final String getParentUpdateId(long version)
- Specified by:
getParentUpdateIdin interfaceDbUpdateHandler
-
getParentUpdateVersion
public final Long getParentUpdateVersion(long version)
- Specified by:
getParentUpdateVersionin interfaceDbUpdateHandler
-
getPriority
public final int getPriority()
- Specified by:
getPriorityin interfaceDbUpdateHandler
-
getResourcePath
public final String getResourcePath()
-
getType
public final DbUpdateHandlerImpl.Type getType()
-
getUninstallQuery
public final String getUninstallQuery()
- Specified by:
getUninstallQueryin interfaceDbUpdateHandler
-
loadSettings
protected Properties loadSettings() throws IOException
- Throws:
IOException
-
register
public void register(Connection c, AbstractDbDriver dbDriver, DbExtension dbExtension, long version) throws SQLException, IOException
- Specified by:
registerin interfaceDbUpdateHandler- Throws:
SQLExceptionIOException
-
update
public void update(Connection c, AbstractDbDriver dbDriver, long version) throws SQLException, IOException
- Specified by:
updatein interfaceDbUpdateHandler- Throws:
SQLExceptionIOException
-
updateFinish
public void updateFinish(Connection c, AbstractDbDriver dbDriver, long version) throws SQLException, IOException
- Specified by:
updateFinishin interfaceDbUpdateHandler- Throws:
SQLExceptionIOException
-
updateFinished
public void updateFinished(Connection c, AbstractDbDriver dbDriver, DbExtension dbExtension, long oldDbVersion, long newDbVersion) throws SQLException, IOException
- Specified by:
updateFinishedin interfaceDbUpdateHandler- Throws:
SQLExceptionIOException
-
-