KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > impl > sql > execute > rts > RealCurrentOfStatistics


1 /*
2
3    Derby - Class org.apache.derby.impl.sql.execute.rts.RealCurrentOfStatistics
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.impl.sql.execute.rts;
23
24 import org.apache.derby.iapi.services.io.StoredFormatIds;
25
26 import org.apache.derby.iapi.services.i18n.MessageService;
27 import org.apache.derby.iapi.reference.SQLState;
28 import java.io.ObjectOutput JavaDoc;
29 import java.io.ObjectInput JavaDoc;
30 import java.io.IOException JavaDoc;
31
32 /**
33   ResultSetStatistics implemenation for CurrentOfResultSet.
34
35   @author jerry
36
37 */

38 public class RealCurrentOfStatistics
39     extends RealNoPutResultSetStatistics
40 {
41
42     /* Leave these fields public for object inspectors */
43
44     // CONSTRUCTORS
45

46     /**
47      *
48      *
49      */

50     public RealCurrentOfStatistics(
51                                     int numOpens,
52                                     int rowsSeen,
53                                     int rowsFiltered,
54                                     long constructorTime,
55                                     long openTime,
56                                     long nextTime,
57                                     long closeTime,
58                                     int resultSetNumber
59                                     )
60     {
61         super(
62             numOpens,
63             rowsSeen,
64             rowsFiltered,
65             constructorTime,
66             openTime,
67             nextTime,
68             closeTime,
69             resultSetNumber,
70             0.0d,
71             0.0d
72             );
73     }
74
75     // ResultSetStatistics interface
76

77     /**
78      * Return the statement execution plan as a String.
79      *
80      * @param depth Indentation level.
81      *
82      * @return String The statement execution plan as a String.
83      */

84     public String JavaDoc getStatementExecutionPlanText(int depth)
85     {
86         initFormatInfo(depth);
87
88         return indent +
89             MessageService.getTextMessage(SQLState.RTS_NOT_IMPL,
90                         "getStatementExecutionPlanText", "CurrentOfResultSet\n");
91             
92     }
93
94     /**
95      * Return information on the scan nodes from the statement execution
96      * plan as a String.
97      *
98      * @param depth Indentation level.
99      *
100      * @return String The information on the scan nodes from the
101      * statement execution plan as a String.
102      */

103     public String JavaDoc getScanStatisticsText(String JavaDoc tableName, int depth)
104     {
105         return indent +
106             MessageService.getTextMessage(SQLState.RTS_NOT_IMPL,
107                 "getScanStatisticsText", "CurrentOfResultSet\n");
108     }
109
110     // Class implementation
111

112     public String JavaDoc toString()
113     {
114         return getStatementExecutionPlanText(0);
115     }
116     /**
117    * Format for display, a name for this node.
118      *
119      */

120   public String JavaDoc getNodeName(){
121     // NOTE: Not internationalizing because "CURRENT OF" are keywords.
122
return "Current Of";
123   }
124 }
125
Popular Tags