Java Doc for DefaultDataTable.java in  » Database-DBMS » mckoi » com » mckoi » database » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » mckoi » com.mckoi.database 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.mckoi.database.Table
      com.mckoi.database.AbstractDataTable
         com.mckoi.database.DefaultDataTable

All known Subclasses:   com.mckoi.database.FunctionTable,  com.mckoi.database.TemporaryTable,  com.mckoi.database.DataTable,
DefaultDataTable
abstract public class DefaultDataTable extends AbstractDataTable (Code)
This represents a default implementation of a DataTable. It encapsulates information that is core to all DataTable objects. That is,

The table name, The description of the table fields, A set of SelectableScheme objects to describe row relations, A counter for the number of rows in the table.

There are two classes that extend this object. DataTable which is a DataTable that is a direct mapping to an internal table stored in the Database files. And TemporaryTable that contains information generated on the fly by the DBMS.


author:
   Tobias Downer



Field Summary
protected  introw_count
     The number of rows in the table.

Constructor Summary
 DefaultDataTable(Database database)
     The Constructor.

Method Summary
 voidaddCellToColumnSchemes(int row_number, int column_number)
     Adds a single column of a row to the selectable scheme indexing.
 voidaddRowToColumnSchemes(int row_number)
     This is called when a row is in the table, and the SelectableScheme objects for each column need to be notified of the rows existance, therefore build up the relational model for the columns.
protected  voidblankSelectableSchemes()
     Blanks all the column schemes in the table to an initial state.
protected  voidblankSelectableSchemes(int type)
     Blanks all the column schemes in this table to a specific type of scheme.
protected  voidclearColumnScheme(int column)
     Clears the SelectableScheme information for the given column.
public  intfindFieldName(Variable v)
     Given a fully qualified variable field name, ie.
public  intgetColumnCount()
     Returns the number of columns in the table.
public  DatabasegetDatabase()
     Returns the Database object this table is part of.
public  VariablegetResolvedVariable(int column)
     Returns a fully qualified Variable object that represents the name of the column at the given index.
protected  SelectableSchemegetRootColumnScheme(int column)
     Returns the SelectableScheme for the given column.
public  intgetRowCount()
     Returns the number of rows stored in the table.
 SelectableSchemegetSelectableSchemeFor(int column, int original_column, Table table)
     Returns a SelectableScheme object for the given column of the VirtualTable.
 voidremoveRowToColumnSchemes(int row_number)
     This is called when an index to a row needs to be removed from the SelectableScheme objects.
 RawTableInformationresolveToRawTable(RawTableInformation info)
     Return the list of DataTable and row sets that make up the raw information in this table.
 voidsetToRowTableDomain(int column, IntegerVector row_set, TableDataSource ancestor)
     Given a set, this trickles down through the Table hierarchy resolving the given row_set to a form that the given ancestor understands.

Field Detail
row_count
protected int row_count(Code)
The number of rows in the table.




Constructor Detail
DefaultDataTable
DefaultDataTable(Database database)(Code)
The Constructor.




Method Detail
addCellToColumnSchemes
void addCellToColumnSchemes(int row_number, int column_number)(Code)
Adds a single column of a row to the selectable scheme indexing.



addRowToColumnSchemes
void addRowToColumnSchemes(int row_number)(Code)
This is called when a row is in the table, and the SelectableScheme objects for each column need to be notified of the rows existance, therefore build up the relational model for the columns.



blankSelectableSchemes
protected void blankSelectableSchemes()(Code)
Blanks all the column schemes in the table to an initial state. This will make all schemes of type InsertSearch.

NOTE: The current default SelectableScheme type is InsertSearch. We may want to make this variable.




