Package com.orchestranetworks.service.extensions

# Class AdaptationTreeOptimizerSpec_MutualizeCommons

java.lang.Object
com.orchestranetworks.service.extensions.AdaptationTreeOptimizerSpec
com.orchestranetworks.service.extensions.AdaptationTreeOptimizerSpec_MutualizeCommons

public class AdaptationTreeOptimizerSpec_MutualizeCommons extends AdaptationTreeOptimizerSpec
Specifies an optimization that refactors common values in a dataset tree.

The optimization is performed by comparing each value in the specified dataset to the values in its children:

1. Every node is checked; if all children have a common value, this common value is set in their parent, and all child values become `inherited`.
2. The above rule only applies if it does not modify the resolved view of a dataset, if resolved view is activated.

For tables, it compares each child node of each record to the record with the same primary key in the parent node.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AdaptationTreeOptimizerSpec_MutualizeCommons(Adaptation aDataSet, boolean includeAllDescendants)`
  Creates a specification for factoring common values in a dataset tree.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AdaptationTreeOptimizerIterator`
  `createOptimizerIterator(Session aSession)`
  Builds an iterator for dataset tree optimization.

  ### Methods inherited from class com.orchestranetworks.service.extensions.AdaptationTreeOptimizerSpec

  `getAdaptation, isIncludeAllDescendants`

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

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AdaptationTreeOptimizerSpec_MutualizeCommons

    public AdaptationTreeOptimizerSpec_MutualizeCommons(Adaptation aDataSet, boolean includeAllDescendants)
    Creates a specification for factoring common values in a dataset tree.

    If the parameter `includeAllDescendants` is set to `false`, the optimization will only handle the specified dataset and its children.

    Parameters:
      `aDataSet` - top parent to be targeted by the optimization of the dataset tree.
      `includeAllDescendants` - includes all datasets, even children of delegated datasets.

- ## Method Details

  - ### createOptimizerIterator

    public AdaptationTreeOptimizerIterator createOptimizerIterator(Session aSession)
    Description copied from class: `AdaptationTreeOptimizerSpec`
    Builds an iterator for dataset tree optimization.
    Specified by:
      `createOptimizerIterator` in class `AdaptationTreeOptimizerSpec`
    Parameters:
      `aSession` - session for running the optimization.