public final class TestsUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
clearSchema()
Clears database schema.
|
static DatabaseType |
getDatabaseType(Properties dataSourceProperties)
Gets database type based on dialect property specified in data source properties.
|
static DatabaseType |
getDatabaseTypeBySQLDialect(String sqlDialect)
Gets database type based on specified SQL dialect.
|
static File[] |
getDDLScriptFilesByDatabaseType(File folderWithDDLs,
DatabaseType databaseType,
boolean sortByName,
boolean dropFiles)
Gets SQL scripts for selected database type.
|
static byte[] |
hexStringToByteArray(String hexString) |
public static File[] getDDLScriptFilesByDatabaseType(File folderWithDDLs, DatabaseType databaseType, boolean sortByName, boolean dropFiles)
folderWithDDLs
- Root folder containing SQL scripts for all database types.databaseType
- Database type.sortByName
- If true, resulting array of SQL script files will be sorted by filename using String
comparator.dropFiles
- If true, return those files that don't contain 'drop' into the name. Otherwise,
return those containing 'drop'public static DatabaseType getDatabaseType(Properties dataSourceProperties)
dataSourceProperties
- Data source properties.public static DatabaseType getDatabaseTypeBySQLDialect(String sqlDialect)
sqlDialect
- SQL dialect.public static byte[] hexStringToByteArray(String hexString)
public static void clearSchema()
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.