org.eclipse.emf.cdo.common.id
Class CDOIDUtil

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

public final class CDOIDUtil
extends Object

Various static methods that may help with CDO IDs.

Since:
2.0
Author:
Eike Stepper

Method Summary
static AbstractCDOID createCDOIDObject(CDOID.ObjectType subType)
          Creates the correct implementation class for the passed CDOID.ObjectType.
static CDOIDExternal createExternal(String uri)
           
static CDOIDAndBranch createIDAndBranch(CDOID id, CDOBranch branch)
           
static CDOIDAndVersion createIDAndVersion(CDOIDAndVersion source)
           
static CDOIDAndVersion createIDAndVersion(CDOID id, int version)
           
static CDOID createLong(long value)
           
static CDOID createLongWithClassifier(CDOClassifierRef classifierRef, long value)
           
static CDOID createString(String value)
           
static CDOID createStringWithClassifier(CDOClassifierRef classifierRef, String value)
           
static CDOIDTemp createTempObject(int value)
           
static CDOIDExternal createTempObjectExternal(String uri)
           
static boolean equals(CDOID id1, CDOID id2)
           
static CDOClassifierRef getClassifierRef(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 void write(StringBuilder builder, CDOID id)
          Format of the uri fragment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isNull

public static boolean isNull(CDOID id)
Since:
2.0

getLong

public static long getLong(CDOID id)

getString

public static String getString(CDOID id)
Since:
4.0

getClassifierRef

public static CDOClassifierRef getClassifierRef(CDOID id)
Since:
3.0

createTempObject

public static CDOIDTemp createTempObject(int value)

createTempObjectExternal

public static CDOIDExternal createTempObjectExternal(String uri)
Since:
3.0

createLong

public static CDOID createLong(long value)

createLongWithClassifier

public static CDOID createLongWithClassifier(CDOClassifierRef classifierRef,
                                             long value)
Since:
3.0

createString

public static CDOID createString(String value)
Since:
4.0

createStringWithClassifier

public static CDOID createStringWithClassifier(CDOClassifierRef classifierRef,
                                               String value)
Since:
3.0

createExternal

public static CDOIDExternal createExternal(String uri)
Since:
2.0

createIDAndVersion

public static CDOIDAndVersion createIDAndVersion(CDOID id,
                                                 int version)
Since:
4.0

createIDAndVersion

public static CDOIDAndVersion createIDAndVersion(CDOIDAndVersion source)
Since:
4.0

createIDAndBranch

public static CDOIDAndBranch createIDAndBranch(CDOID id,
                                               CDOBranch branch)
Since:
4.0

createCDOIDObject

public static AbstractCDOID createCDOIDObject(CDOID.ObjectType subType)
Creates the correct implementation class for the passed CDOID.ObjectType.

Parameters:
subType - the subType for which to create an empty CDOID instance
Returns:
the instance of CDOIDObject which represents the subtype.
Since:
3.0

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>

Since:
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>

Since:
3.0

equals

public static boolean equals(CDOID id1,
                             CDOID id2)
Since:
2.0


Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.