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

## Class CDOIDReference

- java.lang.Object
- - org.eclipse.emf.cdo.common.id.CDOIDReference

- All Implemented Interfaces:
    `CDOReference<CDOID>`

      public class CDOIDReference
      extends java.lang.Object
      implements CDOReference<CDOID>

  Represents a `CDOID` typed reference from one object to another object.
  Since:
    4.0
  Author:
    Eike Stepper
  No Extend
    This interface is not intended to be extended by clients.
  No Instantiate
    This class is not intended to be instantiated by clients.

- - ### Field Summary

    - ### Fields inherited from interface org.eclipse.emf.cdo.common.id.CDOReference

      `NO_INDEX`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CDOIDReference​(CDOID targetID, CDOID sourceID, org.eclipse.emf.ecore.EStructuralFeature sourceReference, int sourceIndex)` |
    `CDOIDReference​(CDODataInput in)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `org.eclipse.emf.ecore.EStructuralFeature` | `getSourceFeature()` | Deprecated.
    `int` | `getSourceIndex()` |
    `CDOID` | `getSourceObject()` |
    `org.eclipse.emf.ecore.EReference` | `getSourceReference()` | Returns the source `EReference`.
    `CDOID` | `getTargetObject()` |
    `java.lang.String` | `toString()` |
    `void` | `write​(CDODataOutput out)` |

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### CDOIDReference

          public CDOIDReference​(CDOID targetID,
                                CDOID sourceID,
                                org.eclipse.emf.ecore.EStructuralFeature sourceReference,
                                int sourceIndex)

    - #### CDOIDReference

          public CDOIDReference​(CDODataInput in)
                         throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### write

          public void write​(CDODataOutput out)
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getTargetObject

          public CDOID getTargetObject()

      Specified by:
        `getTargetObject` in interface `CDOReference<CDOID>`

    - #### getSourceObject

          public CDOID getSourceObject()

      Specified by:
        `getSourceObject` in interface `CDOReference<CDOID>`

    - #### getSourceFeature

          @Deprecated
          public org.eclipse.emf.ecore.EStructuralFeature getSourceFeature()

      Deprecated.
      Description copied from interface: `CDOReference`
      Returns the source `EReference`.
      Specified by:
        `getSourceFeature` in interface `CDOReference<CDOID>`

    - #### getSourceReference

          public org.eclipse.emf.ecore.EReference getSourceReference()

      Description copied from interface: `CDOReference`
      Returns the source `EReference`.
      Specified by:
        `getSourceReference` in interface `CDOReference<CDOID>`

    - #### getSourceIndex

          public int getSourceIndex()

      Specified by:
        `getSourceIndex` in interface `CDOReference<CDOID>`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`