KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > iapi > sql > execute > ResultSetFactory


1 /*
2
3    Derby - Class org.apache.derby.iapi.sql.execute.ResultSetFactory
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.iapi.sql.execute;
23
24 import org.apache.derby.iapi.error.StandardException;
25
26 import org.apache.derby.iapi.sql.ResultDescription;
27 import org.apache.derby.iapi.sql.ResultSet;
28 import org.apache.derby.iapi.sql.Activation;
29
30 import org.apache.derby.iapi.services.loader.GeneratedMethod;
31
32 import org.apache.derby.iapi.store.access.Qualifier;
33
34 /**
35  * ResultSetFactory provides a wrapper around all of
36  * the result sets needed in an execution implementation.
37  * <p>
38  * For the activations to avoid searching for this module
39  * in their execute methods, the base activation supertype
40  * should implement a method that does the lookup and salts
41  * away this factory for the activation to use as it needs it.
42  *
43  * @author ames
44  */

45 public interface ResultSetFactory {
46     /**
47         Module name for the monitor's module locating system.
48      */

49     String JavaDoc MODULE = "org.apache.derby.iapi.sql.execute.ResultSetFactory";
50
51     //
52
// DDL operations
53
//
54

55     /**
56         Generic DDL result set creation.
57
58         @param activation the activation for this result set
59
60         @return ResultSet A wrapper result set to run the Execution-time
61                                 logic.
62         @exception StandardException thrown when unable to create the
63             result set
64      */

65     ResultSet getDDLResultSet(Activation activation)
66                     throws StandardException;
67
68
69     //
70
// MISC operations
71
//
72

73     /**
74         Generic Misc result set creation.
75
76         @param activation the activation for this result set
77
78         @return ResultSet A wrapper result set to run the Execution-time
79                                 logic.
80         @exception StandardException thrown when unable to create the
81             result set
82      */

83     ResultSet getMiscResultSet(Activation activation)
84                     throws StandardException;
85
86     //
87
// Transaction operations
88
//
89
/**
90
91         @param activation the activation for this result set
92
93         @return ResultSet A wrapper result set to run the Execution-time
94                                 logic.
95         @exception StandardException thrown when unable to create the
96             result set
97      */

98     ResultSet getSetTransactionResultSet(Activation activation)
99         throws StandardException;
100
101     //
102
// DML statement operations
103
//
104
/**
105         An insert result set simply reports that it completed, and
106         the number of rows inserted. It does not return rows.
107         The insert has been completed once the
108         insert result set is available.
109
110         @param source the result set from which to take rows to
111             be inserted into the target table.
112         @param checkGM The code to enforce the check constraints, if any
113         @return the insert operation as a result set.
114         @exception StandardException thrown when unable to perform the insert
115      */

116     ResultSet getInsertResultSet(NoPutResultSet source,
117                                  GeneratedMethod checkGM)
118         throws StandardException;
119
120     /**
121         An insert VTI result set simply reports that it completed, and
122         the number of rows inserted. It does not return rows.
123         The insert has been completed once the
124         insert result set is available.
125
126         @param source the result set from which to take rows to
127             be inserted into the target table.
128         @param vtiRS The code to instantiate the VTI, if necessary
129         @return the insert VTI operation as a result set.
130         @exception StandardException thrown when unable to perform the insert
131      */

132     ResultSet getInsertVTIResultSet(NoPutResultSet source,
133                                  NoPutResultSet vtiRS)
134         throws StandardException;
135
136     /**
137         A delete VTI result set simply reports that it completed, and
138         the number of rows deleted. It does not return rows.
139         The delete has been completed once the
140         delete result set is available.
141
142         @param source the result set from which to take rows to
143             be inserted into the target table.
144         @return the delete VTI operation as a result set.
145         @exception StandardException thrown when unable to perform the insert
146      */

147     ResultSet getDeleteVTIResultSet(NoPutResultSet source)
148         throws StandardException;
149
150     /**
151         A delete result set simply reports that it completed, and
152         the number of rows deleted. It does not return rows.
153         The delete has been completed once the
154         delete result set is available.
155
156         @param source the result set from which to take rows to
157             be deleted from the target table. This result set must
158             contain one column which provides RowLocations that are
159             valid in the target table.
160         @return the delete operation as a result set.
161         @exception StandardException thrown when unable to perform the delete
162      */

163     ResultSet getDeleteResultSet(NoPutResultSet source)
164                             throws StandardException;
165
166     /**
167         A delete Cascade result set simply reports that it completed, and
168         the number of rows deleted. It does not return rows.
169         The delete has been completed once the
170         delete result set is available.
171
172         @param source the result set from which to take rows to
173             be deleted from the target table.
174         @param constantActionItem a constant action saved object reference
175         @param dependentResultSets an array of DeleteCascade Resultsets
176                                    for the current table referential action
177                                    dependents tables.
178         @param resultSetId an Id which is used to store the refence
179                             to the temporary result set created of
180                             the materilized rows.Dependent table resultsets
181                             uses the same id to access their parent temporary result sets.
182         @return the delete operation as a delete cascade result set.
183         @exception StandardException thrown when unable to perform the delete
184      */

185     ResultSet getDeleteCascadeResultSet(NoPutResultSet source,
186                                         int constantActionItem,
187                                         ResultSet[] dependentResultSets,
188                                         String JavaDoc resultSetId)
189                             throws StandardException;
190
191     /**
192         An update result set simply reports that it completed, and
193         the number of rows updated. It does not return rows.
194         The update has been completed once the
195         update result set is available.
196
197         @param source the result set from which to take rows to be
198             updated in the target table. This result set must contain
199             a column which provides RowLocations that are valid in the
200             target table, and new values to be placed in those rows.
201         @param checkGM The code to enforce the check constraints, if any
202         @return the update operation as a result set.
203         @exception StandardException thrown when unable to perform the update
204      */

205     ResultSet getUpdateResultSet(NoPutResultSet source,
206                                  GeneratedMethod checkGM)
207         throws StandardException;
208
209     /**
210      * @param source the result set from which to take rows to be
211      * updated in the target table.
212      * @return the update operation as a result set.
213      * @exception StandardException thrown on error
214      */

215     public ResultSet getUpdateVTIResultSet(NoPutResultSet source)
216         throws StandardException;
217
218     /**
219         An update result set simply reports that it completed, and
220         the number of rows updated. It does not return rows.
221         The update has been completed once the
222         update result set is available.
223
224         @param source the result set from which to take rows to be
225             updated in the target table. This result set must contain
226             a column which provides RowLocations that are valid in the
227             target table, and new values to be placed in those rows.
228         @param checkGM The code to enforce the check constraints, if any
229         @param constantActionItem a constant action saved object reference
230         @param rsdItem result Description, saved object id.
231         @return the update operation as a result set.
232         @exception StandardException thrown when unable to perform the update
233      */

234     ResultSet getDeleteCascadeUpdateResultSet(NoPutResultSet source,
235                                  GeneratedMethod checkGM,
236                                  int constantActionItem,
237                                  int rsdItem)
238         throws StandardException;
239
240     /**
241         A call statement result set simply reports that it completed.
242         It does not return rows.
243
244         @param methodCall a reference to a method in the activation
245               for the method call
246         @param activation the activation for this result set
247
248         @return the call statement operation as a result set.
249         @exception StandardException thrown when unable to perform the call statement
250      */

251     ResultSet getCallStatementResultSet(GeneratedMethod methodCall,
252                 Activation activation)
253             throws StandardException;
254
255     //
256
// Query expression operations
257
//
258

259     /**
260         A project restrict result set iterates over its source,
261         evaluating a restriction and when it is satisfied,
262         constructing a row to return in its result set based on
263         its projection.
264         The rows can be constructed as they are requested from the
265         result set.
266
267         @param source the result set from which to take rows to be
268             filtered by this operation.
269         @param restriction a reference to a method in the activation
270             that is applied to the activation's "current row" field
271             to determine whether the restriction is satisfied or not.
272             The signature of this method is
273             <verbatim>
274                 Boolean restriction() throws StandardException;
275             </verbatim>
276         @param projection a reference to a method in the activation
277             that is applied to the activation's "current row" field
278             to project out the expected result row.
279             The signature of this method is
280             <verbatim>
281                 ExecRow projection() throws StandardException;
282             </verbatim>
283         @param resultSetNumber The resultSetNumber for the ResultSet
284         @param constantRestriction a reference to a method in the activation
285             that represents a constant expression (eg where 1 = 2).
286             The signature of this method is
287             <verbatim>
288                 Boolean restriction() throws StandardException;
289             </verbatim>
290         @param mapArrayItem Item # for mapping of source to target columns
291         @param reuseResult Whether or not to reuse the result row.
292         @param doesProjection Whether or not this PRN does a projection
293         @param optimizerEstimatedRowCount Estimated total # of rows by
294                                             optimizer
295         @param optimizerEstimatedCost Estimated total cost by optimizer
296         @return the project restrict operation as a result set.
297         @exception StandardException thrown when unable to create the
298             result set
299      */

300     NoPutResultSet getProjectRestrictResultSet(NoPutResultSet source,
301         GeneratedMethod restriction,
302         GeneratedMethod projection, int resultSetNumber,
303         GeneratedMethod constantRestriction,
304         int mapArrayItem,
305         boolean reuseResult,
306         boolean doesProjection,
307         double optimizerEstimatedRowCount,
308         double optimizerEstimatedCost) throws StandardException;
309
310     /**
311         A hash table result set builds a hash table on its source,
312         applying a list of predicates, if any, to the source,
313         when building the hash table. It then does a look up into
314         the hash table on a probe.
315         The rows can be constructed as they are requested from the
316         result set.
317
318         @param source the result set from which to take rows to be
319             filtered by this operation.
320         @param singleTableRestriction restriction, if any, applied to
321             input of hash table.
322         @param equijoinQualifiers Qualifier[] for look up into hash table
323         @param projection a reference to a method in the activation
324             that is applied to the activation's "current row" field
325             to project out the expected result row.
326             The signature of this method is
327             <verbatim>
328                 ExecRow projection() throws StandardException;
329             </verbatim>
330         @param resultSetNumber The resultSetNumber for the ResultSet
331         @param mapRefItem Item # for mapping of source to target columns
332         @param reuseResult Whether or not to reuse the result row.
333         @param keyColItem Item for hash key column array
334         @param removeDuplicates Whether or not to remove duplicates when building the hash table
335         @param maxInMemoryRowCount Max size of in-memory hash table
336         @param initialCapacity initialCapacity for java.util.HashTable
337         @param loadFactor loadFactor for java.util.HashTable
338         @param optimizerEstimatedRowCount Estimated total # of rows by
339                                             optimizer
340         @param optimizerEstimatedCost Estimated total cost by optimizer
341         @return the project restrict operation as a result set.
342         @exception StandardException thrown when unable to create the
343             result set
344      */

345     public NoPutResultSet getHashTableResultSet(NoPutResultSet source,
346         GeneratedMethod singleTableRestriction,
347         Qualifier[][] equijoinQualifiers,
348         GeneratedMethod projection, int resultSetNumber,
349         int mapRefItem,
350         boolean reuseResult,
351         int keyColItem,
352         boolean removeDuplicates,
353         long maxInMemoryRowCount,
354         int initialCapacity,
355         float loadFactor,
356         double optimizerEstimatedRowCount,
357         double optimizerEstimatedCost)
358              throws StandardException;
359
360     /**
361         A sort result set sorts its source and if requested removes
362         duplicates. It will generate the entire result when open, and
363         then return it a row at a time.
364         <p>
365         If passed aggregates it will do scalar or vector aggregate
366         processing. A list of aggregator information is passed
367         off of the PreparedStatement's savedObjects. Aggregation
368         and SELECT DISTINCT cannot be processed in the same sort.
369
370         @param source the result set from which to take rows to be
371             filtered by this operation.
372         @param distinct true if distinct SELECT list
373         @param isInSortedOrder true if the source result set is in sorted order
374         @param orderItem entry in preparedStatement's savedObjects for order
375         @param rowAllocator a reference to a method in the activation
376             that generates rows of the right size and shape for the source
377         @param rowSize the size of the row that is allocated by rowAllocator.
378             size should be the maximum size of the sum of all the datatypes.
379             user type are necessarily approximated
380         @param resultSetNumber The resultSetNumber for the ResultSet
381         @param optimizerEstimatedRowCount Estimated total # of rows by
382                                             optimizer
383         @param optimizerEstimatedCost Estimated total cost by optimizer
384         @return the distinct operation as a result set.
385         @exception StandardException thrown when unable to create the
386             result set
387      */

388     NoPutResultSet getSortResultSet(NoPutResultSet source,
389         boolean distinct,
390         boolean isInSortedOrder,
391         int orderItem,
392         GeneratedMethod rowAllocator,
393         int rowSize,
394         int resultSetNumber,
395         double optimizerEstimatedRowCount,
396         double optimizerEstimatedCost)
397             throws StandardException;
398
399     /**
400         A ScalarAggregateResultSet computes non-distinct scalar aggregates.
401         It will compute the aggregates when open.
402
403         @param source the result set from which to take rows to be
404             filtered by this operation.
405         @param isInSortedOrder true if the source result set is in sorted order
406         @param aggregateItem entry in preparedStatement's savedObjects for aggregates
407         @param orderingItem Ignored to allow same signature as getDistinctScalarAggregateResultSet
408         @param rowAllocator a reference to a method in the activation
409             that generates rows of the right size and shape for the source
410         @param rowSize Ignored to allow same signature as getDistinctScalarAggregateResultSet
411         @param resultSetNumber The resultSetNumber for the ResultSet
412         @param singleInputRow Whether we know we have a single input row or not
413         @param optimizerEstimatedRowCount Estimated total # of rows by
414                                             optimizer
415         @param optimizerEstimatedCost Estimated total cost by optimizer
416         @return the scalar aggregation operation as a result set.
417         @exception StandardException thrown when unable to create the
418             result set
419      */

420     NoPutResultSet getScalarAggregateResultSet(NoPutResultSet source,
421         boolean isInSortedOrder,
422         int aggregateItem,
423         int orderingItem,
424         GeneratedMethod rowAllocator,
425         int rowSize,
426         int resultSetNumber,
427         boolean singleInputRow,
428         double optimizerEstimatedRowCount,
429         double optimizerEstimatedCost)
430             throws StandardException;
431
432     /**
433         A DistinctScalarAggregateResultSet computes scalar aggregates when
434         at least one of them is a distinct aggregate.
435         It will compute the aggregates when open.
436
437         @param source the result set from which to take rows to be
438             filtered by this operation.
439         @param isInSortedOrder true if the source result set is in sorted order
440         @param aggregateItem entry in preparedStatement's savedObjects for aggregates
441         @param orderingItem entry in preparedStatement's savedObjects for order
442         @param rowAllocator a reference to a method in the activation
443             that generates rows of the right size and shape for the source
444         @param rowSize the size of the row that is allocated by rowAllocator.
445             size should be the maximum size of the sum of all the datatypes.
446             user type are necessarily approximated
447         @param resultSetNumber The resultSetNumber for the ResultSet
448         @param singleInputRow Whether we know we have a single input row or not
449         @param optimizerEstimatedRowCount Estimated total # of rows by
450                                             optimizer
451         @param optimizerEstimatedCost Estimated total cost by optimizer
452         @return the scalar aggregation operation as a result set.
453         @exception StandardException thrown when unable to create the
454             result set
455      */

456     NoPutResultSet getDistinctScalarAggregateResultSet(NoPutResultSet source,
457         boolean isInSortedOrder,
458         int aggregateItem,
459         int orderingItem,
460         GeneratedMethod rowAllocator,
461         int rowSize,
462         int resultSetNumber,
463         boolean singleInputRow,
464         double optimizerEstimatedRowCount,
465         double optimizerEstimatedCost)
466             throws StandardException;
467
468     /**
469         A GroupedAggregateResultSet computes non-distinct grouped aggregates.
470         It will compute the aggregates when open.
471
472         @param source the result set from which to take rows to be
473             filtered by this operation.
474         @param isInSortedOrder true if the source result set is in sorted order
475         @param aggregateItem entry in preparedStatement's savedObjects for aggregates
476         @param orderingItem Ignored to allow same signature as getDistinctScalarAggregateResultSet
477         @param rowAllocator a reference to a method in the activation
478             that generates rows of the right size and shape for the source
479         @param rowSize Ignored to allow same signature as getDistinctScalarAggregateResultSet
480         @param resultSetNumber The resultSetNumber for the ResultSet
481         @param optimizerEstimatedRowCount Estimated total # of rows by
482                                             optimizer
483         @param optimizerEstimatedCost Estimated total cost by optimizer
484         @return the scalar aggregation operation as a result set.
485         @exception StandardException thrown when unable to create the
486             result set
487      */

488     NoPutResultSet getGroupedAggregateResultSet(NoPutResultSet source,
489         boolean isInSortedOrder,
490         int aggregateItem,
491         int orderingItem,
492         GeneratedMethod rowAllocator,
493         int rowSize,
494         int resultSetNumber,
495         double optimizerEstimatedRowCount,
496         double optimizerEstimatedCost)
497             throws StandardException;
498
499     /**
500         A DistinctGroupedAggregateResultSet computes scalar aggregates when
501         at least one of them is a distinct aggregate.
502         It will compute the aggregates when open.
503
504         @param source the result set from which to take rows to be
505             filtered by this operation.
506         @param isInSortedOrder true if the source result set is in sorted order
507         @param aggregateItem entry in preparedStatement's savedObjects for aggregates
508         @param orderingItem entry in preparedStatement's savedObjects for order
509         @param rowAllocator a reference to a method in the activation
510             that generates rows of the right size and shape for the source
511         @param rowSize the size of the row that is allocated by rowAllocator.
512             size should be the maximum size of the sum of all the datatypes.
513             user type are necessarily approximated
514         @param resultSetNumber The resultSetNumber for the ResultSet
515         @param optimizerEstimatedRowCount Estimated total # of rows by
516                                             optimizer
517         @param optimizerEstimatedCost Estimated total cost by optimizer
518         @return the scalar aggregation operation as a result set.
519         @exception StandardException thrown when unable to create the
520             result set
521      */

522     NoPutResultSet getDistinctGroupedAggregateResultSet(NoPutResultSet source,
523         boolean isInSortedOrder,
524         int aggregateItem,
525         int orderingItem,
526         GeneratedMethod rowAllocator,
527         int rowSize,
528         int resultSetNumber,
529         double optimizerEstimatedRowCount,
530         double optimizerEstimatedCost)
531             throws StandardException;
532
533     /**
534         An any result set iterates over its source,
535         returning a row with all columns set to nulls
536         if the source returns no rows.
537
538         @param source the result set from which to take rows to be
539             filtered by this operation.
540         @param emptyRowFun a reference to a method in the activation
541             that is called if the source returns no rows
542         @param resultSetNumber The resultSetNumber for the ResultSet
543         @param subqueryNumber The subquery number for this subquery.
544         @param pointOfAttachment The point of attachment for this subquery.
545         @param optimizerEstimatedRowCount Estimated total # of rows by
546                                             optimizer
547         @param optimizerEstimatedCost Estimated total cost by optimizer
548         @return the any operation as a result set.
549         @exception StandardException thrown when unable to create the
550             result set
551      */

552     NoPutResultSet getAnyResultSet(NoPutResultSet source,
553         GeneratedMethod emptyRowFun, int resultSetNumber,
554         int subqueryNumber, int pointOfAttachment,
555         double optimizerEstimatedRowCount,
556         double optimizerEstimatedCost)
557         throws StandardException;
558
559     /**
560         A once result set iterates over its source,
561         raising an error if the source returns > 1 row and
562         returning a row with all columns set to nulls
563         if the source returns no rows.
564
565         @param source the result set from which to take rows to be
566             filtered by this operation.
567         @param emptyRowFun a reference to a method in the activation
568             that is called if the source returns no rows
569         @param cardinalityCheck The type of cardinality check, if any that
570             is required
571         @param resultSetNumber The resultSetNumber for the ResultSet
572         @param subqueryNumber The subquery number for this subquery.
573         @param pointOfAttachment The point of attachment for this subquery.
574         @param optimizerEstimatedRowCount Estimated total # of rows by
575                                             optimizer
576         @param optimizerEstimatedCost Estimated total cost by optimizer
577         @return the once operation as a result set.
578         @exception StandardException thrown when unable to create the
579             result set
580      */

581     NoPutResultSet getOnceResultSet(NoPutResultSet source,
582         GeneratedMethod emptyRowFun,
583         int cardinalityCheck, int resultSetNumber,
584         int subqueryNumber, int pointOfAttachment,
585         double optimizerEstimatedRowCount,
586         double optimizerEstimatedCost)
587         throws StandardException;
588
589     /**
590         A row result set forms a result set on a single, known row value.
591         It is used to turn constant rows into result sets for use in
592         the result set paradigm.
593         The row can be constructed when it is requested from the
594         result set.
595
596         @param activation the activation for this result set,
597             against which the row operation is performed to
598             create the result set.
599         @param row a reference to a method in the activation
600             that creates the expected row.
601             <verbatim>
602                 ExecRow row() throws StandardException;
603             </verbatim>
604         @param canCacheRow True if execution can cache the input row
605             after it has gotten it. If the input row is constructed soley
606             of constants or parameters, it is ok to cache this row rather
607             than recreating it each time it is requested.
608         @param resultSetNumber The resultSetNumber for the ResultSet
609         @param optimizerEstimatedRowCount Estimated total # of rows by
610                                             optimizer
611         @param optimizerEstimatedCost Estimated total cost by optimizer
612         @return the row as a result set.
613         @exception StandardException thrown when unable to create the
614             result set
615      */

616     NoPutResultSet getRowResultSet(Activation activation, GeneratedMethod row,
617                               boolean canCacheRow,
618                               int resultSetNumber,
619                               double optimizerEstimatedRowCount,
620                               double optimizerEstimatedCost)
621         throws StandardException;
622
623     /**
624         A VTI result set wraps a user supplied result set.
625
626         @param activation the activation for this result set,
627             against which the row operation is performed to
628             create the result set.
629         @param row a reference to a method in the activation
630             that creates the expected row.
631             <verbatim>
632                 ExecRow row() throws StandardException;
633             </verbatim>
634         @param resultSetNumber The resultSetNumber for the ResultSet
635         @param constructor The GeneratedMethod for the user's constructor
636         @param javaClassName The java class name for the VTI
637         @param erdNumber int for referenced column BitSet
638                                 (so it can be turned back into an object)
639         @param version2 Whether or not VTI is a version 2 VTI.
640         @param isTarget Whether or not VTI is a target VTI.
641         @param optimizerEstimatedRowCount Estimated total # of rows by
642                                             optimizer
643         @param optimizerEstimatedCost Estimated total cost by optimizer
644         @return the row as a result set.
645         @exception StandardException thrown when unable to create the
646             result set
647      */

648     public NoPutResultSet getVTIResultSet(Activation activation, GeneratedMethod row,
649                                      int resultSetNumber,
650                                      GeneratedMethod constructor,
651                                      String JavaDoc javaClassName,
652                                      Qualifier[][] pushedQualifiers,
653                                      int erdNumber,
654                                      boolean version2, boolean reuseablePs,
655                                      int ctcNumber,
656                                      boolean isTarget,
657                                      int scanIsolationLevel,
658                                      double optimizerEstimatedRowCount,
659                                      double optimizerEstimatedCost)
660          throws StandardException;
661
662     /**
663         A hash result set forms a result set on a hash table built on a scan
664         of a table.
665         The rows are put into the hash table on the 1st open.
666         <p>
667
668         @param activation the activation for this result set,
669             which provides the context for the row allocation operation.
670         @param conglomId the conglomerate of the table to be scanned.
671         @param scociItem The saved item for the static conglomerate info.
672         @param resultRowAllocator a reference to a method in the activation
673             that creates a holder for the rows from the scan.
674             <verbatim>
675                 ExecRow rowAllocator() throws StandardException;
676             </verbatim>
677         @param resultSetNumber The resultSetNumber for the ResultSet
678         @param startKeyGetter a reference to a method in the activation
679             that gets the start key indexable row for the scan. Null
680             means there is no start key.
681             <verbatim>
682                 ExecIndexRow startKeyGetter() throws StandardException;
683             </verbatim>
684         @param startSearchOperator The start search operator for opening
685             the scan
686         @param stopKeyGetter a reference to a method in the activation
687             that gets the stop key indexable row for the scan. Null means
688             there is no stop key.
689             <verbatim>
690                 ExecIndexRow stopKeyGetter() throws StandardException;
691             </verbatim>
692         @param stopSearchOperator The stop search operator for opening
693             the scan
694         @param sameStartStopPosition Re-use the startKeyGetter for the stopKeyGetter
695                                         (Exact match search.)
696         @param scanQualifiers the array of Qualifiers for the scan.
697             Null or an array length of zero means there are no qualifiers.
698         @param nextQualifiers the array of Qualifiers for the look up into the hash table.
699         @param initialCapacity The initialCapacity for the HashTable.
700         @param loadFactor The loadFactor for the HashTable.
701         @param maxCapacity The maximum size for the HashTable.
702         @param hashKeyColumn The 0-based column # for the hash key.
703         @param tableName The full name of the table
704         @param userSuppliedOptimizerOverrides Overrides specified by the user on the sql
705         @param indexName The name of the index, if one used to access table.
706         @param isConstraint If index, if used, is a backing index for a constraint.
707         @param forUpdate True means open for update
708         @param colRefItem An saved item for a bitSet of columns that
709                                 are referenced in the underlying table. -1 if
710                                 no item.
711         @param lockMode The lock granularity to use (see
712                                 TransactionController in access)
713         @param tableLocked Whether or not the table is marked as using table locking
714                                 (in sys.systables)
715         @param isolationLevel Isolation level (specified or not) to use on scans
716         @param optimizerEstimatedRowCount Estimated total # of rows by
717                                             optimizer
718         @param optimizerEstimatedCost Estimated total cost by optimizer
719         @return the table scan operation as a result set.
720         @exception StandardException thrown when unable to create the
721             result set
722      */

723     NoPutResultSet getHashScanResultSet(
724                                 Activation activation,
725                                 long conglomId,
726                                 int scociItem,
727                                 GeneratedMethod resultRowAllocator,
728                                 int resultSetNumber,
729                                 GeneratedMethod startKeyGetter,
730                                 int startSearchOperator,
731                                 GeneratedMethod stopKeyGetter,
732                                 int stopSearchOperator,
733                                 boolean sameStartStopPosition,
734                                 Qualifier[][] scanQualifiers,
735                                 Qualifier[][] nextQualifiers,
736                                 int initialCapacity,
737                                 float loadFactor,
738                                 int maxCapacity,
739                                 int hashKeyColumn,
740                                 String JavaDoc tableName,
741                                 String JavaDoc userSuppliedOptimizerOverrides,
742                                 String JavaDoc indexName,
743                                 boolean isConstraint,
744                                 boolean forUpdate,
745                                 int colRefItem,
746                                 int indexColItem,
747                                 int lockMode,
748                                 boolean tableLocked,
749                                 int isolationLevel,
750                                 double optimizerEstimatedRowCount,
751                                 double optimizerEstimatedCost)
752             throws StandardException;
753
754     /**
755         A distinct scan result set pushes duplicate elimination into
756         the scan.
757         <p>
758
759         @param activation the activation for this result set,
760             which provides the context for the row allocation operation.
761         @param conglomId the conglomerate of the table to be scanned.
762         @param scociItem The saved item for the static conglomerate info.
763         @param resultRowAllocator a reference to a method in the activation
764             that creates a holder for the rows from the scan.
765             <verbatim>
766                 ExecRow rowAllocator() throws StandardException;
767             </verbatim>
768         @param resultSetNumber The resultSetNumber for the ResultSet
769         @param hashKeyColumn The 0-based column # for the hash key.
770         @param tableName The full name of the table
771         @param userSuppliedOptimizerOverrides Overrides specified by the user on the sql
772         @param indexName The name of the index, if one used to access table.
773         @param isConstraint If index, if used, is a backing index for a constraint.
774         @param colRefItem An saved item for a bitSet of columns that
775                                 are referenced in the underlying table. -1 if
776                                 no item.
777         @param lockMode The lock granularity to use (see
778                                 TransactionController in access)
779         @param tableLocked Whether or not the table is marked as using table locking
780                                 (in sys.systables)
781         @param isolationLevel Isolation level (specified or not) to use on scans
782         @param optimizerEstimatedRowCount Estimated total # of rows by
783                                             optimizer
784         @param optimizerEstimatedCost Estimated total cost by optimizer
785         @return the table scan operation as a result set.
786         @exception StandardException thrown when unable to create the
787             result set
788      */

789     NoPutResultSet getDistinctScanResultSet(
790                                 Activation activation,
791                                 long conglomId,
792                                 int scociItem,
793                                 GeneratedMethod resultRowAllocator,
794                                 int resultSetNumber,
795                                 int hashKeyColumn,
796                                 String JavaDoc tableName,
797                                 String JavaDoc userSuppliedOptimizerOverrides,
798                                 String JavaDoc indexName,
799                                 boolean isConstraint,
800                                 int colRefItem,
801                                 int lockMode,
802                                 boolean tableLocked,
803                                 int isolationLevel,
804                                 double optimizerEstimatedRowCount,
805                                 double optimizerEstimatedCost)
806             throws StandardException;
807
808     /**
809         A table scan result set forms a result set on a scan
810         of a table.
811         The rows can be constructed as they are requested from the
812         result set.
813         <p>
814         This form of the table scan operation is simple, and is
815         to be used when there are no predicates to be passed down
816         to the scan to limit its scope on the target table.
817
818         @param conglomId the conglomerate of the table to be scanned.
819         @param scociItem The saved item for the static conglomerate info.
820         @param activation the activation for this result set,
821             which provides the context for the row allocation operation.
822         @param resultRowAllocator a reference to a method in the activation
823             that creates a holder for the result row of the scan. May
824             be a partial row.
825             <verbatim>
826                 ExecRow rowAllocator() throws StandardException;
827             </verbatim>
828         @param resultSetNumber The resultSetNumber for the ResultSet
829         @param startKeyGetter a reference to a method in the activation
830             that gets the start key indexable row for the scan. Null
831             means there is no start key.
832             <verbatim>
833                 ExecIndexRow startKeyGetter() throws StandardException;
834             </verbatim>
835         @param startSearchOperator The start search operator for opening
836             the scan
837         @param stopKeyGetter a reference to a method in the activation
838             that gets the stop key indexable row for the scan. Null means
839             there is no stop key.
840             <verbatim>
841                 ExecIndexRow stopKeyGetter() throws StandardException;
842             </verbatim>
843         @param stopSearchOperator The stop search operator for opening
844             the scan
845         @param sameStartStopPosition Re-use the startKeyGetter for the stopKeyGetter
846                                         (Exact match search.)
847         @param qualifiers the array of Qualifiers for the scan.
848             Null or an array length of zero means there are no qualifiers.
849         @param tableName The full name of the table
850         @param userSuppliedOptimizerOverrides Overrides specified by the user on the sql
851         @param indexName The name of the index, if one used to access table.
852         @param isConstraint If index, if used, is a backing index for a constraint.
853         @param forUpdate True means open for update
854         @param colRefItem An saved item for a bitSet of columns that
855                                 are referenced in the underlying table. -1 if
856                                 no item.
857         @param lockMode The lock granularity to use (see
858                                 TransactionController in access)
859         @param tableLocked Whether or not the table is marked as using table locking
860                                 (in sys.systables)
861         @param isolationLevel Isolation level (specified or not) to use on scans
862         @param oneRowScan Whether or not this is a 1 row scan.
863         @param optimizerEstimatedRowCount Estimated total # of rows by
864                                             optimizer
865         @param optimizerEstimatedCost Estimated total cost by optimizer
866
867         @return the table scan operation as a result set.
868         @exception StandardException thrown when unable to create the
869             result set
870      */

871     NoPutResultSet getTableScanResultSet(
872                                 Activation activation,
873                                 long conglomId,
874                                 int scociItem,
875                                 GeneratedMethod resultRowAllocator,
876                                 int resultSetNumber,
877                                 GeneratedMethod startKeyGetter,
878                                 int startSearchOperator,
879                                 GeneratedMethod stopKeyGetter,
880                                 int stopSearchOperator,
881                                 boolean sameStartStopPosition,
882                                 Qualifier[][] qualifiers,
883                                 String JavaDoc tableName,
884                                 String JavaDoc userSuppliedOptimizerOverrides,
885                                 String JavaDoc indexName,
886                                 boolean isConstraint,
887                                 boolean forUpdate,
888                                 int colRefItem,
889                                 int indexColItem,
890                                 int lockMode,
891                                 boolean tableLocked,
892                                 int isolationLevel,
893                                 boolean oneRowScan,
894                                 double optimizerEstimatedRowCount,
895                                 double optimizerEstimatedCost)
896             throws StandardException;
897
898     /**
899         A table scan result set forms a result set on a scan
900         of a table.
901         The rows can be constructed as they are requested from the
902         result set.
903         <p>
904         This form of the table scan operation is simple, and is
905         to be used when there are no predicates to be passed down
906         to the scan to limit its scope on the target table.
907
908         @param conglomId the conglomerate of the table to be scanned.
909         @param scociItem The saved item for the static conglomerate info.
910         @param activation the activation for this result set,
911             which provides the context for the row allocation operation.
912         @param resultRowAllocator a reference to a method in the activation
913             that creates a holder for the result row of the scan. May
914             be a partial row.
915             <verbatim>
916                 ExecRow rowAllocator() throws StandardException;
917             </verbatim>
918         @param resultSetNumber The resultSetNumber for the ResultSet
919         @param startKeyGetter a reference to a method in the activation
920             that gets the start key indexable row for the scan. Null
921             means there is no start key.
922             <verbatim>
923                 ExecIndexRow startKeyGetter() throws StandardException;
924             </verbatim>
925         @param startSearchOperator The start search operator for opening
926             the scan
927         @param stopKeyGetter a reference to a method in the activation
928             that gets the stop key indexable row for the scan. Null means
929             there is no stop key.
930             <verbatim>
931                 ExecIndexRow stopKeyGetter() throws StandardException;
932             </verbatim>
933         @param stopSearchOperator The stop search operator for opening
934             the scan
935         @param sameStartStopPosition Re-use the startKeyGetter for the stopKeyGetter
936                                         (Exact match search.)
937         @param qualifiers the array of Qualifiers for the scan.
938             Null or an array length of zero means there are no qualifiers.
939         @param tableName The full name of the table
940         @param userSuppliedOptimizerOverrides Overrides specified by the user on the sql
941         @param indexName The name of the index, if one used to access table.
942         @param isConstraint If index, if used, is a backing index for a constraint.
943         @param forUpdate True means open for update
944         @param colRefItem An saved item for a bitSet of columns that
945                                 are referenced in the underlying table. -1 if
946                                 no item.
947         @param lockMode The lock granularity to use (see
948                                 TransactionController in access)
949         @param tableLocked Whether or not the table is marked as using table locking
950                                 (in sys.systables)
951         @param isolationLevel Isolation level (specified or not) to use on scans
952         @param rowsPerRead The number of rows to read per fetch.
953         @param oneRowScan Whether or not this is a 1 row scan.
954         @param optimizerEstimatedRowCount Estimated total # of rows by
955                                             optimizer
956         @param optimizerEstimatedCost Estimated total cost by optimizer
957
958         @return the table scan operation as a result set.
959         @exception StandardException thrown when unable to create the
960             result set
961      */

962     NoPutResultSet getBulkTableScanResultSet(
963                                 Activation activation,
964                                 long conglomId,
965                                 int scociItem,
966                                 GeneratedMethod resultRowAllocator,
967                                 int resultSetNumber,
968                                 GeneratedMethod startKeyGetter,
969                                 int startSearchOperator,
970                                 GeneratedMethod stopKeyGetter,
971                                 int stopSearchOperator,
972                                 boolean sameStartStopPosition,
973                                 Qualifier[][] qualifiers,
974                                 String JavaDoc tableName,
975                                 String JavaDoc userSuppliedOptimizerOverrides,
976                                 String JavaDoc indexName,
977                                 boolean isConstraint,
978                                 boolean forUpdate,
979                                 int colRefItem,
980                                 int indexColItem,
981                                 int lockMode,
982                                 boolean tableLocked,
983                                 int isolationLevel,
984                                 int rowsPerRead,
985                                 boolean oneRowScan,
986                                 double optimizerEstimatedRowCount,
987                                 double optimizerEstimatedCost)
988             throws StandardException;
989     /**
990         An index row to base row result set gets an index row from its source
991         and uses the RowLocation in its last column to get the row from the
992         base conglomerate.
993         <p>
994
995         @param conglomId Conglomerate # for the heap.
996         @param scoci The saved item for the static conglomerate info.
997         @param source the source result set, which is expected to provide
998                         rows from an index conglomerate
999         @param resultRowAllocator a reference to a method in the activation
1000            that creates a holder for the rows from the scan.
1001            <verbatim>
1002                ExecRow rowAllocator() throws StandardException;
1003            </verbatim>
1004        @param resultSetNumber The resultSetNumber for the ResultSet
1005        @param indexName The name of the index.
1006        @param heapColRefItem A saved item for a bitImpl of columns that
1007                                are referenced in the underlying heap. -1 if
1008                                no item.
1009        @param indexColRefItem A saved item for a bitImpl of columns that
1010                                are referenced in the underlying index. -1 if
1011                                no item.
1012        @param indexColMapItem A saved item for a ReferencedColumnsDescriptorImpl
1013                                which tell which columms are coming from the index.
1014        @param restriction The restriction, if any, to be applied to the base row
1015        @param forUpdate True means to open for update
1016        @param optimizerEstimatedRowCount Estimated total # of rows by
1017                                            optimizer
1018        @param optimizerEstimatedCost Estimated total cost by optimizer
1019
1020        @return the index row to base row operation as a result set.
1021        @exception StandardException thrown when unable to create the
1022            result set
1023     */

1024    public NoPutResultSet getIndexRowToBaseRowResultSet(
1025                                long conglomId,
1026                                int scoci,
1027                                NoPutResultSet source,
1028                                GeneratedMethod resultRowAllocator,
1029                                int resultSetNumber,
1030                                String JavaDoc indexName,
1031                                int heapColRefItem,
1032                                int indexColRefItem,
1033                                int indexColMapItem,
1034                                GeneratedMethod restriction,
1035                                boolean forUpdate,
1036                                double optimizerEstimatedRowCount,
1037                                double optimizerEstimatedCost)
1038            throws StandardException;
1039
1040    /**
1041        A nested loop left outer join result set forms a result set on top of
1042        2 other result sets.
1043        The rows can be constructed as they are requested from the
1044        result set.
1045        <p>
1046        This form of the nested loop join operation is simple, and is
1047        to be used when there are no join predicates to be passed down
1048        to the join to limit its scope on the right ResultSet.
1049
1050        @param leftResultSet Outer ResultSet for join.
1051        @param leftNumCols Number of columns in the leftResultSet
1052        @param rightResultSet Inner ResultSet for join.
1053        @param rightNumCols Number of columns in the rightResultSet
1054        @param joinClause a reference to a method in the activation
1055            that is applied to the activation's "current row" field
1056            to determine whether the joinClause is satisfied or not.
1057            The signature of this method is
1058            <verbatim>
1059                Boolean joinClause() throws StandardException;
1060            </verbatim>
1061        @param resultSetNumber The resultSetNumber for the ResultSet
1062        @param oneRowRightSide boolean, whether or not the right side returns
1063                                a single row. (No need to do 2nd next() if it does.)
1064        @param notExistsRightSide boolean, whether or not the right side resides a
1065                                    NOT EXISTS base table
1066        @param optimizerEstimatedRowCount Estimated total # of rows by
1067                                            optimizer
1068        @param optimizerEstimatedCost Estimated total cost by optimizer
1069        @param userSuppliedOptimizerOverrides Overrides specified by the user on the sql
1070        @return the nested loop join operation as a result set.
1071        @exception StandardException thrown when unable to create the
1072            result set
1073     */

1074    public NoPutResultSet getNestedLoopJoinResultSet(NoPutResultSet leftResultSet,
1075                                   int leftNumCols,
1076                                   NoPutResultSet rightResultSet,
1077                                   int rightNumCols,
1078                                   GeneratedMethod joinClause,
1079                                   int resultSetNumber,
1080                                   boolean oneRowRightSide,
1081                                   boolean notExistsRightSide,
1082                                   double optimizerEstimatedRowCount,
1083                                   double optimizerEstimatedCost,
1084                                   String JavaDoc userSuppliedOptimizerOverrides)
1085            throws StandardException;
1086
1087    /**
1088        A hash join.
1089
1090        @param leftResultSet Outer ResultSet for join.
1091        @param leftNumCols Number of columns in the leftResultSet
1092        @param rightResultSet Inner ResultSet for join.
1093        @param rightNumCols Number of columns in the rightResultSet
1094        @param joinClause a reference to a method in the activation
1095            that is applied to the activation's "current row" field
1096            to determine whether the joinClause is satisfied or not.
1097            The signature of this method is
1098            <verbatim>
1099                Boolean joinClause() throws StandardException;
1100            </verbatim>
1101        @param resultSetNumber The resultSetNumber for the ResultSet
1102        @param oneRowRightSide boolean, whether or not the right side returns
1103                                a single row. (No need to do 2nd next() if it does.)
1104        @param notExistsRightSide boolean, whether or not the right side resides a
1105                                    NOT EXISTS base table
1106        @param optimizerEstimatedRowCount Estimated total # of rows by
1107                                            optimizer
1108        @param optimizerEstimatedCost Estimated total cost by optimizer
1109        @param userSuppliedOptimizerOverrides Overrides specified by the user on the sql
1110        @return the nested loop join operation as a result set.
1111        @exception StandardException thrown when unable to create the
1112            result set
1113     */

1114    public NoPutResultSet getHashJoinResultSet(NoPutResultSet leftResultSet,
1115                                   int leftNumCols,
1116                                   NoPutResultSet rightResultSet,
1117                                   int rightNumCols,
1118                                   GeneratedMethod joinClause,
1119                                   int resultSetNumber,
1120                                   boolean oneRowRightSide,
1121                                   boolean notExistsRightSide,
1122                                   double optimizerEstimatedRowCount,
1123                                   double optimizerEstimatedCost,
1124                                   String JavaDoc userSuppliedOptimizerOverrides)
1125            throws StandardException;
1126
1127
1128    /**
1129        A nested loop join result set forms a result set on top of
1130        2 other result sets.
1131        The rows can be constructed as they are requested from the
1132        result set.
1133        <p>
1134        This form of the nested loop join operation is simple, and is
1135        to be used when there are no join predicates to be passed down
1136        to the join to limit its scope on the right ResultSet.
1137
1138        @param leftResultSet Outer ResultSet for join.
1139        @param leftNumCols Number of columns in the leftResultSet
1140        @param rightResultSet Inner ResultSet for join.
1141        @param rightNumCols Number of columns in the rightResultSet
1142        @param joinClause a reference to a method in the activation
1143            that is applied to the activation's "current row" field
1144            to determine whether the joinClause is satisfied or not.
1145            The signature of this method is
1146            <verbatim>
1147                Boolean joinClause() throws StandardException;
1148            </verbatim>
1149        @param resultSetNumber The resultSetNumber for the ResultSet
1150        @param emptyRowFun a reference to a method in the activation
1151                            that is called if the right child returns no rows
1152        @param wasRightOuterJoin Whether or not this was originally a right outer join
1153        @param oneRowRightSide boolean, whether or not the right side returns
1154                                a single row. (No need to do 2nd next() if it does.)
1155        @param notExistsRightSide boolean, whether or not the right side resides a
1156                                    NOT EXISTS base table
1157        @param optimizerEstimatedRowCount Estimated total # of rows by
1158                                            optimizer
1159        @param optimizerEstimatedCost Estimated total cost by optimizer
1160        @param userSuppliedOptimizerOverrides Overrides specified by the user on the sql
1161        @return the nested loop join operation as a result set.
1162        @exception StandardException thrown when unable to create the
1163            result set
1164     */

1165    public NoPutResultSet getNestedLoopLeftOuterJoinResultSet(NoPutResultSet leftResultSet,
1166                                   int leftNumCols,
1167                                   NoPutResultSet rightResultSet,
1168                                   int rightNumCols,
1169                                   GeneratedMethod joinClause,
1170                                   int resultSetNumber,
1171                                   GeneratedMethod emptyRowFun,
1172                                   boolean wasRightOuterJoin,
1173                                   boolean oneRowRightSide,
1174                                   boolean notExistsRightSide,
1175                                   double optimizerEstimatedRowCount,
1176                                   double optimizerEstimatedCost,
1177                                   String JavaDoc userSuppliedOptimizerOverrides)
1178            throws StandardException;
1179
1180    /**
1181        A left outer join using a hash join.
1182
1183        @param leftResultSet Outer ResultSet for join.
1184        @param leftNumCols Number of columns in the leftResultSet
1185        @param rightResultSet Inner ResultSet for join.
1186        @param rightNumCols Number of columns in the rightResultSet
1187        @param joinClause a reference to a method in the activation
1188            that is applied to the activation's "current row" field
1189            to determine whether the joinClause is satisfied or not.
1190            The signature of this method is
1191            <verbatim>
1192                Boolean joinClause() throws StandardException;
1193            </verbatim>
1194        @param resultSetNumber The resultSetNumber for the ResultSet
1195        @param emptyRowFun a reference to a method in the activation
1196                            that is called if the right child returns no rows
1197        @param wasRightOuterJoin Whether or not this was originally a right outer join
1198        @param oneRowRightSide boolean, whether or not the right side returns
1199                                a single row. (No need to do 2nd next() if it does.)
1200        @param notExistsRightSide boolean, whether or not the right side resides a
1201                                    NOT EXISTS base table
1202        @param optimizerEstimatedRowCount Estimated total # of rows by
1203                                            optimizer
1204        @param optimizerEstimatedCost Estimated total cost by optimizer
1205        @param userSuppliedOptimizerOverrides Overrides specified by the user on the sql
1206        @return the nested loop join operation as a result set.
1207        @exception StandardException thrown when unable to create the
1208            result set
1209     */

1210    public NoPutResultSet getHashLeftOuterJoinResultSet(NoPutResultSet leftResultSet,
1211                                   int leftNumCols,
1212                                   NoPutResultSet rightResultSet,
1213                                   int rightNumCols,
1214                                   GeneratedMethod joinClause,
1215                                   int resultSetNumber,
1216                                   GeneratedMethod emptyRowFun,
1217                                   boolean wasRightOuterJoin,
1218                                   boolean oneRowRightSide,
1219                                   boolean notExistsRightSide,
1220                                   double optimizerEstimatedRowCount,
1221                                   double optimizerEstimatedCost,
1222                                   String JavaDoc userSuppliedOptimizerOverrides)
1223            throws StandardException;
1224
1225    /**
1226        A ResultSet which materializes the underlying ResultSet tree into a
1227        temp table on the 1st open. All subsequent "scans" of this ResultSet
1228        will return results from the temp table.
1229
1230        @param source the result set input to this result set.
1231        @param resultSetNumber The resultSetNumber for the ResultSet
1232        @param optimizerEstimatedRowCount Estimated total # of rows by
1233                                            optimizer
1234        @param optimizerEstimatedCost Estimated total cost by optimizer
1235        @return the materialization operation as a result set.
1236
1237        @exception StandardException Thrown on failure
1238     */

1239    NoPutResultSet getMaterializedResultSet(NoPutResultSet source,
1240                                            int resultSetNumber,
1241                                            double optimizerEstimatedRowCount,
1242                                            double optimizerEstimatedCost)
1243        throws StandardException;
1244
1245    /**
1246        A ResultSet which provides the insensitive scrolling functionality
1247        for the underlying result set by materializing the underlying ResultSet
1248        tree into a hash table while scrolling forward.
1249
1250        @param source the result set input to this result set.
1251        @param activation the activation for this result set,
1252            which provides the context for normalization.
1253        @param resultSetNumber The resultSetNumber for the ResultSet
1254        @param sourceRowWidth The # of columns in the source row.
1255        @param optimizerEstimatedRowCount Estimated total # of rows by
1256                                            optimizer
1257        @param optimizerEstimatedCost Estimated total cost by optimizer
1258        @return the materialization operation as a result set.
1259
1260        @exception StandardException Thrown on failure
1261     */

1262    NoPutResultSet getScrollInsensitiveResultSet(NoPutResultSet source, Activation activation,
1263                                            int resultSetNumber,
1264                                            int sourceRowWidth,
1265                                            boolean scrollable,
1266                                            double optimizerEstimatedRowCount,
1267                                            double optimizerEstimatedCost)
1268        throws StandardException;
1269
1270    /**
1271        REMIND: needs more description...
1272
1273        @param source the result set input to this result set.
1274        @param resultSetNumber The resultSetNumber for the ResultSet
1275        @param erdNumber int for ResultDescription
1276                            (so it can be turned back into an object)
1277        @param optimizerEstimatedRowCount Estimated total # of rows by
1278                                            optimizer
1279        @param optimizerEstimatedCost Estimated total cost by optimizer
1280        @return the normalization operation as a result set.
1281
1282        @exception StandardException Thrown on failure
1283     */

1284    NoPutResultSet getNormalizeResultSet(NoPutResultSet source,
1285                                         int resultSetNumber, int erdNumber,
1286                                         double optimizerEstimatedRowCount,
1287                                         double optimizerEstimatedCost,
1288                                         boolean forUpdate)
1289        throws StandardException;
1290
1291    /**
1292        A current of result set forms a result set on the
1293        current row of an open cursor.
1294        It is used to perform positioned operations such as
1295        positioned update and delete, using the result set paradigm.
1296
1297        @param cursorName the name of the cursor providing the row.
1298        @param activation the activation for this result set,
1299            used to provide information about the result set.
1300        @param resultSetNumber The resultSetNumber for the ResultSet
1301     */

1302    NoPutResultSet getCurrentOfResultSet(String JavaDoc cursorName, Activation activation,
1303                                    int resultSetNumber, String JavaDoc psName);
1304
1305    /**
1306     * The Union interface is used to evaluate the union (all) of two ResultSets.
1307     * (Any duplicate elimination is performed above this ResultSet.)
1308     *
1309     * Forms a ResultSet returning the union of the rows in two source
1310     * ResultSets. The column types in source1 and source2 are assumed to be
1311     * the same.
1312     *
1313     * @param source1 The first ResultSet whose rows go into the union
1314     * @param source2 The second ResultSet whose rows go into the
1315     * union
1316     * @param resultSetNumber The resultSetNumber for the ResultSet
1317     * @param optimizerEstimatedRowCount Estimated total # of rows by
1318     * optimizer
1319     * @param optimizerEstimatedCost Estimated total cost by optimizer
1320     *
1321     * @return A ResultSet from which the caller can get the union
1322     * of the two source ResultSets.
1323     *
1324     * @exception StandardException Thrown on failure
1325     */

1326    NoPutResultSet getUnionResultSet(NoPutResultSet source1,
1327                    NoPutResultSet source2,
1328                    int resultSetNumber,
1329                    double optimizerEstimatedRowCount,
1330                    double optimizerEstimatedCost)
1331                    throws StandardException;
1332
1333
1334    /**
1335     * The SetOpResultSet is used to implement an INTERSECT or EXCEPT operation.
1336     * It selects rows from two ordered input result sets.
1337     *
1338     * @param leftSource The result set that implements the left input
1339     * @param rightSource The result set that implements the right input
1340     * @param activation the activation for this result set
1341     * @param resultSetNumber
1342     * @param optimizerEstimatedRowCount
1343     * @param optimizerEstimatedCost
1344     * @param opType IntersectOrExceptNode.INTERSECT_OP or EXCEPT_OP
1345     * @param all true if the operation is an INTERSECT ALL or an EXCEPT ALL,
1346     * false if the operation is an INTERSECT DISCTINCT or an EXCEPT DISCTINCT
1347     * @param intermediateOrderByColumnsSavedObject The saved object index for the array of order by columns for the
1348     * ordering of the left and right sources. That is, both the left and right sources have an order by
1349     * clause of the form ORDER BY intermediateOrderByColumns[0],intermediateOrderByColumns[1],...
1350     * @param intermediateOrderByDirectionSavedObject The saved object index for the array of source
1351     * order by directions. That is, the ordering of the i'th order by column in the input is ascending
1352     * if intermediateOrderByDirection[i] is 1, descending if intermediateOrderByDirection[i] is -1.
1353     *
1354     * @return A ResultSet from which the caller can get the INTERSECT or EXCEPT
1355     *
1356     * @exception StandardException Thrown on failure
1357     */

1358    NoPutResultSet getSetOpResultSet( NoPutResultSet leftSource,
1359                                      NoPutResultSet rightSource,
1360                                      Activation activation,
1361                                      int resultSetNumber,
1362                                      long optimizerEstimatedRowCount,
1363                                      double optimizerEstimatedCost,
1364                                      int opType,
1365                                      boolean all,
1366                                      int intermediateOrderByColumnsSavedObject,
1367                                      int intermediateOrderByDirectionSavedObject)
1368        throws StandardException;
1369                                                     
1370                                                     
1371    //
1372
// Misc operations
1373
//
1374

1375
1376
1377    /**
1378     * A last index key result set returns the last row from
1379     * the index in question. It is used as an ajunct to max().
1380     *
1381     * @param activation the activation for this result set,
1382     * which provides the context for the row allocation operation.
1383     * @param resultSetNumber The resultSetNumber for the ResultSet
1384     * @param resultRowAllocator a reference to a method in the activation
1385     * that creates a holder for the result row of the scan. May
1386     * be a partial row. <verbatim>
1387     * ExecRow rowAllocator() throws StandardException; </verbatim>
1388     * @param conglomId the conglomerate of the table to be scanned.
1389     * @param tableName The full name of the table
1390     * @param userSuppliedOptimizerOverrides Overrides specified by the user on the sql
1391     * @param indexName The name of the index, if one used to access table.
1392     * @param colRefItem An saved item for a bitSet of columns that
1393     * are referenced in the underlying table. -1 if
1394     * no item.
1395     * @param lockMode The lock granularity to use (see
1396     * TransactionController in access)
1397     * @param tableLocked Whether or not the table is marked as using table locking
1398     * (in sys.systables)
1399     * @param isolationLevel Isolation level (specified or not) to use on scans
1400     * @param optimizerEstimatedRowCount Estimated total # of rows by
1401     * optimizer
1402     * @param optimizerEstimatedCost Estimated total cost by optimizer
1403     *
1404     * @return the scan operation as a result set.
1405     *
1406     * @exception StandardException thrown when unable to create the
1407     * result set
1408     */

1409    NoPutResultSet getLastIndexKeyResultSet
1410    (
1411        Activation activation,
1412        int resultSetNumber,
1413        GeneratedMethod resultRowAllocator,
1414        long conglomId,
1415        String JavaDoc tableName,
1416        String JavaDoc userSuppliedOptimizerOverrides,
1417        String JavaDoc indexName,
1418        int colRefItem,
1419        int lockMode,
1420        boolean tableLocked,
1421        int isolationLevel,
1422        double optimizerEstimatedRowCount,
1423        double optimizerEstimatedCost
1424    ) throws StandardException;
1425
1426
1427    /**
1428        A Dependent table scan result set forms a result set on a scan
1429        of a dependent table for the rows that got materilized
1430        on the scan of its parent table and if the row being deleted
1431        on parent table has a reference in the dependent table.
1432
1433        @param activation the activation for this result set,
1434            which provides the context for the row allocation operation.
1435        @param conglomId the conglomerate of the table to be scanned.
1436        @param scociItem The saved item for the static conglomerate info.
1437        @param resultRowAllocator a reference to a method in the activation
1438            that creates a holder for the result row of the scan. May
1439            be a partial row.
1440            <verbatim>
1441                ExecRow rowAllocator() throws StandardException;
1442            </verbatim>
1443        @param resultSetNumber The resultSetNumber for the ResultSet
1444        @param startKeyGetter a reference to a method in the activation
1445            that gets the start key indexable row for the scan. Null
1446            means there is no start key.
1447            <verbatim>
1448                ExecIndexRow startKeyGetter() throws StandardException;
1449            </verbatim>
1450        @param startSearchOperator The start search operator for opening
1451            the scan
1452        @param stopKeyGetter a reference to a method in the activation
1453            that gets the stop key indexable row for the scan. Null means
1454            there is no stop key.
1455            <verbatim>
1456                ExecIndexRow stopKeyGetter() throws StandardException;
1457            </verbatim>
1458        @param stopSearchOperator The stop search operator for opening
1459            the scan
1460        @param sameStartStopPosition Re-use the startKeyGetter for the stopKeyGetter
1461                                        (Exact match search.)
1462        @param qualifiers the array of Qualifiers for the scan.
1463            Null or an array length of zero means there are no qualifiers.
1464        @param tableName The full name of the table
1465        @param userSuppliedOptimizerOverrides Overrides specified by the user on the sql
1466        @param indexName The name of the index, if one used to access table.
1467        @param isConstraint If index, if used, is a backing index for a constraint.
1468        @param forUpdate True means open for update
1469        @param colRefItem An saved item for a bitSet of columns that
1470                                are referenced in the underlying table. -1 if
1471                                no item.
1472        @param lockMode The lock granularity to use (see
1473                                TransactionController in access)
1474        @param tableLocked Whether or not the table is marked as using table locking
1475                                (in sys.systables)
1476        @param isolationLevel Isolation level (specified or not) to use on scans
1477        @param oneRowScan Whether or not this is a 1 row scan.
1478        @param optimizerEstimatedRowCount Estimated total # of rows by
1479                                            optimizer
1480        @param optimizerEstimatedCost Estimated total cost by optimizer
1481        @param parentResultSetId Id to access the materlized temporary result
1482                                  set from the refence stored in the activation.
1483        @param fkIndexConglomId foreign key index conglomerate id.
1484        @param fkColArrayItem saved column array object that matches the foreign key index
1485                               columns and the resultset from the parent table.
1486        @param rltItem row location template
1487
1488        @return the table scan operation as a result set.
1489        @exception StandardException thrown when unable to create the
1490            result set
1491     */

1492    public NoPutResultSet getRaDependentTableScanResultSet(
1493                                    Activation activation,
1494                                    long conglomId,
1495                                    int scociItem,
1496                                    GeneratedMethod resultRowAllocator,
1497                                    int resultSetNumber,
1498                                    GeneratedMethod startKeyGetter,
1499                                    int startSearchOperator,
1500                                    GeneratedMethod stopKeyGetter,
1501                                    int stopSearchOperator,
1502                                    boolean sameStartStopPosition,
1503                                    Qualifier[][] qualifiers,
1504                                    String JavaDoc tableName,
1505                                    String JavaDoc userSuppliedOptimizerOverrides,
1506                                    String JavaDoc indexName,
1507                                    boolean isConstraint,
1508                                    boolean forUpdate,
1509                                    int colRefItem,
1510                                    int indexColItem,
1511                                    int lockMode,
1512                                    boolean tableLocked,
1513                                    int isolationLevel,
1514                                    boolean oneRowScan,
1515                                    double optimizerEstimatedRowCount,
1516                                    double optimizerEstimatedCost,
1517                                    String JavaDoc parentResultSetId,
1518                                    long fkIndexConglomId,
1519                                    int fkColArrayItem,
1520                                    int rltItem)
1521        throws StandardException;
1522}
1523
Popular Tags