|
Dashboard Builder Commons 6.0.0.Beta3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dashboard.database.DataSourceFragment
public abstract class DataSourceFragment
A component to be used when access to remote databases is needed. Sample usage:
new DataSourceFragment("<remoteDatasourceName>") {
protected void fragment(Connection conn) throws Exception {
Statement stmt = conn.createStatement();
...
}}.execute();
| Constructor Summary | |
|---|---|
DataSourceFragment(String dataSourceName)
Create a DataSourceFragment to perform queries against given datasource |
|
| Method Summary | |
|---|---|
void |
execute()
Executes this fragment. |
protected abstract void |
fragment(Connection conn)
Called when the datasource exists. |
protected DataSource |
getDataSource()
Get the datasource this fragment is using |
String |
getDataSourceName()
|
protected void |
noDataSource()
Called instead of fragment() when the datasource is invalid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataSourceFragment(String dataSourceName)
dataSourceName - datasource name to use| Method Detail |
|---|
protected DataSource getDataSource()
throws Exception
Exceptionpublic String getDataSourceName()
public void execute()
throws Exception
Exception
protected abstract void fragment(Connection conn)
throws Exception
conn - a Connection from the datasource.
Exceptionprotected void noDataSource()
|
Dashboard Builder Commons 6.0.0.Beta3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||