|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.core.ProperObject
proper.database.Creator
public class Creator
This class creates databases on a given host.
Field Summary | |
---|---|
static java.lang.String |
NAME
the placeholder for the name |
Fields inherited from interface proper.core.ProperInterface |
---|
VERSION |
Constructor Summary | |
---|---|
Creator()
initializes the object (it initializes with the MySQL driver) |
|
Creator(java.lang.String url)
connects with the MySQL-Driver to the given host/database |
|
Creator(java.lang.String url,
java.lang.String user)
connects with the MySQL-Driver to the given host/database w/o password |
|
Creator(java.lang.String url,
java.lang.String user,
java.lang.String password)
connects with the MySQL-Driver to the given host/database with user/pw |
|
Creator(java.lang.String driver,
java.lang.String url,
java.lang.String user,
java.lang.String password)
connects to the database with the given driver, url, etc. |
Method Summary | |
---|---|
boolean |
create(java.lang.String name)
creates the database if not existing |
boolean |
exists(java.lang.String name)
checks whether the database already exists |
java.lang.String |
getCreateStatement()
returns the SQL statement for creating databases on the host, includes the placeholder NAME |
java.lang.Exception |
getLastException()
returns the last exception, can be null |
java.lang.String |
getLastStatement()
returns the last SQL statement |
void |
setCreateStatement(java.lang.String statement)
sets the SQL statement for creating the databases on the host, includes the placeholder NAME |
Methods inherited from class proper.core.ProperObject |
---|
addListener, addOutput, classInVerbose, debugprint, debugprint, debugprint, debugprint, debugprintln, debugprintln, debugprintln, debugprintln, debugprintln, getListeners, getRuntime, getVerbose, getVerboseLevel, getVerboseLevelForClass, getVerboseString, getVerboseStringForClass, notifyListener, notifyListeners, print, print, print, print, println, println, println, println, println, printMemory, removeListener, setOutput, setVerbose, setVerboseLevel, setVerboseString, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME
setCreateStatement(String)
,
Constant Field ValuesConstructor Detail |
---|
public Creator() throws java.lang.Exception
java.lang.Exception
public Creator(java.lang.String url) throws java.lang.Exception
url
- the url consists of jdbc:subprotocol://host[:port]/
java.lang.Exception
public Creator(java.lang.String url, java.lang.String user) throws java.lang.Exception
url
- the url consists of jdbc:subprotocol://host[:port]/user
- the user to connect as
java.lang.Exception
public Creator(java.lang.String url, java.lang.String user, java.lang.String password) throws java.lang.Exception
url
- the url consists of jdbc:subprotocol://host[:port]/user
- the user to connect aspassword
- the corresponding password
java.lang.Exception
public Creator(java.lang.String driver, java.lang.String url, java.lang.String user, java.lang.String password) throws java.lang.Exception
driver
- the class to use as driverurl
- the url consists of jdbc:subprotocol://host[:port]/user
- the user to connect aspassword
- the corresponding password
java.lang.Exception
Method Detail |
---|
public void setCreateStatement(java.lang.String statement)
statement
- the SQL statementNAME
public java.lang.String getCreateStatement()
NAME
public boolean exists(java.lang.String name)
public boolean create(java.lang.String name)
public java.lang.Exception getLastException()
public java.lang.String getLastStatement()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |