|
SPT RWT Application API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.rwt.DatabaseType
public class DatabaseType
A simple bean used to represent different types of database engines that the application can connect to.
© Copyright 2007 Sans Pareil Technologies, Inc.
| Field Summary | |
|---|---|
private String |
driver
The fully qualified name of the JDBC driver class. |
private String |
name
The name of the database engine represented by this instance. |
private Map<String,ConnectionData> |
savedConnections
A map that stores saved ConnectionData identified by a
unique name. |
private String |
urlPattern
The encoded JDBC url pattern to use to build a connection url to the database. |
| Constructor Summary | |
|---|---|
protected |
DatabaseType()
Default constructor. |
| Method Summary | |
|---|---|
(package private) void |
add(String name,
ConnectionData data)
Add the specified connection data to the savedConnections map. |
(package private) void |
delete(String name)
Remove the saved connection identified by the specified name. |
Map<String,ConnectionData> |
getConnectionData()
Return a collection of all the saved connection data objects. |
ConnectionData |
getConnectionData(String name)
Return the connection data uniquely identified by the specified name. |
String |
getDriver()
Returns driver. |
String |
getName()
Returns name. |
Collection<String> |
getNames()
Return a collection of all the names used to store connections. |
String |
getUrlPattern()
Returns urlPattern. |
boolean |
hasName(String name)
Check to see if a saved connection exists with the specified name. |
protected void |
setDriver(String driver)
Set driver. |
protected void |
setName(String name)
Set name. |
protected void |
setUrlPattern(String urlPattern)
Set urlPattern. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Map<String,ConnectionData> savedConnections
ConnectionData identified by a
unique name.
private String name
private String urlPattern
private String driver
| Constructor Detail |
|---|
protected DatabaseType()
| Method Detail |
|---|
public boolean hasName(String name)
name - The name to check for uniqueness.public Collection<String> getNames()
public ConnectionData getConnectionData(String name)
name - The unique name to use to fetch the connection data.
null if
no such mapping exists.public Map<String,ConnectionData> getConnectionData()
void add(String name,
ConnectionData data)
savedConnections map.
If such a mapping already exists, the existing mapping is updated.
name - The unique name to use to identify this connection.data - The connection data to be saved.hasName(java.lang.String)void delete(String name)
name - The unique name to use to identify the connection to remove.public String getName()
name.
protected void setName(String name)
name.
name - The value to set.public String getUrlPattern()
urlPattern.
protected void setUrlPattern(String urlPattern)
urlPattern.
urlPattern - The value to set.public String getDriver()
driver.
protected void setDriver(String driver)
driver.
driver - The value to set.
|
SPT RWT Application API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||