Java Doc for Index.java in  » Database-DBMS » hsql » org » hsqldb » 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 » hsql » org.hsqldb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.hsqldb.Index

Index
public class Index (Code)
Implementation of an AVL tree with parent pointers in nodes. Subclasses of Node implement the tree node objects for memory or disk storage. An Index has a root Node that is linked with other nodes using Java Object references or file pointers, depending on Node implementation.

An Index object also holds information on table columns (in the form of int indexes) that are covered by it.(fredt@users)
author:
   Thomas Mueller (Hypersonic SQL Group)
version:
   1.8.0
since:
   Hypersonic SQL


Inner Class :static class IndexRowIterator implements RowIterator

Field Summary
final static  intDISK_INDEX
    
final static  intMEMORY_INDEX
    
final static  intPOINTER_INDEX
    
final  boolean[]colCheck
    
final  Collationcollation
    
static  IndexRowIteratoremptyIterator
    
final  booleanisConstraint
    
final  booleanisForward
    
final  booleanisTemp
    
final  booleanonCommitPreserve
    
final  int[]pkCols
    
final  int[]pkTypes
    
final  Tabletable
    
 IndexRowIteratorupdatableIterators
    

Constructor Summary
 Index(Database database, HsqlName name, Table table, int[] column, int[] colTypes, boolean isPk, boolean unique, boolean constraint, boolean forward, int[] pkcols, int[] pktypes, boolean temp)
    

Method Summary
 voidclearAll(Session session)
    
 voidclearIterators()
    
 intcompareRowNonUnique(Session session, Object[] a, int[] rowColMap, Object[] b)
     Compares two table rows based on the columns of this index.
static  intcompareRows(Session session, Object[] a, Object[] b, int[] cols, int[] coltypes)
    
 voiddelete(Session session, Node x)
    
 RowIteratoremptyIterator()
    
 booleanexists(Session session, Object[] rowdata, int[] rowColMap)
    
 RowIteratorfindFirstRow(Session session, Object[] rowdata, int[] rowColMap)
    
 RowIteratorfindFirstRow(Session session, Object[] rowdata)
     Return the first node equal to the rowdata object.
 RowIteratorfindFirstRow(Session session, Object value, int compare)
     Finds the first node that is larger or equal to the given one based on the first column of the index only.
 RowIteratorfindFirstRowForDelete(Session session, Object[] rowdata, int[] rowColMap)
    
 RowIteratorfindFirstRowNotNull(Session session)
     Finds the first node where the data is not null.
 RowfindRow(Session session, Row row)
    
 RowIteratorfirstRow(Session session)
    
 StringgetColumnNameList()
    
 int[]getColumnTypes()
    
 int[]getColumns()
    
 intgetIndexOrderValue()
     Returns a value indicating the order of different types of index in the list of indexes for a table.
 HsqlNamegetName()
    
 intgetRoot()
    
 intgetVisibleColumns()
    
 voidinsert(Session session, Row row, int offset)
    
 booleanisConstraint()
    
 booleanisEmpty(Session session)
    
static  booleanisNull(Object[] row, int[] rowColMap)
     Determines if a table row has a null column for any of the columns given in the rowColMap array.
 booleanisNull(Object[] row)
     Determines if a table row has a null column for any of the indexed columns.
 booleanisUnique()
    
 RowlastRow(Session session)
    
 Nodenext(Node x)
    
 voidsetName(String name, boolean isquoted)
     Changes index name.
 voidsetRoot(Session session, Node node)
    
 intsize(Session session)
     Returns the node count.
public  intsizeEstimate()
    

Field Detail
DISK_INDEX
final static int DISK_INDEX(Code)



MEMORY_INDEX
final static int MEMORY_INDEX(Code)



POINTER_INDEX
final static int POINTER_INDEX(Code)



colCheck
final boolean[] colCheck(Code)



collation
final Collation collation(Code)



emptyIterator
static IndexRowIterator emptyIterator(Code)



isConstraint
final boolean isConstraint(Code)



isForward
final boolean isForward(Code)



isTemp
final boolean isTemp(Code)



onCommitPreserve
final boolean onCommitPreserve(Code)



pkCols
final int[] pkCols(Code)



pkTypes
final int[] pkTypes(Code)



table
final Table table(Code)



updatableIterators
IndexRowIterator updatableIterators(Code)




Constructor Detail
Index
Index(Database database, HsqlName name, Table table, int[] column, int[] colTypes, boolean isPk, boolean unique, boolean constraint, boolean forward, int[] pkcols, int[] pktypes, boolean temp)(Code)
Constructor declaration
Parameters:
  name - HsqlName of the index
Parameters:
  table - table of the index
Parameters:
  column - array of column indexes
Parameters:
  type - array of column types
Parameters:
  unique - is this a unique index
Parameters:
  constraint - does this index belonging to a constraint
