Package com.orchestranetworks.schema.info

# Interface SelectionLink

All Superinterfaces:
  `SchemaNodeExplicitRelationship`

public interface SelectionLink extends SchemaNodeExplicitRelationship
This interface contains the information for a selection link (`osd:select` property).

Note: From version 5.5.0, it is recommended to use associations instead of selection nodes. Associations provide more features than selection nodes and no more evolutions will be made on selection nodes. The only characteristic on selection nodes that is not supported by associations is the way to display the selection of records as a link.

### Dependencies and Validation

To optimize the validation process of this selection link, dependencies are automatically determined from its definition.

The following explicit dependencies are automatically defined:

1. Dependencies upon the insertion, deletion and modification of the nodes specified by the XPath predicate or of the constraint predicate defined by this selection link. For example, if this selection link defines the predicate `author_id = ${../author_id}`, a dependency on the left side, `author_id` will be defined.

   This dependency is one of the following types, where the argument `SchemaNode` is `${../author_id}`:

   - in the default case,
     `DependenciesDefinitionContext.addDependencyToInsertDeleteAndModify(SchemaNode)`,
   - if this selection link specifies a dataset container,
     `DependenciesDefinitionContext.addDependencyToInsertDeleteAndModifyInOtherInstance(SchemaNode, AdaptationReference)`,
   - if this selection link specifies a dataset container in another dataspace,
     `DependenciesDefinitionContext.addDependencyToInsertDeleteAndModifyInOtherInstance(SchemaNode, AdaptationReference, HomeKey)`.
2. Dependencies upon the modification of the right part `${../author_id}`. For this, the dependency is the same as: `DependenciesDefinitionContext.addDependencyToModify(SchemaNode)`, where `SchemaNode` is `${../author_id}`.

This implies that the validation result of this selection link depends only upon updates of the nodes that have been specified by these explicit dependencies. The validation result will not be affected by any external events except for changes to the local value.

The dependencies of this selection link are set to Unknown if this selection link defines a predicate with nodes that are not in the target table.

Attention:

In EBX® user interface, this selection link is always called when user input is submitted.

See Also:
  - validation
  - `SchemaNode.getSelectionLink()`
  - `ExplicitRelationship`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AdaptationReference`
  `getContainerReference()`
  Returns the reference of the container dataset of this selection link, if an external container is defined in the data model (property `container`), otherwise returns `null`.
  `RequestResult`
  `getSelectionResult(Adaptation aRecord)`
  Returns the result of the selection link, in the context of the specified record.
  `SchemaNode`
  `getTableNode()`
  Returns the table node referred to by this selection link.
  `String`
  `getXPathString()`
  Returns the XPath expression defined in the selection link.

  ### Methods inherited from interface com.orchestranetworks.schema.relationships.SchemaNodeExplicitRelationship

  `getBreadcrumbProperties, getContainerHome, getExplicitRelationship, getExplicitRelationship, getOwnerNode, getResult, getTableNode, isAssociationLink, isDynamic, isSelectionLink, isTableRefLink`

- ## Method Details

  - ### getXPathString

    String getXPathString()
    Returns the XPath expression defined in the selection link.

  - ### getSelectionResult

    RequestResult getSelectionResult(Adaptation aRecord)
    Returns the result of the selection link, in the context of the specified record.
    See Also:
      - `ExplicitRelationship.getResult(Adaptation)`

  - ### getContainerReference

    AdaptationReference getContainerReference()
    Returns the reference of the container dataset of this selection link, if an external container is defined in the data model (property `container`), otherwise returns `null`.
    Specified by:
      `getContainerReference` in interface `SchemaNodeExplicitRelationship`
    Since:
      5.5.0

  - ### getTableNode

    SchemaNode getTableNode()
    Returns the table node referred to by this selection link.
    Specified by:
      `getTableNode` in interface `SchemaNodeExplicitRelationship`
    Since:
      5.5.0
    See Also:
      - `SchemaNode.isTableNode()`