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


org.h2.index.Index

All known Subclasses:   org.h2.index.MultiVersionIndex,  org.h2.index.BaseIndex,
Index
public interface Index extends SchemaObject(Code)
An index. Indexes are used to speed up searching data.


Field Summary
 intEMPTY_HEAD
     Indicates that there is no head record yet.


Method Summary
 voidadd(Session session, Row row)
     Add a row to the index.
 booleancanFindNext()
     Check if the index can get the next higher value.
 booleancanGetFirstOrLast()
     Check if the index can directly look up the lowest or highest value of a column.
 voidclose(Session session)
     Close this index.
 voidcommit(int operation, Row row)
     Commit the operation for a row.
 intcompareKeys(SearchRow rowData, SearchRow compare)
     Compare the positions of two rows.
 intcompareRows(SearchRow rowData, SearchRow compare)
     Compare two rows.
 Cursorfind(Session session, SearchRow first, SearchRow last)
     Find a row or a list of rows and create a cursor to iterate over the result.
 SearchRowfindFirstOrLast(Session session, boolean first)
     Find the lowest or highest value of a column.
 CursorfindNext(Session session, SearchRow higherThan, SearchRow last)
     Find a row or a list of rows that is larger and create a cursor to iterate over the result.
 intgetColumnIndex(Column col)
    
 StringgetColumnListSQL()
     Get the list of columns as a string.
 Column[]getColumns()
     Get the indexed columns.
 doublegetCost(Session session, int[] masks)
     Estimate the cost to search for rows given the search mask.
 longgetCostRangeIndex(int[] masks, long rowCount)
     Estimate the cost required to search one row, and then iterate over the given number of rows.
 SQLExceptiongetDuplicateKeyException()
    
 IndexColumn[]getIndexColumns()
     Get the indexed columns as index columns (with ordering information).
 IndexTypegetIndexType()
     Get the index type.
 intgetLookupCost(long rowCount)
     Estimate the cost required to search a number of rows.
 StringgetPlanSQL()
     Get the message to show in a EXPLAIN statement.
 longgetRowCount(Session session)
     Get the row count of this table, for the given session.
 TablegetTable()
     Get the table on which this index is based.
 booleanisNull(Row newRow)
     Check if a row is NULL.
 booleanneedRebuild()
     Check if the index needs to be rebuilt.
 voidremove(Session session, Row row)
     Remove a row from the index.
 voidremove(Session session)
     Remove the index.
 voidtruncate(Session session)
     Remove all rows from the index.

Field Detail
EMPTY_HEAD
int EMPTY_HEAD(Code)
Indicates that there is no head record yet.





Method Detail
add
void add(Session session, Row row) throws SQLException(Code)
Add a row to the index.
Parameters:
  session - the session to use
Parameters:
  row - the data



canFindNext
boolean canFindNext()(Code)
Check if the index can get the next higher value. true if it can



canGetFirstOrLast
boolean canGetFirstOrLast()(Code)
Check if the index can directly look up the lowest or highest value of a column. true if it can



close
void close(Session session) throws SQLException(Code)
Close this index.
Parameters:
  session - the session used to write data



commit
void commit(int operation, Row row) throws SQLException(Code)
Commit the operation for a row. This is only important for multi-version indexes.
Parameters:
  operation - the operation type
Parameters:
  row - the row



compareKeys
int compareKeys(SearchRow rowData, SearchRow compare)(Code)
Compare the positions of two rows.
Parameters:
  rowData - the first row
Parameters:
  compare - the second row 0 if both rows are equal, -1 if the first row is smaller, otherwise 1



compareRows
int compareRows(SearchRow rowData, SearchRow compare) throws SQLException(Code)
Compare two rows.
Parameters:
  rowData - the first row
Parameters:
  compare - the second row 0 if both rows are equal, -1 if the first row is smaller, otherwise 1



find
Cursor find(Session session, SearchRow first, SearchRow last) throws SQLException(Code)
Find a row or a list of rows and create a cursor to iterate over the result.
Parameters:
  session - the session
Parameters:
  first - the first row, or null for no limit
Parameters:
  last - the last row, or null for no limit the cursor



findFirstOrLast
SearchRow findFirstOrLast(Session session, boolean first) throws SQLException(Code)
Find the lowest or highest value of a column.
Parameters:
  session - the session
Parameters:
  first - true if the first (lowest for ascending indexes) or lastvalue should be returned the search row with the value



findNext
Cursor findNext(Session session, SearchRow higherThan, SearchRow last) throws SQLException(Code)
Find a row or a list of rows that is larger and create a cursor to iterate over the result.
Parameters:
  session - the session
Parameters:
  higherThan - the lower limit (excluding)
Parameters:
  last - the last row, or null for no limit the cursor



getColumnIndex
int getColumnIndex(Column col)(Code)
Get the index of a column in the list of index columns
Parameters:
  col - the column the index (0 meaning first column)



getColumnListSQL
String getColumnListSQL()(Code)
Get the list of columns as a string. the list of columns



getColumns
Column[] getColumns()(Code)
Get the indexed columns. the columns



getCost
double getCost(Session session, int[] masks) throws SQLException(Code)
Estimate the cost to search for rows given the search mask.
Parameters:
  session - the session
Parameters:
  masks - the search mask the estimated cost



getCostRangeIndex
long getCostRangeIndex(int[] masks, long rowCount) throws SQLException(Code)
Estimate the cost required to search one row, and then iterate over the given number of rows.
Parameters:
  masks - the search mask
Parameters:
  rowCount - the row count the estimated cost



getDuplicateKeyException
SQLException getDuplicateKeyException()(Code)
Create a duplicate key exception with a message that contains the index name the exception



getIndexColumns
IndexColumn[] getIndexColumns()(Code)
Get the indexed columns as index columns (with ordering information). the index columns



getIndexType
IndexType getIndexType()(Code)
Get the index type. the index type



getLookupCost
int getLookupCost(long rowCount)(Code)
Estimate the cost required to search a number of rows.
Parameters:
  rowCount - the row count the estimated cost



getPlanSQL
String getPlanSQL()(Code)
Get the message to show in a EXPLAIN statement. the plan



getRowCount
long getRowCount(Session session)(Code)
Get the row count of this table, for the given session.
Parameters:
  session - the session the row count



getTable
Table getTable()(Code)
Get the table on which this index is based. the table



isNull
boolean isNull(Row newRow)(Code)
Check if a row is NULL.
Parameters:
  newRow - if it is null



needRebuild
boolean needRebuild()(Code)
Check if the index needs to be rebuilt. This method is called after opening an index. true if a rebuild is required.



remove
void remove(Session session, Row row) throws SQLException(Code)
Remove a row from the index.
Parameters:
  session - the session
Parameters:
  row - the data



remove
void remove(Session session) throws SQLException(Code)
Remove the index.
Parameters:
  session - the session



truncate
void truncate(Session session) throws SQLException(Code)
Remove all rows from the index.
Parameters:
  session - the session



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