--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.impl.sql.catalog.SYSDUMMY1RowFactory\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.catalog;\r
+\r
+import java.sql.Types;\r
+\r
+import org.apache.derby.iapi.sql.dictionary.SystemColumn;\r
+import org.apache.derby.iapi.sql.dictionary.TupleDescriptor;\r
+import org.apache.derby.iapi.sql.dictionary.DataDictionary;\r
+import org.apache.derby.iapi.sql.dictionary.DataDescriptorGenerator;\r
+import org.apache.derby.iapi.sql.dictionary.CatalogRowFactory;\r
+\r
+import org.apache.derby.iapi.error.StandardException;\r
+\r
+import org.apache.derby.iapi.services.sanity.SanityManager;\r
+import org.apache.derby.iapi.sql.execute.ExecRow;\r
+import org.apache.derby.iapi.sql.execute.ExecIndexRow;\r
+import org.apache.derby.iapi.sql.execute.ExecutionFactory;\r
+import org.apache.derby.iapi.types.DataValueFactory;\r
+import org.apache.derby.iapi.types.RowLocation;\r
+import org.apache.derby.iapi.types.DataValueDescriptor;\r
+import org.apache.derby.iapi.types.SQLChar;\r
+import org.apache.derby.iapi.services.uuid.UUIDFactory;\r
+import org.apache.derby.catalog.UUID;\r
+\r
+/**\r
+ * Factory for creating a SYSDUMMY1 row.\r
+ *\r
+ * @version 0.01\r
+ *\r
+ */\r
+\r
+class SYSDUMMY1RowFactory extends CatalogRowFactory\r
+{\r
+ protected static final int SYSDUMMY1_COLUMN_COUNT = 1;\r
+\r
+ private static final String[] uuids =\r
+ {\r
+ "c013800d-00f8-5b70-bea3-00000019ed88", // catalog UUID\r
+ "c013800d-00f8-5b70-fee8-000000198c88" // heap UUID.\r
+ };\r
+\r
+ /*\r
+ * CONSTRUCTORS\r
+ */\r
+ SYSDUMMY1RowFactory(UUIDFactory uuidf, \r
+ ExecutionFactory ef, \r
+ DataValueFactory dvf)\r
+ {\r
+ super(uuidf,ef,dvf);\r
+ \r
+ initInfo(SYSDUMMY1_COLUMN_COUNT, "SYSDUMMY1", \r
+ null, null, uuids);\r
+ }\r
+\r
+\r
+ /**\r
+ * Make a SYSDUMMY1 row\r
+ *\r
+ *\r
+ * @return Row suitable for inserting into SYSSTATISTICS.\r
+ *\r
+ * @exception StandardException thrown on failure\r
+ */\r
+\r
+ public ExecRow makeRow(TupleDescriptor td, TupleDescriptor parent)\r
+ throws StandardException \r
+ {\r
+ ExecRow row = getExecutionFactory().getValueRow(SYSDUMMY1_COLUMN_COUNT);\r
+ \r
+ row.setColumn(1, new SQLChar("Y"));\r
+ return row;\r
+ }\r
+ \r
+ public TupleDescriptor buildDescriptor(\r
+ ExecRow row,\r
+ TupleDescriptor parentDesc,\r
+ DataDictionary dd)\r
+ throws StandardException\r
+ \r
+ {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Builds a list of columns suitable for creating this Catalog.\r
+ *\r
+ *\r
+ * @return array of SystemColumn suitable for making this catalog.\r
+ */\r
+ public SystemColumn[] buildColumnList()\r
+ { \r
+ return new SystemColumn[] {\r
+ SystemColumnImpl.getColumn("IBMREQD", Types.CHAR, true, 1)\r
+ };\r
+ }\r
+\r
+\r
+} \r