blankSelectableSchemes
protected void blankSelectableSchemes(int type)(Code)
Blanks all the column schemes in this table to a specific type of scheme. If Type = 0 then InsertSearch (fast but takes up memory - requires each insert and delete from the table to be logged). If type = 1 then BlindSearch (slower but uses no memory and doesn't require insert and delete to be logged).



clearColumnScheme
protected void clearColumnScheme(int column)(Code)
Clears the SelectableScheme information for the given column.



findFieldName
public int findFieldName(Variable v)(Code)
Given a fully qualified variable field name, ie. 'APP.CUSTOMER.CUSTOMERID' this will return the column number the field is at. Returns -1 if the field does not exist in the table.



getColumnCount
public int getColumnCount()(Code)
Returns the number of columns in the table.



getDatabase
public Database getDatabase()(Code)
Returns the Database object this table is part of.



getResolvedVariable
public Variable getResolvedVariable(int column)(Code)
Returns a fully qualified Variable object that represents the name of the column at the given index. For example, new Variable(new TableName("APP", "CUSTOMER"), "ID")



getRootColumnScheme
protected SelectableScheme getRootColumnScheme(int column)(Code)
Returns the SelectableScheme for the given column. This is different from 'getColumnScheme(int column)' because this is designed to be overridden so derived classes can manage their own SelectableScheme sources.



getRowCount
public int getRowCount()(Code)
Returns the number of rows stored in the table.



getSelectableSchemeFor
SelectableScheme getSelectableSchemeFor(int column, int original_column, Table table)(Code)
Returns a SelectableScheme object for the given column of the VirtualTable. The Table parameter specifies the domain in which the scheme should be given. If table != this, we can safely assume it is a VirtualTable.



removeRowToColumnSchemes
void removeRowToColumnSchemes(int row_number)(Code)
This is called when an index to a row needs to be removed from the SelectableScheme objects. This occurs when we have a modification log of row removals that haven't actually happened to old backed up scheme.



resolveToRawTable
RawTableInformation resolveToRawTable(RawTableInformation info)(Code)
Return the list of DataTable and row sets that make up the raw information in this table. For a DataTable itselt, this is trivial. NOTE: Using this method is extremely inefficient, and should never be used. It is included only to complete feature set. IDEA: Put a warning to check if this method is ever used.



setToRowTableDomain
void setToRowTableDomain(int column, IntegerVector row_set, TableDataSource ancestor)(Code)
Given a set, this trickles down through the Table hierarchy resolving the given row_set to a form that the given ancestor understands. Say you give the set { 0, 1, 2, 3, 4, 5, 6 }, this function may check down three levels and return a new 7 element set with the rows fully resolved to the given ancestors domain.



Methods inherited from com.mckoi.database.AbstractDataTable
public TableName getTableName()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public boolean typeEquals(RootTable table)(Code)(Java Doc)

Fields inherited from com.mckoi.database.Table
protected static boolean DEBUG_QUERY(Code)(Java Doc)

Methods inherited from com.mckoi.database.Table
public DebugLogger Debug()(Code)(Java Doc)
abstract void addDataTableListener(DataTableListener listener)(Code)(Java Doc)
public Table all(QueryContext context, Expression lhs, Operator op, Table table)(Code)(Java Doc)
final public boolean allColumnMatchesValue(int column, Operator op, TObject ob)(Code)(Java Doc)
final IntegerVector allRowsIn(int column, Table table)(Code)(Java Doc)
final IntegerVector allRowsNotIn(int column, Table table)(Code)(Java Doc)
public Table any(QueryContext context, Expression lhs, Operator op, Table right_table)(Code)(Java Doc)
final public boolean columnContainsCell(int column, TObject cell)(Code)(Java Doc)
final public boolean columnContainsValue(int column, TObject ob)(Code)(Java Doc)
final public boolean columnMatchesValue(int column, Operator op, TObject ob)(Code)(Java Doc)
final public Table columnMerge(Table table)(Code)(Java Doc)
public static boolean compareCells(TObject ob1, TObject ob2, Operator op)(Code)(Java Doc)
final public VirtualTable distinct()(Code)(Java Doc)
final public Table distinct(int[] col_map)(Code)(Java Doc)
final public void dumpTo(PrintStream out) throws IOException(Code)(Java Doc)
final public Table emptySelect()(Code)(Java Doc)
final public Table exhaustiveSelect(QueryContext context, Expression exp)(Code)(Java Doc)
final public int fastFindFieldName(Variable col)(Code)(Java Doc)
abstract public int findFieldName(Variable v)(Code)(Java Doc)
abstract public TObject getCellContents(int column, int row)(Code)(Java Doc)
abstract public int getColumnCount()(Code)(Java Doc)
public DataTableColumnDef getColumnDefAt(int col_index)(Code)(Java Doc)
public SelectableScheme getColumnScheme(int column)(Code)(Java Doc)
abstract public DataTableDef getDataTableDef()(Code)(Java Doc)
abstract public Database getDatabase()(Code)(Java Doc)
final public TObject getFirstCellContent(int column)(Code)(Java Doc)
final public TObject[] getFirstCellContent(int[] col_map)(Code)(Java Doc)
final public TObject getLastCellContent(int column)(Code)(Java Doc)
final public TObject[] getLastCellContent(int[] col_map)(Code)(Java Doc)
abstract public Variable getResolvedVariable(int column)(Code)(Java Doc)
abstract public int getRowCount()(Code)(Java Doc)
abstract SelectableScheme getSelectableSchemeFor(int column, int original_column, Table table)(Code)(Java Doc)
final public TObject getSingleCellContent(int column)(Code)(Java Doc)
final public TObject[] getSingleCellContent(int[] col_map)(Code)(Java Doc)
final public TransactionSystem getSystem()(Code)(Java Doc)
public TType getTTypeForColumn(int column)(Code)(Java Doc)
public TType getTTypeForColumn(Variable v)(Code)(Java Doc)
final public TableAccessState getTableAccessState()(Code)(Java Doc)
final TableVariableResolver getVariableResolver()(Code)(Java Doc)
abstract public boolean hasRootsLocked()(Code)(Java Doc)
final public Table join(Table table)(Code)(Java Doc)
abstract public void lockRoot(int lock_key)(Code)(Java Doc)
final public VirtualTable orderByColumn(int col_index, boolean ascending)(Code)(Java Doc)
final public VirtualTable orderByColumn(Variable column, boolean ascending)(Code)(Java Doc)
final public VirtualTable orderByColumn(Variable column)(Code)(Java Doc)
final public Table orderByColumns(int[] col_map)(Code)(Java Doc)
final public IntegerVector orderedRowList(int[] col_map)(Code)(Java Doc)
final public VirtualTable outside(Table rtable)(Code)(Java Doc)
public void printGraph(PrintStream out, int indent)(Code)(Java Doc)
final public Table rangeSelect(Variable col_var, SelectableRange[] ranges)(Code)(Java Doc)
abstract void removeDataTableListener(DataTableListener listener)(Code)(Java Doc)
abstract RawTableInformation resolveToRawTable(RawTableInformation info)(Code)(Java Doc)
abstract public RowEnumeration rowEnumeration()(Code)(Java Doc)
final public IntegerVector selectAll(int column)(Code)(Java Doc)
final public IntegerVector selectAll()(Code)(Java Doc)
final public IntegerVector selectFirst(int column)(Code)(Java Doc)
final IntegerVector selectFromPattern(int column, Operator op, TObject ob)(Code)(Java Doc)
final IntegerVector selectFromRegex(int column, Operator op, TObject ob)(Code)(Java Doc)
final public IntegerVector selectLast(int column)(Code)(Java Doc)
final public IntegerVector selectRange(int column, SelectableRange[] ranges)(Code)(Java Doc)
final public IntegerVector selectRest(int column)(Code)(Java Doc)
final IntegerVector selectRows(int[] cols, Operator op, TObject[] cells)(Code)(Java Doc)
final IntegerVector selectRows(int column, Operator op, TObject cell)(Code)(Java Doc)
IntegerVector selectRows(int column, TObject min_cell, TObject max_cell)(Code)(Java Doc)
abstract void setToRowTableDomain(int column, IntegerVector row_set, TableDataSource ancestor)(Code)(Java Doc)
final public Table simpleJoin(QueryContext context, Table table, Variable lhs_var, Operator op, Expression rhs)(Code)(Java Doc)
final public Table simpleSelect(QueryContext context, Variable lhs_var, Operator op, Expression rhs)(Code)(Java Doc)
final public Table singleRowSelect(int row_index)(Code)(Java Doc)
public Map toMap()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public Table union(Table table)(Code)(Java Doc)
abstract public void unlockRoot(int lock_key)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.