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 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.
  Apiviz
    `CDOID` oneway - - source, `CDOID` oneway - - target

- - ### Field Summary

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

      `NO_INDEX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CDOIDReference(CDODataInput in)`
    `CDOIDReference(CDOID targetID, CDOID sourceID, EStructuralFeature sourceFeature, int sourceIndex)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `EStructuralFeature` | `getSourceFeature()` Returns the source `EReference` or the source `EAttribute` if the source feature is a `FeatureMap`.
    `int` | `getSourceIndex()`
    `CDOID` | `getSourceObject()`
    `CDOID` | `getTargetObject()`
    `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,
                                EStructuralFeature sourceFeature,
                                int sourceIndex)

    - #### CDOIDReference

          public CDOIDReference(CDODataInput in)
                         throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### write

          public void write(CDODataOutput out)
                     throws IOException

      Throws:
        `IOException`

    - #### getTargetObject

          public CDOID getTargetObject()

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

    - #### getSourceObject

          public CDOID getSourceObject()

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

    - #### getSourceFeature

          public EStructuralFeature getSourceFeature()

      Description copied from interface: `CDOReference`
      Returns the source `EReference` or the source `EAttribute` if the source feature is a `FeatureMap`.
      Specified by:
        `getSourceFeature` in interface `CDOReference<CDOID>`

    - #### getSourceIndex

          public int getSourceIndex()

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html