Package com.mckoi.database
Class RawTableInformation
- java.lang.Object
-
- com.mckoi.database.RawTableInformation
-
final class RawTableInformation extends java.lang.ObjectThis object represents the lowest level DataTable information of a given VirtualTable. Since it is possible to make any level of VirtualTable's, it is useful to be able to resolve an 'n leveled' VirtualTable to a single level table. This object is used to collect information as the 'VirtualTable.resolveToRawTable' method is walking throught the VirtualTable's ancestors.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Vectorraw_infoA Vector containing a list of DataTables, and 'row index' IntegerVectors of the given rows in the table.
-
Constructor Summary
Constructors Constructor Description RawTableInformation()The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidadd(RootTable table, IntegerVector row_set)Adds a new DataTable or ReferenceTable, and IntegerVector row set into the object.(package private) IntegerVector[]getRows()Returns a IntegerVector[] list of the rows in the table that have been added.protected RawTableElement[]getSortedElements()Returns an array of RawTableElement sorted into a consistant order.(package private) Table[]getTables()Returns an AbstractDataTable[] array of all the tables that have been added.(package private) voidremoveDuplicates()Removes any duplicate rows from this RawTableInformation object.(package private) voidunion(RawTableInformation info)Finds the union of this information with the given information.
-
-
-
Method Detail
-
add
void add(RootTable table, IntegerVector row_set)
Adds a new DataTable or ReferenceTable, and IntegerVector row set into the object. We can not add VirtualTable objects into this object.
-
getTables
Table[] getTables()
Returns an AbstractDataTable[] array of all the tables that have been added.
-
getRows
IntegerVector[] getRows()
Returns a IntegerVector[] list of the rows in the table that have been added.
-
getSortedElements
protected RawTableElement[] getSortedElements()
Returns an array of RawTableElement sorted into a consistant order.
-
union
void union(RawTableInformation info)
Finds the union of this information with the given information. It does the following: + Sorts the unioned tables into a consistant order. + Merges each row in the tables row_set. + Sorts the resultant merge. + Makes a new set with the resultant merge minus any duplicates.
-
removeDuplicates
void removeDuplicates()
Removes any duplicate rows from this RawTableInformation object.
-
-