--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.iapi.services.uuid.UUIDFactory\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.iapi.services.uuid;\r
+\r
+import org.apache.derby.catalog.UUID;\r
+\r
+/*\r
+ Internal comment (not for user documentation):\r
+ Although this is an abstract interface, I believe that the\r
+ underlying implementation of UUID will have to be DCE UUID.\r
+ This is because the string versions of UUIDs get stored in\r
+ the source code. In other words, no matter what implementation\r
+ is used for UUIDs, strings that look like this\r
+ <blockquote><pre>\r
+ E4900B90-DA0E-11d0-BAFE-0060973F0942\r
+ </blockquote></pre>\r
+ will always have to be turned into universally unique objects\r
+ by the recreateUUID method\r
+ */\r
+/**\r
+ \r
+ Generates and recreates unique identifiers.\r
+ \r
+ An example of such an identifier is:\r
+ <blockquote><pre>\r
+ E4900B90-DA0E-11d0-BAFE-0060973F0942\r
+ </blockquote></pre>\r
+ These resemble DCE UUIDs, but use a different implementation.\r
+ <P>\r
+ The string format is designed to be the same as the string\r
+ format produced by Microsoft's UUIDGEN program, although at\r
+ present the bit fields are probably not the same.\r
+ \r
+ **/\r
+public interface UUIDFactory \r
+{\r
+ /**\r
+ Create a new UUID. The resulting object is guaranteed\r
+ to be unique "across space and time".\r
+ @return The UUID.\r
+ **/\r
+ public UUID createUUID();\r
+\r
+ /**\r
+ Recreate a UUID from a string produced by UUID.toString.\r
+ @return The UUID.\r
+ **/\r
+ public UUID recreateUUID(String uuidstring);\r
+\r
+ /**\r
+ Recreate a UUID from a byte array produced by UUID.toByteArray.\r
+ @return The UUID.\r
+ @see UUID#toByteArray\r
+ **/\r
+ public UUID recreateUUID(byte[] b);\r
+}\r
+\r