Java Doc for RowOrdering.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » sql » compile » 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 » db derby 10.2 » org.apache.derby.iapi.sql.compile 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derby.iapi.sql.compile.RowOrdering

All known Subclasses:   org.apache.derby.impl.sql.compile.RowOrderingImpl,
RowOrdering
public interface RowOrdering (Code)
This interface provides a representation of the ordering of rows in a ResultSet.


Field Summary
final static  intASCENDING
    
final static  intDESCENDING
    
final static  intDONTCARE
    


Method Summary
 voidaddOrderedColumn(int direction, int tableNumber, int columnNumber)
     Add a column to this RowOrdering in the current order position.
 voidaddUnorderedOptimizable(Optimizable optimizable)
     Add an unordered optimizable to this RowOrdering.
 booleanalwaysOrdered(int tableNumber)
     Ask whether the given table is always ordered.
 voidcolumnAlwaysOrdered(Optimizable optimizable, int columnNumber)
     Tell this RowOrdering that it is always ordered on the given column of the given optimizable.
 voidcopy(RowOrdering copyTo)
     Copy the contents of this RowOrdering to the given RowOrdering.
 voidnextOrderPosition(int direction)
     Move to the next order position for adding ordered columns.
 voidoptimizableAlwaysOrdered(Optimizable optimizable)
     Tell this RowOrdering that it is always ordered on the given optimizable This is useful when considering a unique index where there is an equality match on the entire key - in this case, all the columns are ordered, regardless of the direction or position, or even whether the columns are in the index.
 booleanorderedOnColumn(int direction, int orderPosition, int tableNumber, int columnNumber)
     Tell whether this ordering is ordered on the given column in the given position
Parameters:
  direction - One of ASCENDING, DESCENDING, or DONTCAREdepending on the requirements of the caller.An ORDER BY clause cares about direction,while DISTINCT and GROUP BY do not.
Parameters:
  orderPosition - The position in the ordering list.
 booleanorderedOnColumn(int direction, int tableNumber, int columnNumber)
     Tell whether this ordering is ordered on the given column.
 voidremoveOptimizable(int tableNumber)
     Tell this row ordering that it is no longer ordered on the given table.

Field Detail
ASCENDING
final static int ASCENDING(Code)



DESCENDING
final static int DESCENDING(Code)



DONTCARE
final static int DONTCARE(Code)





Method Detail
addOrderedColumn
void addOrderedColumn(int direction, int tableNumber, int columnNumber)(Code)
Add a column to this RowOrdering in the current order position. This is a no-op if there are any unordered optimizables in the join order (see below).
Parameters:
  direction - One of ASCENDING, DESCENDING, or DONTCARE.DONTCARE can be used for things like columnswith constant value, and for one-row tables.
Parameters:
  tableNumber - The table the column is in.
Parameters:
  columnNumber - The column number in the table (one-based)



addUnorderedOptimizable
void addUnorderedOptimizable(Optimizable optimizable)(Code)
Add an unordered optimizable to this RowOrdering. This is to solve the following problem: Suppose we have the query: select * from r, s, t order by r.a, t.b Also suppose there are indexes on r.a and t.b. When the optimizer considers the join order (r, s, t) using the index on r.a, the heap on s, and the index on t.b, the rows from the join order will *NOT* be ordered on t.b, because there is an unordered result set between r and t. So, when s is added to the partial join order, and we then add table t to the join order, we want to ensure that we don't add column t.b to the RowOrdering.



alwaysOrdered
boolean alwaysOrdered(int tableNumber)(Code)
Ask whether the given table is always ordered.



columnAlwaysOrdered
void columnAlwaysOrdered(Optimizable optimizable, int columnNumber)(Code)
Tell this RowOrdering that it is always ordered on the given column of the given optimizable. This is useful when a column in the optimizable has an equals comparison with a constant expression. This is reset when the optimizable is removed from this RowOrdering.
Parameters:
  optimizable - The table in question
Parameters:
  columnNumber - The number of the column in question.



copy
void copy(RowOrdering copyTo)(Code)
Copy the contents of this RowOrdering to the given RowOrdering.



nextOrderPosition
void nextOrderPosition(int direction)(Code)
Move to the next order position for adding ordered columns. This is a no-op if there are any unordered optimizables in the join order (see below).
Parameters:
  direction - One of ASCENDING, DESCENDING, or DONTCARE.DONTCARE can be used for things like columnswith constant value, and for one-row tables.



optimizableAlwaysOrdered
void optimizableAlwaysOrdered(Optimizable optimizable)(Code)
Tell this RowOrdering that it is always ordered on the given optimizable This is useful when considering a unique index where there is an equality match on the entire key - in this case, all the columns are ordered, regardless of the direction or position, or even whether the columns are in the index.
Parameters:
  optimizable - The table in question



orderedOnColumn
boolean orderedOnColumn(int direction, int orderPosition, int tableNumber, int columnNumber) throws StandardException(Code)
Tell whether this ordering is ordered on the given column in the given position
Parameters:
  direction - One of ASCENDING, DESCENDING, or DONTCAREdepending on the requirements of the caller.An ORDER BY clause cares about direction,while DISTINCT and GROUP BY do not.
Parameters:
  orderPosition - The position in the ordering list. For example,for ORDER BY A, B, position 0 has column A,and position 1 has column B. Note that for anordering, more than one column can be in a singleordering position: for example, in the querySELECT * FROM S, T WHERE S.A = T.B ORDER BY T.Bcolumns S.A and T.B will be in the same orderingpositions because they are equal. Also, constantvalues are considered ordered in all positions(consider SELECT A FROM T WHERE A = 1 ORDER BY A).
Parameters:
  tableNumber - The table number of the Optimizable containingthe column in question
Parameters:
  columnNumber - The column number in the table (one-based). true means this ordering is ordered on the given columnin the given position.
exception:
  StandardException - Thrown on error



orderedOnColumn
boolean orderedOnColumn(int direction, int tableNumber, int columnNumber) throws StandardException(Code)
Tell whether this ordering is ordered on the given column. This is similar to the method above, but it checks whether the column is ordered in any position, rather than a specified position. This is useful for operations like DISTINCT and GROUP BY.
Parameters:
  direction - One of ASCENDING, DESCENDING, or DONTCAREdepending on the requirements of the caller.An ORDER BY clause cares about direction,while DISTINCT and GROUP BY do not.
Parameters:
  tableNumber - The table number of the Optimizable containingthe column in question
Parameters:
  columnNumber - The column number in the table (one-based). true means this ordering is ordered on the given columnin the given position.
exception:
  StandardException - Thrown on error



removeOptimizable
void removeOptimizable(int tableNumber)(Code)
Tell this row ordering that it is no longer ordered on the given table. Also, adjust the current order position, if necessary. This only works to remove ordered columns from the end of the ordering.
Parameters:
  tableNumber - The number of the table to remove from this RowOrdering.



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