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

## Class DroolsConstraintFactory<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.InnerConstraintFactory<Solution_>
  - - org.optaplanner.core.impl.score.stream.drools.DroolsConstraintFactory<Solution_>

- All Implemented Interfaces:
    `ConstraintFactory`

      public final class DroolsConstraintFactory<Solution_>
      extends InnerConstraintFactory<Solution_>

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DroolsConstraintFactory​(SolutionDescriptor<Solution_> solutionDescriptor, boolean droolsAlphaNetworkCompilationEnabled)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `DroolsConstraintSessionFactory<Solution_,​?>` | `buildSessionFactory​(Constraint[] constraints)` |
    `<A> UniConstraintStream<A>` | `fromUnfiltered​(Class<A> fromClass)` | Like `ConstraintFactory.from(Class)`, but without any filtering of uninitialized `planning entities`.
    `String` | `getDefaultConstraintPackage()` | This is `ConstraintConfiguration.constraintPackage()` if available, otherwise the package of the `PlanningSolution` class.
    `SolutionDescriptor<Solution_>` | `getSolutionDescriptor()` |
    `DroolsVariableFactory` | `getVariableFactory()` |

    - ### Methods inherited from class org.optaplanner.core.impl.score.stream.InnerConstraintFactory

      `assertValidFromType, extractConstraintToWeightMap, from, fromUniquePair`

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

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

    - ### Methods inherited from interface org.optaplanner.core.api.score.stream.ConstraintFactory

      `fromUniquePair, fromUniquePair, fromUniquePair, fromUniquePair, fromUniquePair`

- - ### Constructor Detail

    - #### DroolsConstraintFactory

          public DroolsConstraintFactory​(SolutionDescriptor<Solution_> solutionDescriptor,
                                         boolean droolsAlphaNetworkCompilationEnabled)

  - ### Method Detail

    - #### fromUnfiltered

          public <A> UniConstraintStream<A> fromUnfiltered​(Class<A> fromClass)

      Description copied from interface: `ConstraintFactory`
      Like `ConstraintFactory.from(Class)`, but without any filtering of uninitialized `planning entities`.
      Type Parameters:
        `A` - the type of the matched problem fact or `planning entity`
      Parameters:
        `fromClass` - never null
      Returns:
        never null

    - #### buildSessionFactory

          public DroolsConstraintSessionFactory<Solution_,​?> buildSessionFactory​(Constraint[] constraints)

    - #### getSolutionDescriptor

          public SolutionDescriptor<Solution_> getSolutionDescriptor()

      Specified by:
        `getSolutionDescriptor` in class `InnerConstraintFactory<Solution_>`
      Returns:
        never null

    - #### getVariableFactory

          public DroolsVariableFactory getVariableFactory()

    - #### getDefaultConstraintPackage

          public String getDefaultConstraintPackage()

      Description copied from interface: `ConstraintFactory`
      This is `ConstraintConfiguration.constraintPackage()` if available, otherwise the package of the `PlanningSolution` class.
      Returns:
        never null