org.apache.ode.daohib.bpel

## Class ScopeDaoImpl

- java.lang.Object
- - org.apache.ode.daohib.bpel.HibernateDao
  - - org.apache.ode.daohib.bpel.ScopeDaoImpl

- All Implemented Interfaces:
    ScopeDAO

      public class ScopeDaoImpl
      extends HibernateDao
      implements ScopeDAO

  Hibernate-based `ScopeDAO` implementation.

- - ### Field Summary

    - ### Fields inherited from class org.apache.ode.daohib.bpel.HibernateDao

      `_hobj, _sm`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScopeDaoImpl(SessionManager sm, HScope scope)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PartnerLinkDAO` | `createPartnerLink(int modelId, java.lang.String pLinkName, java.lang.String myRole, java.lang.String partnerRole)` Create a storage space for partner link values for the scope.
    `java.util.Collection<ScopeDAO>` | `getChildScopes()`
    `CorrelationSetDAO` | `getCorrelationSet(java.lang.String corrSetName)` Get a correlation set by name.
    `java.util.Set<CorrelationSetDAO>` | `getCorrelationSets()` Gets all correlation sets for this scope
    `int` | `getModelId()` Get the scope model id from the object
    `java.lang.String` | `getName()` Get scope name (from the definition / or auto-generated).
    `ScopeDAO` | `getParentScope()` Get the parent scope.
    `PartnerLinkDAO` | `getPartnerLink(int plinkId)` Get the parnter link storage object associated with this scope instance and the provided partner link model id.
    `java.util.Collection<PartnerLinkDAO>` | `getPartnerLinks()` Get all partner link storage object associated with this scope instance.
    `ProcessInstanceDAO` | `getProcessInstance()` Get the process instance to which this scope belongs.
    `java.lang.Long` | `getScopeInstanceId()` Get the unique identifier for this scope instance.
    `ScopeStateEnum` | `getState()` Get current state of the scope.
    `XmlDataDAO` | `getVariable(java.lang.String varName)` Get a variable by name.
    `java.util.Collection<XmlDataDAO>` | `getVariables()` Get a colleciton of all the variables belonging to this scope.
    `java.util.List<BpelEvent>` | `listEvents()` Get an ordered list of events associated with this scope.
    `void` | `setState(ScopeStateEnum state)` Set current state of the scope.

    - ### Methods inherited from class org.apache.ode.daohib.bpel.HibernateDao

      `deleteByColumn, deleteByIds, equals, getDHandle, getHibernateObj, getId, getSession, hashCode, update`

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

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

- - ### Constructor Detail

    - #### ScopeDaoImpl

          public ScopeDaoImpl(SessionManager sm,
                              HScope scope)

  - ### Method Detail

    - #### getCorrelationSet

          public CorrelationSetDAO getCorrelationSet(java.lang.String corrSetName)

      Description copied from interface: `ScopeDAO`
      Get a correlation set by name.
      Specified by:
        `getCorrelationSet` in interface `ScopeDAO`
      Parameters:
        `corrSetName` - correlation set name
      Returns:
        correlation set instance
      See Also:
        `ScopeDAO.getCorrelationSet(java.lang.String)`

    - #### getParentScope

          public ScopeDAO getParentScope()

      Description copied from interface: `ScopeDAO`
      Get the parent scope.
      Specified by:
        `getParentScope` in interface `ScopeDAO`
      Returns:
        parent scope
      See Also:
        `ScopeDAO.getParentScope()`

    - #### getProcessInstance

          public ProcessInstanceDAO getProcessInstance()

      Description copied from interface: `ScopeDAO`
      Get the process instance to which this scope belongs.
      Specified by:
        `getProcessInstance` in interface `ScopeDAO`
      Returns:
        owner `ProcessInstanceDAO`
      See Also:
        `ScopeDAO.getProcessInstance()`

    - #### setState

          public void setState(ScopeStateEnum state)

      Description copied from interface: `ScopeDAO`
      Set current state of the scope.
      Specified by:
        `setState` in interface `ScopeDAO`
      Parameters:
        `state` - new scope state
      See Also:
        `ScopeDAO.setState(org.apache.ode.bpel.dao.ScopeStateEnum)`

    - #### getState

          public ScopeStateEnum getState()

      Description copied from interface: `ScopeDAO`
      Get current state of the scope.
      Specified by:
        `getState` in interface `ScopeDAO`
      Returns:
        current scope state
      See Also:
        `ScopeDAO.getState()`

    - #### getName

          public java.lang.String getName()

      Description copied from interface: `ScopeDAO`
      Get scope name (from the definition / or auto-generated). NOTE: the scope names are not necessarily unique.
      Specified by:
        `getName` in interface `ScopeDAO`
      Returns:
        scope name
      See Also:
        `ScopeDAO.getName()`

    - #### getVariable

          public XmlDataDAO getVariable(java.lang.String varName)

      Description copied from interface: `ScopeDAO`
      Get a variable by name.
      Specified by:
        `getVariable` in interface `ScopeDAO`
      Parameters:
        `varName` - variable name
      Returns:
        `XmlDataDAO` object representing the requested variable
      See Also:
        `ScopeDAO.getVariable(java.lang.String)`

    - #### createPartnerLink

          public PartnerLinkDAO createPartnerLink(int modelId,
                                                  java.lang.String pLinkName,
                                                  java.lang.String myRole,
                                                  java.lang.String partnerRole)

      Description copied from interface: `ScopeDAO`
      Create a storage space for partner link values for the scope.
      Specified by:
        `createPartnerLink` in interface `ScopeDAO`
      Parameters:
        `modelId` - partner link model id
        `pLinkName` - partner link name
      Returns:
        `PartnerLinkDAO` object representing the created endpoint reference

    - #### getPartnerLink

          public PartnerLinkDAO getPartnerLink(int plinkId)

      Description copied from interface: `ScopeDAO`
      Get the parnter link storage object associated with this scope instance and the provided partner link model id.
      Specified by:
        `getPartnerLink` in interface `ScopeDAO`
      Parameters:
        `plinkId` - partner link model id
      Returns:
        `PartnerLinkDAO` object representing the requested endpoint reference

    - #### getPartnerLinks

          public java.util.Collection<PartnerLinkDAO> getPartnerLinks()

      Description copied from interface: `ScopeDAO`
      Get all partner link storage object associated with this scope instance.
      Specified by:
        `getPartnerLinks` in interface `ScopeDAO`
      Returns:
        List of `PartnerLinkDAO` objects

    - #### getScopeInstanceId

          public java.lang.Long getScopeInstanceId()

      Description copied from interface: `ScopeDAO`
      Get the unique identifier for this scope instance.
      Specified by:
        `getScopeInstanceId` in interface `ScopeDAO`
      Returns:
        scope instance id
      See Also:
        `ScopeDAO.getScopeInstanceId()`

    - #### getModelId

          public int getModelId()

      Description copied from interface: `ScopeDAO`
      Get the scope model id from the object
      Specified by:
        `getModelId` in interface `ScopeDAO`
      Returns:
        scope model id
      See Also:
        `ScopeDAO.getModelId()`

    - #### getCorrelationSets

          public java.util.Set<CorrelationSetDAO> getCorrelationSets()

      Description copied from interface: `ScopeDAO`
      Gets all correlation sets for this scope
      Specified by:
        `getCorrelationSets` in interface `ScopeDAO`
      Returns:
        correlation set instances

    - #### getChildScopes

          public java.util.Collection<ScopeDAO> getChildScopes()

      Specified by:
        `getChildScopes` in interface `ScopeDAO`

    - #### getVariables

          public java.util.Collection<XmlDataDAO> getVariables()

      Description copied from interface: `ScopeDAO`
      Get a colleciton of all the variables belonging to this scope.
      Specified by:
        `getVariables` in interface `ScopeDAO`
      Returns:
        collection of variables

    - #### listEvents

          public java.util.List<BpelEvent> listEvents()

      Description copied from interface: `ScopeDAO`
      Get an ordered list of events associated with this scope.
      Specified by:
        `listEvents` in interface `ScopeDAO`
      Returns:
        collection of bpel events.