KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > sql99 > dql > iterator > order > MemoryIndexIteratorForSubQuery


1 package com.daffodilwoods.daffodildb.server.sql99.dql.iterator.order;
2
3 import com.daffodilwoods.daffodildb.server.sql99.dql.iterator._Iterator;
4 import com.daffodilwoods.daffodildb.server.sql99.dql.queryexpression.orderbyclause._ExpressionOrderValues;
5 import com.daffodilwoods.database.resource.DException;
6
7 /**
8     Title : MemoryIndexIterator
9     This class comes into picture when select list contains subQuery as selectList which is used
10     in ORDER BY clause.It uses all methods of its SuperClass. It just only override the
11     navigation methods. Since there was a requirement to allignment of the underLying Iterator.
12     Only for this reason this class come into existance.
13      @author Sandeep Kadiyan
14      @see MemoryIndexIterator
15      @since version 4.0
16  */

17 public class MemoryIndexIteratorForSubQuery
18     extends MemoryIndexIterator {
19
20
21   public MemoryIndexIteratorForSubQuery(_Iterator iterator0,
22                                         _ExpressionOrderValues order0) throws
23       DException {
24     super(iterator0, order0);
25   }
26
27   public boolean first() throws DException {
28     if (super.first()) {
29       allignUnderLineIterator();
30       return true;
31     }
32     return false;
33   }
34
35   public boolean next() throws DException {
36     if (super.next()) {
37       allignUnderLineIterator();
38       return true;
39     }
40     return false;
41
42   }
43
44   public boolean previous() throws DException {
45     if (super.previous()) {
46       allignUnderLineIterator();
47       return true;
48     }
49     return false;
50
51   }
52
53   public boolean last() throws DException {
54     if (super.last()) {
55       allignUnderLineIterator();
56       return true;
57     }
58     return false;
59
60   }
61
62 }
63
Popular Tags