Package org.eclipse.emf.cdo.common.id

# Klasse CDOIDUtil

java.lang.Object
org.eclipse.emf.cdo.common.id.CDOIDUtil

public final class CDOIDUtil extends Object
Various static methods that may help with CDO `IDs`.

Seit:
  2.0
Autor:
  Eike Stepper

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`static AbstractCDOID`
`createCDOIDObject(CDOID.ObjectType subType)`
Veraltet.
As of 4.2 no longer supported.
`static CDOIDExternal`
`createExternal(String uri)`
`static CDOIDAndBranch`
`createIDAndBranch(CDOID id, CDOBranch branch)`
`static CDOIDAndVersion`
`createIDAndVersion(CDOID id, int version)`
`static CDOIDAndVersion`
`createIDAndVersion(CDOIDAndVersion source)`
`static CDOID`
`createLong(long value)`
`static CDOID`
`createLongWithClassifier(long value, CDOClassifierRef classifierRef)`
`static CDOID`
`createLongWithClassifier(CDOClassifierRef classifierRef, long value)`
Veraltet.
As of 4.2 use `createLongWithClassifier(long, CDOClassifierRef)`.
`static <V> Map<CDOID,V>`
`createMap()`
`static <V> Map<CDOID,V>`
`createMap(Map<? extends CDOID,? extends V> map)`
`static CDOID`
`createString(String value)`
`static CDOID`
`createStringWithClassifier(String value, CDOClassifierRef classifierRef)`
`static CDOID`
`createStringWithClassifier(CDOClassifierRef classifierRef, String value)`
Veraltet.
As of 4.2 use `createStringWithClassifier(String, CDOClassifierRef)`.
`static CDOIDTemp`
`createTempObject(int value)`
`static CDOIDExternal`
`createTempObjectExternal(String uri)`
`static CDOID`
`createUUID()`
`static CDOID`
`createUUID(byte[] value)`
`static byte[]`
`decodeUUID(String string)`
`static String`
`encodeUUID(byte[] bytes)`
`static boolean`
`equals(CDOID id1, CDOID id2)`
`static byte[]`
`getByteArray(CDOID id)`
`static CDOID`
`getCDOID(Object object)`
`static CDOClassifierRef`
`getClassifierRef(CDOID id)`
`static <K extends CDOIDAndVersion>
K`
`getKey(Collection<? extends CDOIDAndVersion> keys, CDOID id)`
`static long`
`getLong(CDOID id)`
`static String`
`getString(CDOID id)`
`static boolean`
`isNull(CDOID id)`
`static CDOID`
`read(String uriFragment)`
Format of the URI fragment.
`static CDOID`
`read(CDODataInput in)`
`static CDOID`
`read(org.eclipse.net4j.util.io.ExtendedDataInput in)`
Veraltet.
As of 4.2 use `read(CDODataInput)`.
`static void`
`write(StringBuilder builder, Iterable<?> objects)`
`static void`
`write(StringBuilder builder, CDOID id)`
Format of the uri fragment.
`static void`
`write(CDODataOutput out, CDOID id)`
`static void`
`write(org.eclipse.net4j.util.io.ExtendedDataOutput out, CDOID id)`
Veraltet.
As of 4.2 use `write(CDODataOutput, CDOID)`.

### Von Klasse geerbte Methoden java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Methodendetails

### createMap

public static <V> Map<CDOID,V> createMap()

Seit:
  4.2

### createMap

public static <V> Map<CDOID,V> createMap(Map<? extends CDOID,? extends V> map)

Seit:
  4.5

### createIDAndVersion

public static CDOIDAndVersion createIDAndVersion(CDOID id, int version)

Seit:
  4.0

### createIDAndVersion

public static CDOIDAndVersion createIDAndVersion(CDOIDAndVersion source)

Seit:
  4.0

### createIDAndBranch

public static CDOIDAndBranch createIDAndBranch(CDOID id, CDOBranch branch)

Seit:
  4.0

### getCDOID

public static CDOID getCDOID(Object object)

Seit:
  4.2

### isNull

public static boolean isNull(CDOID id)

Seit:
  2.0

### getLong

public static long getLong(CDOID id)

