Class Hierarchy    Previous  Next  Index

Interface COM.cloudscape.types.UUID


public interface UUID
extends java.io.Externalizable
Copyright © 1998-2000, Informix Software, Inc. All rights reserved.

An interface for accessing Cloudscape UUIDs, universally unique identifiers. A Cloudscape UUID is expected to be unique across all Cloudscape databases.

The values in the system catalog held in ID columns with a type of CHAR(36) are the string representations of these UUIDs. CHAR(36) is used in the system catalog since in the current release, Java data types are not indexable.

If you do not need your id column indexed, you can use this type directly for the column type; if you need an index, then you can create UUIDs with this class and store their toString values in indexed CHAR(36) columns.

A UUID implements equals() and hashCode based on value equality.

The toString() method produces a string representation of this UUID which can be passed to UUIDFactory.recreateUUID later on to reconstruct it.


Variable Index

 o UUID_BYTE_LENGTH
UUID_BYTE_LENGTH The number of bytes in the array toByteArray returns.

Method Index

 o cloneMe()
Clone this UUID.
 o getLong(int)
Represent this UUID as 3 longs, numbered 0-2.
 o toANSIidentifier()
Produce a string representation of this UUID which is suitable for use as a unique ANSI identifier.
 o toByteArray()
Produce a byte array representation of this UUID which can be passed to UUIDFactory.recreateUUID later on to reconstruct it.
 o toHexString()
Create a hex string representation of this UUID.

Field Detail

 o UUID_BYTE_LENGTH
public static final int UUID_BYTE_LENGTH
          UUID_BYTE_LENGTH The number of bytes in the array toByteArray returns.

Method Detail

 o toANSIidentifier
public java.lang.String toANSIidentifier()
          Produce a string representation of this UUID which is suitable for use as a unique ANSI identifier.
 o toByteArray
public byte[] toByteArray()
          Produce a byte array representation of this UUID which can be passed to UUIDFactory.recreateUUID later on to reconstruct it.
 o cloneMe
public UUID cloneMe()
          Clone this UUID.
Returns:
a copy of this UUID
 o toHexString
public java.lang.String toHexString()
          Create a hex string representation of this UUID.
 o getLong
public long getLong(int longIndex)
          Represent this UUID as 3 longs, numbered 0-2. Return the ith long.
Parameters:
longIndex - which long to get. numbered 0-2
Returns:
the corresponding long

  Class Hierarchy    Previous  Next  Index