KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > catalog > UUID


1 /*
2
3    Derby - Class org.apache.derby.catalog.UUID
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.catalog;
23
24 /**
25
26  An interface for accessing Cloudscape UUIDs, unique identifiers.
27         
28     <p>The values in the
29     system catalog held in ID columns with a type of CHAR(36) are the
30     string representations of these UUIDs.
31
32     <p>A UUID implements equals() and hashCode based on value equality.
33
34  */

35
36 public interface UUID extends java.io.Externalizable JavaDoc
37 {
38     /**
39       UUID_BYTE_LENGTH
40
41       The number of bytes in the array toByteArray returns.
42       */

43     static int UUID_BYTE_LENGTH = 16;
44     
45     /**
46         Produce a string representation of this UUID which
47         is suitable for use as a unique ANSI identifier.
48      */

49     String JavaDoc toANSIidentifier();
50
51     /**
52         Produce a byte array representation of this UUID
53         which can be passed to UUIDFactory.recreateUUID later
54         on to reconstruct it.
55     */

56     byte[] toByteArray();
57
58     /**
59       Clone this UUID.
60
61       @return a copy of this UUID
62       */

63     UUID cloneMe();
64
65     /**
66       Create a hex string representation of this UUID.
67       */

68     String JavaDoc toHexString();
69 }
70
71
Popular Tags