Class 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.
Since:
2.0
Author:
Eike Stepper
  • Method Details

    • createMap

      public static <V> Map<CDOID,V> createMap()
      Since:
      4.2
    • createMap

      public static <V> Map<CDOID,V> createMap(Map<? extends CDOID,? extends V> map)
      Since:
      4.5
    • 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
    • getCDOID

      public static CDOID getCDOID(Object object)
      Since:
      4.2
    • 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
    • getByteArray

      public static byte[] getByteArray(CDOID id)
      Since:
      4.1
    • 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(long value, CDOClassifierRef classifierRef)
      Since:
      4.2
    • createString

      public static CDOID createString(String value)
      Since:
      4.0
    • createStringWithClassifier

      public static CDOID createStringWithClassifier(String value, CDOClassifierRef classifierRef)
      Since:
      4.2
    • createUUID

      public static CDOID createUUID(byte[] value)
      Since:
      4.1
    • createUUID

      public static CDOID createUUID()
      Since:
      4.1
    • encodeUUID

      public static String encodeUUID(byte[] bytes)
      Since:
      4.1
    • decodeUUID

      public static byte[] decodeUUID(String string)
      Since:
      4.1
    • createExternal

      public static CDOIDExternal createExternal(String uri)
      Since:
      2.0
    • write

      public static void write(StringBuilder builder, Iterable<?> objects)
      Since:
      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>

      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
    • write

      public static void write(CDODataOutput out, CDOID id) throws IOException
      Throws:
      IOException
      Since:
      4.2
    • read

      public static CDOID read(CDODataInput in) throws IOException
      Throws:
      IOException
      Since:
      4.2
    • equals

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

      @Deprecated public static CDOID createLongWithClassifier(CDOClassifierRef classifierRef, long value)
      Since:
      3.0
    • createStringWithClassifier

      @Deprecated public static CDOID createStringWithClassifier(CDOClassifierRef classifierRef, String value)
      Since:
      3.0
    • createCDOIDObject

      @Deprecated public static AbstractCDOID createCDOIDObject(CDOID.ObjectType subType)
      Deprecated.
      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.
      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

      @Deprecated public static void write(org.eclipse.net4j.util.io.ExtendedDataOutput out, CDOID id) throws IOException
      Deprecated.
      Throws:
      IOException
      Since:
      4.1
    • read

      @Deprecated public static CDOID read(org.eclipse.net4j.util.io.ExtendedDataInput in) throws IOException
      Deprecated.
      As of 4.2 use read(CDODataInput).
      Throws:
      IOException
      Since:
      4.1