Package org.optaplanner.core.impl.score.stream.drools

## Class DroolsConstraintSession<Solution_,​Score_ extends Score<Score_>>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.drools.DroolsConstraintSession<Solution_,​Score_>

- All Implemented Interfaces:
    `AutoCloseable`, `ConstraintSession<Solution_,​Score_>`

      public class DroolsConstraintSession<Solution_,​Score_ extends Score<Score_>>
      extends Object
      implements ConstraintSession<Solution_,​Score_>

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DroolsConstraintSession​(SolutionDescriptor<Solution_> solutionDescriptor, org.kie.api.runtime.KieSession kieSession, AbstractScoreHolder<Score_> scoreHolder)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Score_` | `calculateScore​(int initScore)` |
    `void` | `close()` |
    `Map<String,​ConstraintMatchTotal<Score_>>` | `getConstraintMatchTotalMap()` | As defined by `InnerScoreDirector.getConstraintMatchTotalMap()`.
    `Map<Object,​Indictment<Score_>>` | `getIndictmentMap()` | As defined by `InnerScoreDirector.getIndictmentMap()`.
    `void` | `insert​(Object fact)` |
    `void` | `retract​(Object fact)` |
    `void` | `update​(Object fact)` |

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

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

- - ### Constructor Detail

    - #### DroolsConstraintSession

          public DroolsConstraintSession​(SolutionDescriptor<Solution_> solutionDescriptor,
                                         org.kie.api.runtime.KieSession kieSession,
                                         AbstractScoreHolder<Score_> scoreHolder)

  - ### Method Detail

    - #### insert

          public void insert​(Object fact)

      Specified by:
        `insert` in interface `ConstraintSession<Solution_,​Score_ extends Score<Score_>>`

    - #### update

          public void update​(Object fact)

      Specified by:
        `update` in interface `ConstraintSession<Solution_,​Score_ extends Score<Score_>>`

    - #### retract

          public void retract​(Object fact)

      Specified by:
        `retract` in interface `ConstraintSession<Solution_,​Score_ extends Score<Score_>>`

    - #### calculateScore

          public Score_ calculateScore​(int initScore)

      Specified by:
        `calculateScore` in interface `ConstraintSession<Solution_,​Score_ extends Score<Score_>>`

    - #### getConstraintMatchTotalMap

          public Map<String,​ConstraintMatchTotal<Score_>> getConstraintMatchTotalMap()

      Description copied from interface: `ConstraintSession`
      As defined by `InnerScoreDirector.getConstraintMatchTotalMap()`.
      Specified by:
        `getConstraintMatchTotalMap` in interface `ConstraintSession<Solution_,​Score_ extends Score<Score_>>`
      Returns:
        never null

    - #### getIndictmentMap

          public Map<Object,​Indictment<Score_>> getIndictmentMap()

      Description copied from interface: `ConstraintSession`
      As defined by `InnerScoreDirector.getIndictmentMap()`.
      Specified by:
        `getIndictmentMap` in interface `ConstraintSession<Solution_,​Score_ extends Score<Score_>>`
      Returns:
        never null

    - #### close

          public void close()

      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `ConstraintSession<Solution_,​Score_ extends Score<Score_>>`