Package com.mckoi.database
Class OuterTable
- java.lang.Object
-
- com.mckoi.database.Table
-
- com.mckoi.database.JoinedTable
-
- com.mckoi.database.VirtualTable
-
- com.mckoi.database.OuterTable
-
- All Implemented Interfaces:
RootTable,TableDataSource
class OuterTable extends VirtualTable implements RootTable
A Table class for forming OUTER type results. This takes as its constructor the base table (with no outer NULL fields) that is what the result is based on. It is then possible to merge in tables that are ancestors
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.mckoi.database.Table
Table.TableVariableResolver
-
-
Field Summary
Fields Modifier and Type Field Description private intouter_row_countThe row count of the outer rows.IntegerVector[]outer_rowsThe merged rows.-
Fields inherited from class com.mckoi.database.VirtualTable
row_list
-
Fields inherited from class com.mckoi.database.JoinedTable
column_filter, column_scheme, column_table, reference_list
-
Fields inherited from class com.mckoi.database.Table
DEBUG_QUERY
-
-
Constructor Summary
Constructors Constructor Description OuterTable(Table input_table)Constructs the OuterTable given the base table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TObjectgetCellContents(int column, int row)Returns an object that represents the information in the given cell in the table.intgetRowCount()Returns the modified row count.(package private) SelectableSchemegetSelectableSchemeFor(int column, int original_column, Table table)Returns a SelectableScheme for the given column in the given VirtualTable row domain.voidmergeIn(Table outside_table)Merges the given table in with this table.booleantypeEquals(RootTable table)This function is used to check that two tables are identical.-
Methods inherited from class com.mckoi.database.VirtualTable
getReferenceRows, init, resolveAllRowsForTableAt, resolveRowForTableAt, set, set, set, set
-
Methods inherited from class com.mckoi.database.JoinedTable
addDataTableListener, findFieldName, getColumnCount, getDatabase, getDataTableDef, getReferenceTables, getResolvedVariable, hasRootsLocked, lockRoot, optimisedPostSet, printGraph, removeDataTableListener, resolveToRawTable, resolveToRawTable, rowEnumeration, setToRowTableDomain, unlockRoot
-
Methods inherited from class com.mckoi.database.Table
all, allColumnMatchesValue, allRowsIn, allRowsNotIn, any, columnContainsCell, columnContainsValue, columnMatchesValue, columnMerge, compareCells, Debug, distinct, distinct, dumpTo, emptySelect, exhaustiveSelect, fastFindFieldName, getColumnDefAt, getColumnScheme, getFirstCellContent, getFirstCellContent, getLastCellContent, getLastCellContent, getSingleCellContent, getSingleCellContent, getSystem, getTableAccessState, getTTypeForColumn, getTTypeForColumn, getVariableResolver, join, orderByColumn, orderByColumn, orderByColumn, orderByColumns, orderedRowList, outside, rangeSelect, selectAll, selectAll, selectFirst, selectFromPattern, selectFromRegex, selectLast, selectRange, selectRest, selectRows, selectRows, selectRows, simpleJoin, simpleSelect, singleRowSelect, toMap, toString, union
-
-
-
-
Field Detail
-
outer_rows
public IntegerVector[] outer_rows
The merged rows.
-
outer_row_count
private int outer_row_count
The row count of the outer rows.
-
-
Constructor Detail
-
OuterTable
public OuterTable(Table input_table)
Constructs the OuterTable given the base table.
-
-
Method Detail
-
mergeIn
public void mergeIn(Table outside_table)
Merges the given table in with this table.
-
getRowCount
public int getRowCount()
Returns the modified row count.- Specified by:
getRowCountin interfaceTableDataSource- Overrides:
getRowCountin classVirtualTable
-
getSelectableSchemeFor
SelectableScheme getSelectableSchemeFor(int column, int original_column, Table table)
Returns a SelectableScheme for the given column in the given VirtualTable row domain. This searches down through the tables ancestors until it comes across a table with a SelectableScheme where the given column is fully resolved. In most cases, this will be the root DataTable.For an OuterTable, this must also include any rows with an index of -1 which indicates they are NULL. NULL rows are put at the top of the index list.
- Overrides:
getSelectableSchemeForin classJoinedTable
-
getCellContents
public TObject getCellContents(int column, int row)
Returns an object that represents the information in the given cell in the table.- Specified by:
getCellContentsin interfaceTableDataSource- Overrides:
getCellContentsin classJoinedTable
-
typeEquals
public boolean typeEquals(RootTable table)
This function is used to check that two tables are identical. This is used in operations like 'union' that need to determine that the roots are infact of the same type.- Specified by:
typeEqualsin interfaceRootTable
-
-