Package liquibase.database
Class OfflineConnection
java.lang.Object
liquibase.database.OfflineConnection
- All Implemented Interfaces:
AutoCloseable,DatabaseConnection,PrioritizedService
-
Field Summary
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE, PRIORITY_DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()voidcommit()protected ChangeLogHistoryServicecreateChangeLogHistoryService(Database database) booleanintintintbooleangetSnapshot(DatabaseObject[] examples) Returns a copy of the current simulated content of the database, filtered by the given array.getURL()booleanbooleanisClosed()booleanisCorrectDatabaseImplementation(Database database) voidopen(String url, Driver driverObject, Properties driverProperties) voidrollback()voidsetAutoCommit(boolean autoCommit) voidsetCaseSensitive(boolean caseSensitive) voidsetConnectionUserName(String connectionUserName) voidsetDatabaseMajorVersion(int databaseMajorVersion) voidsetDatabaseMinorVersion(int databaseMinorVersion) voidsetProductName(String productName) voidsetProductVersion(String productVersion) voidsetSendsStringParametersAsUnicode(boolean sendsStringParametersAsUnicode) voidsetSnapshot(DatabaseSnapshot snapshot) For debugging purposes: sets a DatabaseSnapshot object for this connection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface liquibase.database.DatabaseConnection
getUnderlyingConnection, getVisibleUrl, supports
-
Constructor Details
-
OfflineConnection
public OfflineConnection() -
OfflineConnection
-
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfacePrioritizedService
-
isCorrectDatabaseImplementation
-
open
public void open(String url, Driver driverObject, Properties driverProperties) throws DatabaseException - Specified by:
openin interfaceDatabaseConnection- Throws:
DatabaseException
-
attached
- Specified by:
attachedin interfaceDatabaseConnection
-
createChangeLogHistoryService
-
getSnapshot
Returns a copy of the current simulated content of the database, filtered by the given array.- Parameters:
examples- the list of objects to clone- Returns:
- a new DatabaseSnapshot object containing all objects matching examples. If none are found, an empty DatabaseSnapshot is returned.
-
setSnapshot
For debugging purposes: sets a DatabaseSnapshot object for this connection. Effectively, this simulates the content of the database in this OfflineConnection.- Parameters:
snapshot- the snapshot with the simulated database content
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceDatabaseConnection- Throws:
DatabaseException
-
commit
- Specified by:
commitin interfaceDatabaseConnection- Throws:
DatabaseException
-
getAutoCommit
- Specified by:
getAutoCommitin interfaceDatabaseConnection- Throws:
DatabaseException
-
setAutoCommit
- Specified by:
setAutoCommitin interfaceDatabaseConnection- Throws:
DatabaseException
-
getCatalog
- Specified by:
getCatalogin interfaceDatabaseConnection- Throws:
DatabaseException
-
getSchema
-
nativeSQL
- Specified by:
nativeSQLin interfaceDatabaseConnection- Throws:
DatabaseException
-
rollback
- Specified by:
rollbackin interfaceDatabaseConnection- Throws:
DatabaseException
-
getDatabaseProductName
- Specified by:
getDatabaseProductNamein interfaceDatabaseConnection- Throws:
DatabaseException
-
getDatabaseProductVersion
- Specified by:
getDatabaseProductVersionin interfaceDatabaseConnection- Throws:
DatabaseException
-
getDatabaseMajorVersion
- Specified by:
getDatabaseMajorVersionin interfaceDatabaseConnection- Throws:
DatabaseException
-
setDatabaseMajorVersion
public void setDatabaseMajorVersion(int databaseMajorVersion) -
setProductVersion
-
setProductName
-
getDatabaseMinorVersion
- Specified by:
getDatabaseMinorVersionin interfaceDatabaseConnection- Throws:
DatabaseException
-
setDatabaseMinorVersion
public void setDatabaseMinorVersion(int databaseMinorVersion) -
getURL
- Specified by:
getURLin interfaceDatabaseConnection
-
getConnectionUserName
- Specified by:
getConnectionUserNamein interfaceDatabaseConnection
-
setConnectionUserName
-
isClosed
- Specified by:
isClosedin interfaceDatabaseConnection- Throws:
DatabaseException
-
getSendsStringParametersAsUnicode
public boolean getSendsStringParametersAsUnicode() -
setSendsStringParametersAsUnicode
public void setSendsStringParametersAsUnicode(boolean sendsStringParametersAsUnicode) -
isCaseSensitive
public boolean isCaseSensitive() -
setCaseSensitive
public void setCaseSensitive(boolean caseSensitive)
-