|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.figure8.join.core.setup.DatabaseDetails
public class DatabaseDetails
Wrapper for common database properties.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
Get a commons logger. |
static java.lang.String |
OTHER_DB
Constant for other, no officially supported database. |
static java.lang.String[] |
SUPPORTED_DB
Array of supported database names. |
Constructor Summary | |
---|---|
DatabaseDetails()
Creates a new instance of DatabaseDetails |
Method Summary | |
---|---|
java.lang.String |
getDatabaseUrl()
|
static DatabaseDetails |
getDefault(java.lang.String database)
Get a default details wrapping object for database name. |
protected static java.util.Properties |
getDefaultProperties(java.lang.String database)
Loading default properties for database from properties file in classpath |
java.lang.String |
getDialect()
|
java.lang.String |
getDriverClassname()
|
java.lang.String |
getPassword()
|
int |
getPoolSize()
|
java.lang.String |
getUsername()
|
static boolean |
isSupportedDatabase(java.lang.String database)
Tell if the given database name is officialy supported by Join. |
void |
setDatabaseUrl(java.lang.String url)
|
void |
setDialect(java.lang.String dialect)
|
void |
setDriverClassname(java.lang.String driver)
|
void |
setPassword(java.lang.String pwd)
|
void |
setPoolSize(int size)
|
void |
setUsername(java.lang.String user)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
public static final java.lang.String OTHER_DB
public static final java.lang.String[] SUPPORTED_DB
Constructor Detail |
---|
public DatabaseDetails()
Method Detail |
---|
public void setUsername(java.lang.String user)
user
- Name of user for connecting dbpublic java.lang.String getUsername()
public void setPassword(java.lang.String pwd)
pwd
- Password for connecting dbpublic java.lang.String getPassword()
public void setDatabaseUrl(java.lang.String url)
url
- URL for connecting to dbpublic java.lang.String getDatabaseUrl()
public void setDriverClassname(java.lang.String driver)
driver
- JDBC driver classname for connecting dbpublic java.lang.String getDriverClassname()
public void setPoolSize(int size)
size
- Size of connection pool (if handled by application)public int getPoolSize()
public void setDialect(java.lang.String dialect)
dialect
- SQL dialect for querying dbpublic java.lang.String getDialect()
public static DatabaseDetails getDefault(java.lang.String database)
database
- Name of the database to get defaults for
public static boolean isSupportedDatabase(java.lang.String database)
database
- Name of the database to test (ex: "mysql")
protected static java.util.Properties getDefaultProperties(java.lang.String database)
database
- Name of database to load properties forpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |