@Component @PropertySource(value="classpath:/application.properties") public class ScriptExecutor extends Object
| Modifier and Type | Field and Description |
|---|---|
static String[] |
ALL_SQL_FILES |
static boolean |
CONTINUE_ON_ERROR |
static boolean |
FAIL_ON_ERROR |
| Constructor and Description |
|---|
ScriptExecutor(String dbVendor) |
ScriptExecutor(String dbVendor,
DataSource datasource) |
| Modifier and Type | Method and Description |
|---|---|
void |
createAndInitializePlatformIfNecessary() |
void |
createTables() |
void |
deleteTables() |
protected void |
executeSQLResource(String sqlFile,
boolean shouldContinueOnError) |
protected void |
executeSQLResources(List<String> sqlFiles,
boolean shouldContinueOnError) |
void |
initializePlatformStructure() |
protected void |
insertPlatform() |
boolean |
isPlatformAlreadyCreated() |
public static final boolean CONTINUE_ON_ERROR
public static final boolean FAIL_ON_ERROR
public static final String[] ALL_SQL_FILES
@Autowired
public ScriptExecutor(@Value(value="${db.vendor}")
String dbVendor)
throws NamingException
NamingExceptionpublic ScriptExecutor(String dbVendor, DataSource datasource)
public void createTables()
throws PlatformException
PlatformExceptionpublic void createAndInitializePlatformIfNecessary()
throws PlatformException
PlatformExceptionprotected void insertPlatform()
throws PlatformException
PlatformExceptionpublic boolean isPlatformAlreadyCreated()
protected void executeSQLResources(List<String> sqlFiles, boolean shouldContinueOnError) throws IOException, SQLException
sqlFiles - the sql files to executeshouldContinueOnError - SQLExceptionIOExceptionprotected void executeSQLResource(String sqlFile, boolean shouldContinueOnError) throws IOException, SQLException
sqlFile - the sql file to executeshouldContinueOnError - IOExceptionSQLExceptionpublic void initializePlatformStructure()
throws PlatformException
PlatformExceptionpublic void deleteTables()
throws PlatformException
PlatformExceptionCopyright © 2017 Bonitasoft. All rights reserved.