### getString

public static String getString(CDOID id)

Seit:
  4.0

### getByteArray

public static byte[] getByteArray(CDOID id)

Seit:
  4.1

### getClassifierRef

public static CDOClassifierRef getClassifierRef(CDOID id)

Seit:
  3.0

### createTempObject

public static CDOIDTemp createTempObject(int value)

### createTempObjectExternal

public static CDOIDExternal createTempObjectExternal(String uri)

Seit:
  3.0

### createLong

public static CDOID createLong(long value)

### createLongWithClassifier

public static CDOID createLongWithClassifier(long value, CDOClassifierRef classifierRef)

Seit:
  4.2

### createString

public static CDOID createString(String value)

Seit:
  4.0

### createStringWithClassifier

public static CDOID createStringWithClassifier(String value, CDOClassifierRef classifierRef)

Seit:
  4.2

### createUUID

public static CDOID createUUID(byte[] value)

Seit:
  4.1

### createUUID

public static CDOID createUUID()

Seit:
  4.1

### encodeUUID

public static String encodeUUID(byte[] bytes)

Seit:
  4.1

### decodeUUID

public static byte[] decodeUUID(String string)

Seit:
  4.1

### createExternal

public static CDOIDExternal createExternal(String uri)

Seit:
  2.0

### write

public static void write(StringBuilder builder, Iterable<?> objects)

Seit:
  4.5

### write

public static void write(StringBuilder builder, CDOID id)
Format of the uri fragment.

Non-legacy: `<ID TYPE>/<CUSTOM STRING FROM OBJECT FACTORY>`

Legacy: `<ID TYPE>/<PACKAGE URI>/<CLASSIFIER ID>/<CUSTOM STRING FROM OBJECT FACTORY>`

Seit:
  2.0

### read

public static CDOID read(String uriFragment)
Format of the URI fragment.

Non-legacy: `<ID TYPE>/<CUSTOM STRING FROM OBJECT FACTORY>`

Legacy: `<ID TYPE>/<PACKAGE URI>/<CLASSIFIER ID>/<CUSTOM STRING FROM OBJECT FACTORY>`

Seit:
  3.0

### write

public static void write(CDODataOutput out, CDOID id) throws IOException

Löst aus:
  `IOException`
Seit:
  4.2

### read

public static CDOID read(CDODataInput in) throws IOException

Löst aus:
  `IOException`
Seit:
  4.2

### equals

public static boolean equals(CDOID id1, CDOID id2)

Seit:
  2.0

### getKey

public static <K extends CDOIDAndVersion> K getKey(Collection<? extends CDOIDAndVersion> keys, CDOID id)

Seit:
  4.26

### createLongWithClassifier

@Deprecated public static CDOID createLongWithClassifier(CDOClassifierRef classifierRef, long value)
Veraltet.
As of 4.2 use `createLongWithClassifier(long, CDOClassifierRef)`.

Seit:
  3.0

### createStringWithClassifier

@Deprecated public static CDOID createStringWithClassifier(CDOClassifierRef classifierRef, String value)
Veraltet.
As of 4.2 use `createStringWithClassifier(String, CDOClassifierRef)`.

Seit:
  3.0

### createCDOIDObject

@Deprecated public static AbstractCDOID createCDOIDObject(CDOID.ObjectType subType)
Veraltet.
As of 4.2 no longer supported. IDs can't be created without a value anymore.
Creates the correct implementation class for the passed `CDOID.ObjectType`.

Parameter:
  `subType` - the subType for which to create an empty CDOID instance
Gibt zurück:
  the instance of CDOIDObject which represents the subtype.
Seit:
  3.0

### write

@Deprecated public static void write(org.eclipse.net4j.util.io.ExtendedDataOutput out, CDOID id) throws IOException
Veraltet.
As of 4.2 use `write(CDODataOutput, CDOID)`.

Löst aus:
  `IOException`
Seit:
  4.1

### read

@Deprecated public static CDOID read(org.eclipse.net4j.util.io.ExtendedDataInput in) throws IOException
Veraltet.
As of 4.2 use `read(CDODataInput)`.

Löst aus:
  `IOException`
Seit:
  4.1