Parameters:
  forward - is this an auto-index for an FK that refers to a table defined after this table
Parameters:
  visColumns - count of visible columns




Method Detail
clearAll
void clearAll(Session session)(Code)



clearIterators
void clearIterators()(Code)



compareRowNonUnique
int compareRowNonUnique(Session session, Object[] a, int[] rowColMap, Object[] b) throws HsqlException(Code)
Compares two table rows based on the columns of this index. The rowColMap parameter specifies which columns of the other table are to be compared with the colIndex columns of this index. The rowColMap can cover all or only some columns of this index.
Parameters:
  a - row from another table
Parameters:
  rowColMap - column indexes in the other table
Parameters:
  b - a full row in this table comparison result, -1,0,+1
throws:
  HsqlException -



compareRows
static int compareRows(Session session, Object[] a, Object[] b, int[] cols, int[] coltypes) throws HsqlException(Code)
compares two full table rows based on a set of columns
Parameters:
  a - a full row
Parameters:
  b - a full row
Parameters:
  cols - array of column indexes to compare comparison result, -1,0,+1
throws:
  HsqlException -



delete
void delete(Session session, Node x) throws HsqlException(Code)
Delete a node from the index



emptyIterator
RowIterator emptyIterator()(Code)



exists
boolean exists(Session session, Object[] rowdata, int[] rowColMap) throws HsqlException(Code)



findFirstRow
RowIterator findFirstRow(Session session, Object[] rowdata, int[] rowColMap) throws HsqlException(Code)



findFirstRow
RowIterator findFirstRow(Session session, Object[] rowdata) throws HsqlException(Code)
Return the first node equal to the rowdata object. Use visible columns only. The rowdata has the same column mapping as this table.
Parameters:
  rowdata - array containing table row data iterator
throws:
  HsqlException -



findFirstRow
RowIterator findFirstRow(Session session, Object value, int compare) throws HsqlException(Code)
Finds the first node that is larger or equal to the given one based on the first column of the index only.
Parameters:
  value - value to match
Parameters:
  compare - comparison Expression type iterator
throws:
  HsqlException -



findFirstRowForDelete
RowIterator findFirstRowForDelete(Session session, Object[] rowdata, int[] rowColMap) throws HsqlException(Code)



findFirstRowNotNull
RowIterator findFirstRowNotNull(Session session) throws HsqlException(Code)
Finds the first node where the data is not null. iterator
throws:
  HsqlException -



findRow
Row findRow(Session session, Row row) throws HsqlException(Code)
Finds an existing row



firstRow
RowIterator firstRow(Session session) throws HsqlException(Code)
Returns the row for the first node of the index Iterator for first row
throws:
  HsqlException -



getColumnNameList
String getColumnNameList()(Code)



getColumnTypes
int[] getColumnTypes()(Code)
Returns the array containing column indexes for index



getColumns
int[] getColumns()(Code)
Returns the array containing column indexes for index



getIndexOrderValue
int getIndexOrderValue()(Code)
Returns a value indicating the order of different types of index in the list of indexes for a table. The position of the groups of Indexes in the list in ascending order is as follows: primary key index unique constraint indexes autogenerated foreign key indexes for FK's that reference this table or tables created before this table user created indexes (CREATE INDEX) autogenerated foreign key indexes for FK's that reference tables created after this table Among a group of indexes, the order is based on the order of creation of the index. ordinal value



getName
HsqlName getName()(Code)
Returns the HsqlName object



getRoot
int getRoot()(Code)



getVisibleColumns
int getVisibleColumns()(Code)
Returns the count of visible columns used



insert
void insert(Session session, Row row, int offset) throws HsqlException(Code)
Insert a node into the index



isConstraint
boolean isConstraint()(Code)
Does this index belong to a constraint?



isEmpty
boolean isEmpty(Session session)(Code)



isNull
static boolean isNull(Object[] row, int[] rowColMap)(Code)
Determines if a table row has a null column for any of the columns given in the rowColMap array.



isNull
boolean isNull(Object[] row)(Code)
Determines if a table row has a null column for any of the indexed columns.



isUnique
boolean isUnique()(Code)
Is this a UNIQUE index?



lastRow
Row lastRow(Session session) throws HsqlException(Code)
Returns the row for the last node of the index last row
throws:
  HsqlException -



next
Node next(Node x) throws HsqlException(Code)
Returns the node after the given one
Parameters:
  x - node next node
throws:
  HsqlException -



setName
void setName(String name, boolean isquoted) throws HsqlException(Code)
Changes index name. Used by 'alter index rename to'. Argument isquoted is true if the name was quoted in the DDL.



setRoot
void setRoot(Session session, Node node)(Code)



size
int size(Session session) throws HsqlException(Code)
Returns the node count.



sizeEstimate
public int sizeEstimate() throws HsqlException(Code)



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.