org.hibernate.validator.internal.cfg.context

## Class ConstraintMappingContextImplBase

- java.lang.Object
- - org.hibernate.validator.internal.cfg.context.ConstraintMappingContextImplBase

- Direct Known Subclasses:
    CascadableConstraintMappingContextImplBase, CrossParameterConstraintMappingContextImpl, TypeConstraintMappingContextImpl

      public abstract class ConstraintMappingContextImplBase
      extends Object

  Base class for implementations of constraint mapping creational context types.
  Author:
    Gunnar Morling

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DefaultConstraintMapping` | `mapping`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConstraintMappingContextImplBase(DefaultConstraintMapping mapping)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addConstraint(ConfiguredConstraint<?> constraint)` Adds a constraint to the set of constraints managed by this creational context.
    `protected DefaultConstraintMapping` | `getConstraintMapping()`
    `protected Set<MetaConstraint<?>>` | `getConstraints(ConstraintHelper constraintHelper)` Converts all constraints managed by this creational context into `MetaConstraint`s.
    `protected abstract ConstraintDescriptorImpl.ConstraintType` | `getConstraintType()` Returns the type of constraints hosted on the element configured by this creational context.
    `<C> TypeConstraintMappingContext<C>` | `type(Class<C> type)`

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

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

- - ### Field Detail

    - #### mapping

          protected final DefaultConstraintMapping mapping

  - ### Constructor Detail

    - #### ConstraintMappingContextImplBase

          public ConstraintMappingContextImplBase(DefaultConstraintMapping mapping)

  - ### Method Detail

    - #### type

          public <C> TypeConstraintMappingContext<C> type(Class<C> type)

    - #### getConstraintType

          protected abstract ConstraintDescriptorImpl.ConstraintType getConstraintType()

      Returns the type of constraints hosted on the element configured by this creational context.
      Returns:
        the type of constraints hosted on the element configured by this creational context

    - #### getConstraintMapping

          protected DefaultConstraintMapping getConstraintMapping()

    - #### addConstraint

          protected void addConstraint(ConfiguredConstraint<?> constraint)

      Adds a constraint to the set of constraints managed by this creational context.
      Parameters:
        `constraint` - the constraint to add

    - #### getConstraints

          protected Set<MetaConstraint<?>> getConstraints(ConstraintHelper constraintHelper)

      Converts all constraints managed by this creational context into `MetaConstraint`s.
      Parameters:
        `constraintHelper` - constraint helper required for creation of meta constraints.
      Returns:
        All constraints of this context as meta constraints.

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved