public class DbCreateDatabase extends AbstractRepositoryWriter<StringBean,String>
AbstractRepositoryWriter.OP
Modifier and Type | Field and Description |
---|---|
protected String |
adminPass |
protected String |
SQLFile |
protected String |
userPass |
exec, operation, queryexec
Constructor and Description |
---|
DbCreateDatabase() |
DbCreateDatabase(String guestpass,
String adminpass) |
DbCreateDatabase(String guest,
String guestpass,
String admin,
String adminpass) |
Modifier and Type | Method and Description |
---|---|
String |
create(StringBean database) |
void |
createDatabase(String newDb) |
void |
createTables(String newDB) |
static boolean |
dbExists(Connection connection,
String dbname) |
static void |
dropTables(Connection connection,
String dbname,
List<String> table_names) |
static void |
dropTables(Connection connection,
String dbname,
String[] table_names) |
String |
getAdminPass() |
static String |
getDbVersion(Connection connection,
String dbname) |
String |
getSQLFile() |
String |
getUserPass() |
boolean |
isUseExistingDatabase() |
void |
setAdminPass(String adminPass) |
void |
setSQLFile(String file) |
void |
setUseExistingDatabase(boolean useExistingDatabase) |
void |
setUserPass(String userPass) |
static List<String> |
tablesExists(Connection connection,
String dbname) |
close, delete, getOperation, open, prepareStatement, process, read, setConnection, setOperation, transaction, update, write
getConnection, isCloseConnection, isEnabled, setCloseConnection
addPropertyChangeListener, addPropertyChangeListener, getID, removePropertyChangeListener, removePropertyChangeListener, setEnabled, toString
protected String adminPass
protected String userPass
protected String SQLFile
public boolean isUseExistingDatabase()
public void setUseExistingDatabase(boolean useExistingDatabase)
public String getAdminPass()
public void setAdminPass(String adminPass)
public String getUserPass()
public void setUserPass(String userPass)
public String create(StringBean database) throws SQLException
create
in class AbstractRepositoryWriter<StringBean,String>
SQLException
public void createDatabase(String newDb) throws SQLException
SQLException
public void createTables(String newDB) throws SQLException
SQLException
public String getSQLFile()
public void setSQLFile(String file)
public static boolean dbExists(Connection connection, String dbname) throws Exception
Exception
public static String getDbVersion(Connection connection, String dbname) throws Exception
Exception
public static void dropTables(Connection connection, String dbname, List<String> table_names) throws Exception
Exception
public static void dropTables(Connection connection, String dbname, String[] table_names) throws Exception
Exception
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.