Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / derby-10.3.2.1 / java / engine / org / apache / derby / impl / sql / execute / rts / RealNoPutResultSetStatistics.java
diff --git a/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/impl/sql/execute/rts/RealNoPutResultSetStatistics.java b/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/impl/sql/execute/rts/RealNoPutResultSetStatistics.java
new file mode 100644 (file)
index 0000000..fe68d3f
--- /dev/null
@@ -0,0 +1,106 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.impl.sql.execute.rts.RealNoPutResultSetStatistics\r
+\r
+   Licensed to the Apache Software Foundation (ASF) under one or more\r
+   contributor license agreements.  See the NOTICE file distributed with\r
+   this work for additional information regarding copyright ownership.\r
+   The ASF licenses this file to you under the Apache License, Version 2.0\r
+   (the "License"); you may not use this file except in compliance with\r
+   the License.  You may obtain a copy of the License at\r
+\r
+      http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.impl.sql.execute.rts;\r
+\r
+import org.apache.derby.iapi.services.io.Formatable;\r
+\r
+import org.apache.derby.iapi.services.io.FormatableHashtable;\r
+\r
+import java.io.ObjectOutput;\r
+import java.io.ObjectInput;\r
+import java.io.IOException;\r
+\r
+/**\r
+  ResultSetStatistics implemenation for NoPutResultSetImpl.\r
+\r
+\r
+*/\r
+abstract class RealNoPutResultSetStatistics \r
+       extends RealBasicNoPutResultSetStatistics\r
+{\r
+       /* Leave these fields public for object inspectors */\r
+       public int resultSetNumber;\r
+\r
+       /* fields used for formating run time statistics output */\r
+       protected String indent;\r
+       protected String subIndent;\r
+       protected int sourceDepth;\r
+\r
+       // CONSTRUCTORS\r
+\r
+       /**\r
+        * \r
+        *\r
+        */\r
+    public     RealNoPutResultSetStatistics(\r
+                                                                               int numOpens,\r
+                                                                               int rowsSeen,\r
+                                                                               int rowsFiltered,\r
+                                                                               long constructorTime,\r
+                                                                               long openTime,\r
+                                                                               long nextTime,\r
+                                                                               long closeTime,\r
+                                                                               int resultSetNumber,\r
+                                                                               double optimizerEstimatedRowCount,\r
+                                                                               double optimizerEstimatedCost\r
+                                                                               )\r
+       {\r
+               super(\r
+                               numOpens,\r
+                               rowsSeen,\r
+                               rowsFiltered,\r
+                               constructorTime,\r
+                               openTime,\r
+                               nextTime,\r
+                               closeTime,\r
+                               optimizerEstimatedRowCount,\r
+                               optimizerEstimatedCost\r
+                               );\r
+\r
+               this.resultSetNumber = resultSetNumber;\r
+       }\r
\r
+       /**\r
+        * Initialize the format info for run time statistics.\r
+        */\r
+       protected void initFormatInfo(int depth)\r
+       {\r
+               char[] indentchars = new char[depth];\r
+               char[] subIndentchars = new char[depth + 1];\r
+               sourceDepth = depth + 1;\r
+\r
+               /*\r
+               ** Form an array of tab characters for indentation.\r
+               */\r
+               subIndentchars[depth] = '\t';\r
+               while (depth > 0)\r
+               {\r
+                       subIndentchars[depth - 1] = '\t';\r
+                       indentchars[depth - 1] = '\t';\r
+                       depth--;\r
+               }\r
+                // convert char[] to String to avoid problems during \r
+                // String concatenation.\r
+                indent = new String(indentchars);\r
+                subIndent = new String(subIndentchars);\r
+       }\r
+}\r