public class DatabaseUtil extends Object
Constructor and Description |
---|
DatabaseUtil(ConnectionInfo info) |
Modifier and Type | Method and Description |
---|---|
void |
clearDB() |
void |
clearDBJPA(boolean createSchema,
boolean showSql,
TestDataProvider testDataProvider) |
void |
clearDBJPA(boolean createSchema,
TestDataProvider testDataProvider) |
void |
delete(String path) |
void |
export(String name) |
void |
exportData(String dataName) |
void |
exportData(String dataName,
boolean clearDb,
Class<? extends TestDataProvider> testDataProviderClass) |
void |
exportData(String dataName,
Class<? extends TestDataProvider> testDataProvider) |
ConnectionInfo |
getConnectionInfo() |
void |
importData(Class<? extends TestDataProvider> testDataProviderClass) |
void |
importData(Map<String,String> properties,
Class<? extends TestDataProvider> testDataProvider) |
void |
importData(String name) |
void |
importData(String name,
boolean force) |
void |
importData(String name,
boolean force,
boolean clearDb) |
void |
importData(TestDataProvider testDataProvider) |
static Map<String,String> |
importTestData(Class<? extends TestDataProvider> class1)
Uses system-property 'hsqlPort' and returns a map containing
"hibernate.connection.url" =
|
static Map<String,String> |
importTestData(Class<? extends TestDataProvider> class1,
ConnectionInfo connectionInfo) |
void |
shutDown() |
void |
xlsToXml(String file) |
void |
xmlToXls(String file) |
public DatabaseUtil(ConnectionInfo info)
public void importData(Class<? extends TestDataProvider> testDataProviderClass) throws Exception
Exception
public void importData(TestDataProvider testDataProvider) throws Exception
Exception
public void importData(String name, boolean force, boolean clearDb) throws Exception
Exception
public void exportData(String dataName)
public void exportData(String dataName, boolean clearDb, Class<? extends TestDataProvider> testDataProviderClass)
public void exportData(String dataName, Class<? extends TestDataProvider> testDataProvider)
public void shutDown() throws SQLException
SQLException
public void importData(Map<String,String> properties, Class<? extends TestDataProvider> testDataProvider) throws Exception
Exception
public void clearDBJPA(boolean createSchema, TestDataProvider testDataProvider) throws Exception
Exception
public void clearDBJPA(boolean createSchema, boolean showSql, TestDataProvider testDataProvider) throws Exception
Exception
public void clearDB()
public void delete(String path)
public ConnectionInfo getConnectionInfo()
public static Map<String,String> importTestData(Class<? extends TestDataProvider> class1) throws Exception
class1
- Map
containing the
"hibernate.connection.url"-propertyException
public static Map<String,String> importTestData(Class<? extends TestDataProvider> class1, ConnectionInfo connectionInfo) throws Exception
Exception
Copyright © 2011–2017 aiticon GmbH. All rights reserved.