001: /*
002:
003: Derby - Class org.apache.derby.impl.sql.execute.rts.RealCurrentOfStatistics
004:
005: Licensed to the Apache Software Foundation (ASF) under one or more
006: contributor license agreements. See the NOTICE file distributed with
007: this work for additional information regarding copyright ownership.
008: The ASF licenses this file to you under the Apache License, Version 2.0
009: (the "License"); you may not use this file except in compliance with
010: the License. You may obtain a copy of the License at
011:
012: http://www.apache.org/licenses/LICENSE-2.0
013:
014: Unless required by applicable law or agreed to in writing, software
015: distributed under the License is distributed on an "AS IS" BASIS,
016: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: See the License for the specific language governing permissions and
018: limitations under the License.
019:
020: */
021:
022: package org.apache.derby.impl.sql.execute.rts;
023:
024: import org.apache.derby.iapi.services.io.StoredFormatIds;
025:
026: import org.apache.derby.iapi.services.i18n.MessageService;
027: import org.apache.derby.iapi.reference.SQLState;
028: import java.io.ObjectOutput;
029: import java.io.ObjectInput;
030: import java.io.IOException;
031:
032: /**
033: ResultSetStatistics implemenation for CurrentOfResultSet.
034:
035: @author jerry
036:
037: */
038: public class RealCurrentOfStatistics extends
039: RealNoPutResultSetStatistics {
040:
041: /* Leave these fields public for object inspectors */
042:
043: // CONSTRUCTORS
044: /**
045: *
046: *
047: */
048: public RealCurrentOfStatistics(int numOpens, int rowsSeen,
049: int rowsFiltered, long constructorTime, long openTime,
050: long nextTime, long closeTime, int resultSetNumber) {
051: super (numOpens, rowsSeen, rowsFiltered, constructorTime,
052: openTime, nextTime, closeTime, resultSetNumber, 0.0d,
053: 0.0d);
054: }
055:
056: // ResultSetStatistics interface
057:
058: /**
059: * Return the statement execution plan as a String.
060: *
061: * @param depth Indentation level.
062: *
063: * @return String The statement execution plan as a String.
064: */
065: public String getStatementExecutionPlanText(int depth) {
066: initFormatInfo(depth);
067:
068: return indent
069: + MessageService.getTextMessage(SQLState.RTS_NOT_IMPL,
070: "getStatementExecutionPlanText",
071: "CurrentOfResultSet\n");
072:
073: }
074:
075: /**
076: * Return information on the scan nodes from the statement execution
077: * plan as a String.
078: *
079: * @param depth Indentation level.
080: *
081: * @return String The information on the scan nodes from the
082: * statement execution plan as a String.
083: */
084: public String getScanStatisticsText(String tableName, int depth) {
085: return indent
086: + MessageService
087: .getTextMessage(SQLState.RTS_NOT_IMPL,
088: "getScanStatisticsText",
089: "CurrentOfResultSet\n");
090: }
091:
092: // Class implementation
093:
094: public String toString() {
095: return getStatementExecutionPlanText(0);
096: }
097:
098: /**
099: * Format for display, a name for this node.
100: *
101: */
102: public String getNodeName() {
103: // NOTE: Not internationalizing because "CURRENT OF" are keywords.
104: return "Current Of";
105: }
106: }
|