|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjimm.datavision.source.DataSource
jimm.datavision.test.mock.source.MockDataSource
public class MockDataSource
| Field Summary | |
|---|---|
protected java.util.List |
columns
|
protected static java.lang.String |
DATABASE_NAME
|
protected java.lang.String |
name
|
protected java.util.Map |
tables
|
protected java.util.List |
tablesUsedInReport
|
| Fields inherited from class jimm.datavision.source.DataSource |
|---|
metadataURL, query, report |
| Constructor Summary | |
|---|---|
MockDataSource(Report r)
|
|
| Method Summary | |
|---|---|
protected void |
addColumn(Table table,
java.lang.String name,
int type)
|
boolean |
areRecordsSelectable()
Used to enable/disable the "Select Records" menu item. |
boolean |
areRecordsSortable()
Used to enable/disable the "Sort By" menu item. |
boolean |
canGroupRecords()
Used to enable/disable the "Group By" menu item. |
boolean |
canJoinTables()
Used to enable/disable the "Table Linker" menu item. |
java.util.Iterator |
columns()
Returns an iterator over all columns. |
protected void |
createAggregateTestTable()
|
protected void |
createAllCapsTable()
|
protected void |
createJobsTable()
|
protected void |
createOfficeTable()
|
protected void |
doWriteXML(XMLWriter out)
|
DataCursor |
execute()
|
Column |
findColumn(java.lang.Object id)
Copied from Database. |
protected Table |
findTable(java.lang.String tableName)
Copied from Database and tweaked a
bit. |
protected Table |
findTableWithId(java.lang.String id)
Copied from Database and tweaked a
bit. |
int |
indexOfSelectable(Selectable sel)
Returns the index of the specified selectable. |
boolean |
isConnectionEditable()
Used to enable/disable the "Connection" menu item. |
boolean |
isSQLGenerated()
Used to enable/disable the "SQL Query Text" menu item. |
java.util.Iterator |
tables()
Returns an iterator over all tables, or null if the
data source does not have tables (for example, a character-separated
file data source). |
java.util.Iterator |
tablesUsedInReport()
Returns an iterator over all tables actually used in the report, or null if the data source does not have tables (for example,
a character-separated file data source). |
| Methods inherited from class jimm.datavision.source.DataSource |
|---|
addColumn, alreadyUsedSourceFile, canRunReports, columnsInTablesUsedInReport, containsReferenceTo, getQuery, getReport, getSourceFile, needsSourceFile, readMetadataFrom, reloadColumns, removeSort, reuseSourceFile, setSourceFile, usesSourceFile, writeXML |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String DATABASE_NAME
protected java.util.Map tables
protected java.util.List tablesUsedInReport
protected java.util.List columns
protected java.lang.String name
| Constructor Detail |
|---|
public MockDataSource(Report r)
| Method Detail |
|---|
protected void createOfficeTable()
protected void createJobsTable()
protected void createAggregateTestTable()
protected void createAllCapsTable()
protected void addColumn(Table table,
java.lang.String name,
int type)
public boolean canJoinTables()
DataSource
canJoinTables in class DataSourcetrue if the "Table Linker" menu item
should be enabled.public boolean isSQLGenerated()
DataSource
isSQLGenerated in class DataSourcetrue if the "SQL Query Text" menu item
should be enabled.public boolean isConnectionEditable()
DataSource
isConnectionEditable in class DataSourcetrue if the "Connection" menu item
should be enabled.public boolean areRecordsSelectable()
DataSource
areRecordsSelectable in class DataSourcetrue if the "Select Records" menu item
should be enabled.public boolean areRecordsSortable()
DataSource
areRecordsSortable in class DataSourcetrue if the "Sort By" menu item
should be enabled.public boolean canGroupRecords()
DataSource
canGroupRecords in class DataSourcetrue if the "Group By" menu item
should be enabled.
public DataCursor execute()
throws java.lang.Exception
execute in class DataSourcejava.lang.Exceptionpublic int indexOfSelectable(Selectable sel)
DataSource
indexOfSelectable in class DataSourcesel - a selectablepublic Column findColumn(java.lang.Object id)
Database.
findColumn in class DataSourcenull if no column with the specified
id existsprotected Table findTable(java.lang.String tableName)
Database and tweaked a
bit.
protected Table findTableWithId(java.lang.String id)
Database and tweaked a
bit.
public java.util.Iterator tables()
DataSourcenull if the
data source does not have tables (for example, a character-separated
file data source).
tables in class DataSourcenull iterator over all tablespublic java.util.Iterator tablesUsedInReport()
DataSourcenull if the data source does not have tables (for example,
a character-separated file data source).
tablesUsedInReport in class DataSourcenull iterator over all tables used
in the reportpublic java.util.Iterator columns()
DataSource
columns in class DataSourceprotected void doWriteXML(XMLWriter out)
doWriteXML in class DataSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||