GrailsDomainConfigurationUtil (Grails 3.1.1)
Date: 2016-02-04

Package: org.grails.core.support

## [Java] Class GrailsDomainConfigurationUtil

- org.grails.core.support.GrailsDomainConfigurationUtil

- Utility methods used in configuring the Grails Hibernate integration.

  Authors:
    Graeme Rocher

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `PROPERTIES_PROPERTY` |
    `static java.lang.String` | `PROPERTY_NAME` |

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `static void` | `configureDomainClassRelationships(GrailsClass[] domainClasses, java.util.Map<?, ?> domainMap)` Configures the relationships between domain classes after they have been all loaded.
    `static java.util.Map<java.lang.String, Constrained>` | `evaluateConstraints(java.lang.Object instance, GrailsDomainClassProperty[] properties, java.util.Map<java.lang.String, java.lang.Object> defaultConstraints)` Evaluates the constraints closure to build the list of constraints
    `static java.util.Map<java.lang.String, Constrained>` | `evaluateConstraints(java.lang.Class<?> theClass, GrailsDomainClassProperty[] properties, java.util.Map<java.lang.String, java.lang.Object> defaultConstraints)` Evaluates the constraints closure to build the list of constraints
    `static java.util.Map<java.lang.String, Constrained>` | `evaluateConstraints(java.lang.Object instance, GrailsDomainClassProperty[] properties)` Evaluates the constraints closure to build the list of constraints.
    `static java.util.Map<java.lang.String, Constrained>` | `evaluateConstraints(java.lang.Object instance)` Evaluates the constraints closure to build the list of constraints.
    `static java.util.Map<java.lang.String, Constrained>` | `evaluateConstraints(java.lang.Class<?> theClass)` Evaluates the constraints closure to build the list of constraints
    `static java.util.Map<java.lang.String, Constrained>` | `evaluateConstraints(java.lang.Class<?> theClass, GrailsDomainClassProperty[] properties)` Evaluates the constraints closure to build the list of constraints.
    `static java.io.Serializable` | `getAssociationIdentifier(java.lang.Object target, java.lang.String propertyName, GrailsDomainClass referencedDomainClass)`
    `static java.util.Map<?, ?>` | `getAssociationMap(java.lang.Class<?> domainClass)` Returns the association map for the specified domain class
    `static java.util.Map<?, ?>` | `getMappedByMap(java.lang.Class<?> domainClass)` Retrieves the mappedBy map for the specified class.
    `static java.lang.String` | `getMappingFileName(java.lang.String className)` Returns the ORM framework's mapping file name for the specified class name.
    `static java.util.LinkedList<?>` | `getSuperClassChain(java.lang.Class<?> theClass)`
    `static boolean` | `isBasicType(GrailsDomainClassProperty prop)` Establish whether it's a basic type.
    `static boolean` | `isBasicType(java.lang.Class<?> propType)`
    `static boolean` | `isConfigurational(java.lang.String name)`
    `static boolean` | `isNotConfigurational(java.beans.PropertyDescriptor descriptor)` Checks whether is property is configurational.
    `static boolean` | `isNotConfigurational(java.lang.String name)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### public static final java.lang.String PROPERTIES_PROPERTY

    - #### public static final java.lang.String PROPERTY_NAME

  - ### Method Detail

    - #### public static void configureDomainClassRelationships(GrailsClass[] domainClasses, java.util.Map<?, ?> domainMap)

      Configures the relationships between domain classes after they have been all loaded.

      Parameters:
        `domainClasses` - The domain classes to configure relationships for
        `domainMap` - The domain class map

    - #### @java.lang.Deprecated public static java.util.Map<java.lang.String, Constrained> evaluateConstraints(java.lang.Object instance, GrailsDomainClassProperty[] properties, java.util.Map<java.lang.String, java.lang.Object> defaultConstraints)

      Evaluates the constraints closure to build the list of constraints

      deprecated:
        Use ConstraintsEvaluator instead
      Parameters:
        `instance` - The instance to evaluate constraints for
        `properties` - The properties of the instance
        `defaultConstraints` - A map that defines the default constraints
      Returns:
        A Map of constraints

    - #### @java.lang.Deprecated public static java.util.Map<java.lang.String, Constrained> evaluateConstraints(java.lang.Class<?> theClass, GrailsDomainClassProperty[] properties, java.util.Map<java.lang.String, java.lang.Object> defaultConstraints)

      Evaluates the constraints closure to build the list of constraints

      deprecated:
        Use ConstraintsEvaluator instead
      Parameters:
        `theClass` - The domain class to evaluate constraints for
        `properties` - The properties of the instance
        `defaultConstraints` - A map that defines the default constraints
      Returns:
        A Map of constraints

    - #### @java.lang.Deprecated public static java.util.Map<java.lang.String, Constrained> evaluateConstraints(java.lang.Object instance, GrailsDomainClassProperty[] properties)

      Evaluates the constraints closure to build the list of constraints.

      deprecated:
        Use ConstraintsEvaluator instead
      Parameters:
        `instance` - The instance to evaluate constraints for
        `properties` - The properties of the instance
      Returns:
        A Map of constraints When the bean cannot be introspected

    - #### @java.lang.Deprecated public static java.util.Map<java.lang.String, Constrained> evaluateConstraints(java.lang.Object instance)

      Evaluates the constraints closure to build the list of constraints.

      deprecated:
        Use ConstraintsEvaluator instead
      Parameters:
        `instance` - The instance to evaluate constraints for
      Returns:
        A Map of constraints When the bean cannot be introspected

    - #### @java.lang.Deprecated public static java.util.Map<java.lang.String, Constrained> evaluateConstraints(java.lang.Class<?> theClass)

      Evaluates the constraints closure to build the list of constraints

      deprecated:
        Use ConstraintsEvaluator instead
      Parameters:
        `theClass` - The class to evaluate constraints for
      Returns:
        A Map of constraints When the bean cannot be introspected

    - #### @java.lang.Deprecated public static java.util.Map<java.lang.String, Constrained> evaluateConstraints(java.lang.Class<?> theClass, GrailsDomainClassProperty[] properties)

      Evaluates the constraints closure to build the list of constraints.

      deprecated:
        Use ConstraintsEvaluator instead
      Parameters:
        `theClass` - The class to evaluate constraints for
      Returns:
        A Map of constraints When the bean cannot be introspected

    - #### public static java.io.Serializable getAssociationIdentifier(java.lang.Object target, java.lang.String propertyName, GrailsDomainClass referencedDomainClass)

    - #### public static java.util.Map<?, ?> getAssociationMap(java.lang.Class<?> domainClass)

      Returns the association map for the specified domain class

      Parameters:
        `domainClass` - the domain class
      Returns:
        The association map

    - #### public static java.util.Map<?, ?> getMappedByMap(java.lang.Class<?> domainClass)

      Retrieves the mappedBy map for the specified class.

      Parameters:
        `domainClass` - The domain class
      Returns:
        The mappedBy map

    - #### public static java.lang.String getMappingFileName(java.lang.String className)

      Returns the ORM framework's mapping file name for the specified class name.

      Parameters:
        `className` - The class name of the mapped file
      Returns:
        The mapping file name

    - #### public static java.util.LinkedList<?> getSuperClassChain(java.lang.Class<?> theClass)

    - #### public static boolean isBasicType(GrailsDomainClassProperty prop)

      Establish whether it's a basic type.

      Parameters:
        `prop` - The domain class property
      Returns:
        true if it is basic

    - #### public static boolean isBasicType(java.lang.Class<?> propType)

    - #### public static boolean isConfigurational(java.lang.String name)

    - #### public static boolean isNotConfigurational(java.beans.PropertyDescriptor descriptor)

      Checks whether is property is configurational.

      Parameters:
        `descriptor` - The descriptor
      Returns:
        true if it is configurational

    - #### public static boolean isNotConfigurational(java.lang.String name)