public abstract class DatabaseHelper extends Object
Modifier and Type | Field and Description |
---|---|
static DatabaseHelper |
DATABASE |
static String |
DATABASE_PROPERTY |
static String |
DB_CLASS_NAME_BASE |
static String |
DB_DEFAULT |
static String |
DB_PROPERTY |
static String |
DRIVER_PROPERTY |
static String |
PASSWORD_PROPERTY |
static String |
PORT_PROPERTY |
static String |
REPOSITORY_PROPERTY |
String |
repositoryName |
static String |
SERVER_PROPERTY |
static String |
URL_PROPERTY |
static String |
USER_PROPERTY |
Constructor and Description |
---|
DatabaseHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
doOnAllTables(Connection connection,
String catalog,
String schemaPattern,
String statement)
Executes one statement on all the tables in a database.
|
abstract String |
getDeploymentContrib() |
String |
getPooledDeploymentContrib() |
int |
getRecursiveRemovalDepthLimit()
For databases that fail to cascade deletes beyond a certain depth.
|
abstract RepositoryDescriptor |
getRepositoryDescriptor() |
boolean |
hasSubSecondResolution()
For databases that don't have subsecond resolution, like MySQL.
|
void |
maybeSleepToNextSecond()
For databases that don't have subsecond resolution, sleep a bit to get to
the next second.
|
static void |
setDatabaseForTests(String className)
Sets the database backend used for VCS unit tests.
|
void |
setDatabaseName(String name) |
static String |
setProperty(String name,
String def) |
void |
setRepositoryName(String name) |
abstract void |
setUp() |
void |
sleepForFulltext()
For databases that do asynchronous fulltext indexing, sleep a bit.
|
boolean |
supportsClustering()
For databases that don't support clustering.
|
boolean |
supportsMultipleFulltextIndexes() |
void |
tearDown() |
public static final String DB_PROPERTY
public static final String DB_DEFAULT
public static DatabaseHelper DATABASE
public static final String DB_CLASS_NAME_BASE
public static final String REPOSITORY_PROPERTY
public static final String DRIVER_PROPERTY
public static final String URL_PROPERTY
public static final String SERVER_PROPERTY
public static final String PORT_PROPERTY
public static final String DATABASE_PROPERTY
public static final String USER_PROPERTY
public static final String PASSWORD_PROPERTY
public String repositoryName
public void setDatabaseName(String name)
public void setRepositoryName(String name)
public static void setDatabaseForTests(String className)
public static void doOnAllTables(Connection connection, String catalog, String schemaPattern, String statement) throws SQLException
SQLException
public void tearDown() throws SQLException
SQLException
public abstract String getDeploymentContrib()
public abstract RepositoryDescriptor getRepositoryDescriptor()
public void sleepForFulltext()
public void maybeSleepToNextSecond()
public boolean hasSubSecondResolution()
public int getRecursiveRemovalDepthLimit()
public boolean supportsClustering()
public boolean supportsMultipleFulltextIndexes()
public String getPooledDeploymentContrib()
Copyright © 2011 Nuxeo SA. All Rights Reserved.