Package: grails.util

## [Java] Class DomainBuilder

- grails.util.DomainBuilder

- Allows the construction of object graphs of domain classes. Example:

            def builder = new DomainBuilder()

              def company = builder.company(name: 'ACME') {
                  employee(name: 'Duke', employeeId: 1) {
                      address(street: '123 Groovy Rd')
                  }
                  employee(name: 'George', employeeId: 2)
              }

  Authors:
    Scott Vlaminck

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `DomainBuilder.DefaultGrailsChildPropertySetter` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class groovy.util.ObjectGraphBuilder` | `NODE_CLASS, NODE_NAME, OBJECT_ID, LAZY_REF, CLASSNAME_RESOLVER_KEY, CLASSNAME_RESOLVER_REFLECTION, CLASSNAME_RESOLVER_REFLECTION_ROOT, CURRENT_FACTORY, PARENT_FACTORY, PARENT_NODE, CURRENT_NODE, PARENT_CONTEXT, PARENT_NAME, CURRENT_NAME, OWNER, PARENT_BUILDER, CURRENT_BUILDER, CHILD_BUILDER, SCRIPT_CLASS_NAME`
    `class groovy.util.FactoryBuilderSupport` | `CURRENT_FACTORY, PARENT_FACTORY, PARENT_NODE, CURRENT_NODE, PARENT_CONTEXT, PARENT_NAME, CURRENT_NAME, OWNER, PARENT_BUILDER, CURRENT_BUILDER, CHILD_BUILDER, SCRIPT_CLASS_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `DomainBuilder ()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class groovy.util.ObjectGraphBuilder` | `groovy.util.ObjectGraphBuilder#getBeanFactoryName(), groovy.util.ObjectGraphBuilder#getChildPropertySetter(), groovy.util.ObjectGraphBuilder#getClassNameResolver(), groovy.util.ObjectGraphBuilder#getNewInstanceResolver(), groovy.util.ObjectGraphBuilder#getRelationNameResolver(), groovy.util.ObjectGraphBuilder#isLazyReferencesAllowed(), groovy.util.ObjectGraphBuilder#setBeanFactoryName(java.lang.String), groovy.util.ObjectGraphBuilder#setChildPropertySetter(java.lang.Object), groovy.util.ObjectGraphBuilder#setClassNameResolver(java.lang.Object), groovy.util.ObjectGraphBuilder#setIdentifierResolver(java.lang.Object), groovy.util.ObjectGraphBuilder#setLazyReferencesAllowed(boolean), groovy.util.ObjectGraphBuilder#setNewInstanceResolver(java.lang.Object), groovy.util.ObjectGraphBuilder#setReferenceResolver(java.lang.Object), groovy.util.ObjectGraphBuilder#setRelationNameResolver(groovy.util.ObjectGraphBuilder$RelationNameResolver), groovy.util.ObjectGraphBuilder#setClassLoader(java.lang.ClassLoader), groovy.util.ObjectGraphBuilder#getClassLoader(), groovy.util.ObjectGraphBuilder#dispose(), groovy.util.ObjectGraphBuilder#getParentNode(), groovy.util.ObjectGraphBuilder#checkValueIsNull(java.lang.Object, java.lang.Object), groovy.util.ObjectGraphBuilder#checkValueIsType(java.lang.Object, java.lang.Object, java.lang.Class), groovy.util.ObjectGraphBuilder#checkValueIsTypeNotString(java.lang.Object, java.lang.Object, java.lang.Class), groovy.util.ObjectGraphBuilder#autoRegisterNodes(), groovy.util.ObjectGraphBuilder#invokeMethod(java.lang.String, java.lang.Object), groovy.util.ObjectGraphBuilder#invokeMethod(java.lang.String), groovy.util.ObjectGraphBuilder#getVariable(java.lang.String), groovy.util.ObjectGraphBuilder#setVariable(java.lang.String, java.lang.Object), groovy.util.ObjectGraphBuilder#getVariables(), groovy.util.ObjectGraphBuilder#build(java.lang.Class), groovy.util.ObjectGraphBuilder#build(java.lang.String, groovy.lang.GroovyClassLoader), groovy.util.ObjectGraphBuilder#build(groovy.lang.Script), groovy.util.ObjectGraphBuilder#addPostNodeCompletionDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#getFactories(), groovy.util.ObjectGraphBuilder#getExplicitMethods(), groovy.util.ObjectGraphBuilder#getExplicitProperties(), groovy.util.ObjectGraphBuilder#getLocalFactories(), groovy.util.ObjectGraphBuilder#getLocalExplicitMethods(), groovy.util.ObjectGraphBuilder#getLocalExplicitProperties(), groovy.util.ObjectGraphBuilder#getRegistrationGroups(), groovy.util.ObjectGraphBuilder#getRegistrationGroupItems(java.lang.String), groovy.util.ObjectGraphBuilder#getAttributeDelegates(), groovy.util.ObjectGraphBuilder#getPreInstantiateDelegates(), groovy.util.ObjectGraphBuilder#getPostInstantiateDelegates(), groovy.util.ObjectGraphBuilder#getPostNodeCompletionDelegates(), groovy.util.ObjectGraphBuilder#getMethodMissingDelegate(), groovy.util.ObjectGraphBuilder#setMethodMissingDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#getPropertyMissingDelegate(), groovy.util.ObjectGraphBuilder#setPropertyMissingDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#getCurrent(), groovy.util.ObjectGraphBuilder#getContextAttribute(java.lang.String), groovy.util.ObjectGraphBuilder#getCurrentFactory(), groovy.util.ObjectGraphBuilder#getCurrentName(), groovy.util.ObjectGraphBuilder#getCurrentBuilder(), groovy.util.ObjectGraphBuilder#getParentFactory(), groovy.util.ObjectGraphBuilder#getParentContext(), groovy.util.ObjectGraphBuilder#getChildBuilder(), groovy.util.ObjectGraphBuilder#addAttributeDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#removeAttributeDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#addPreInstantiateDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#removePreInstantiateDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#addPostInstantiateDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#removePostInstantiateDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#removePostNodeCompletionDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#registerExplicitProperty(java.lang.String, groovy.lang.Closure, groovy.lang.Closure), groovy.util.ObjectGraphBuilder#registerExplicitProperty(java.lang.String, java.lang.String, groovy.lang.Closure, groovy.lang.Closure), groovy.util.ObjectGraphBuilder#registerExplicitMethod(java.lang.String, groovy.lang.Closure), groovy.util.ObjectGraphBuilder#registerExplicitMethod(java.lang.String, java.lang.String, groovy.lang.Closure), groovy.util.ObjectGraphBuilder#registerBeanFactory(java.lang.String, java.lang.String, java.lang.Class), groovy.util.ObjectGraphBuilder#registerBeanFactory(java.lang.String, java.lang.Class), groovy.util.ObjectGraphBuilder#registerFactory(java.lang.String, groovy.util.Factory), groovy.util.ObjectGraphBuilder#registerFactory(java.lang.String, java.lang.String, groovy.util.Factory), groovy.util.ObjectGraphBuilder#getNameMappingClosure(), groovy.util.ObjectGraphBuilder#setNameMappingClosure(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#withBuilder(java.util.Map, groovy.util.FactoryBuilderSupport, java.lang.String, groovy.lang.Closure), groovy.util.ObjectGraphBuilder#withBuilder(groovy.util.FactoryBuilderSupport, java.lang.String, groovy.lang.Closure), groovy.util.ObjectGraphBuilder#withBuilder(groovy.util.FactoryBuilderSupport, groovy.lang.Closure), groovy.util.ObjectGraphBuilder#addDisposalClosure(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#getDisposalClosures(), groovy.util.ObjectGraphBuilder#getParentName(), groovy.util.ObjectGraphBuilder#setProperty(java.lang.String, java.lang.Object), groovy.util.ObjectGraphBuilder#getProperty(java.lang.String), groovy.util.ObjectGraphBuilder#getName(java.lang.String), groovy.util.ObjectGraphBuilder#getContext(), groovy.util.ObjectGraphBuilder#hasVariable(java.lang.String), groovy.util.ObjectGraphBuilder#getMetaClass(), groovy.util.ObjectGraphBuilder#setMetaClass(groovy.lang.MetaClass), groovy.util.ObjectGraphBuilder#wait(long, int), groovy.util.ObjectGraphBuilder#wait(long), groovy.util.ObjectGraphBuilder#wait(), groovy.util.ObjectGraphBuilder#equals(java.lang.Object), groovy.util.ObjectGraphBuilder#toString(), groovy.util.ObjectGraphBuilder#hashCode(), groovy.util.ObjectGraphBuilder#getClass(), groovy.util.ObjectGraphBuilder#notify(), groovy.util.ObjectGraphBuilder#notifyAll()`
    `class groovy.util.FactoryBuilderSupport` | `groovy.util.FactoryBuilderSupport#dispose(), groovy.util.FactoryBuilderSupport#getParentNode(), groovy.util.FactoryBuilderSupport#checkValueIsNull(java.lang.Object, java.lang.Object), groovy.util.FactoryBuilderSupport#checkValueIsType(java.lang.Object, java.lang.Object, java.lang.Class), groovy.util.FactoryBuilderSupport#checkValueIsTypeNotString(java.lang.Object, java.lang.Object, java.lang.Class), groovy.util.FactoryBuilderSupport#autoRegisterNodes(), groovy.util.FactoryBuilderSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.util.FactoryBuilderSupport#invokeMethod(java.lang.String), groovy.util.FactoryBuilderSupport#getVariable(java.lang.String), groovy.util.FactoryBuilderSupport#setVariable(java.lang.String, java.lang.Object), groovy.util.FactoryBuilderSupport#getVariables(), groovy.util.FactoryBuilderSupport#build(java.lang.Class), groovy.util.FactoryBuilderSupport#build(java.lang.String, groovy.lang.GroovyClassLoader), groovy.util.FactoryBuilderSupport#build(groovy.lang.Script), groovy.util.FactoryBuilderSupport#addPostNodeCompletionDelegate(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#getFactories(), groovy.util.FactoryBuilderSupport#getExplicitMethods(), groovy.util.FactoryBuilderSupport#getExplicitProperties(), groovy.util.FactoryBuilderSupport#getLocalFactories(), groovy.util.FactoryBuilderSupport#getLocalExplicitMethods(), groovy.util.FactoryBuilderSupport#getLocalExplicitProperties(), groovy.util.FactoryBuilderSupport#getRegistrationGroups(), groovy.util.FactoryBuilderSupport#getRegistrationGroupItems(java.lang.String), groovy.util.FactoryBuilderSupport#getAttributeDelegates(), groovy.util.FactoryBuilderSupport#getPreInstantiateDelegates(), groovy.util.FactoryBuilderSupport#getPostInstantiateDelegates(), groovy.util.FactoryBuilderSupport#getPostNodeCompletionDelegates(), groovy.util.FactoryBuilderSupport#getMethodMissingDelegate(), groovy.util.FactoryBuilderSupport#setMethodMissingDelegate(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#getPropertyMissingDelegate(), groovy.util.FactoryBuilderSupport#setPropertyMissingDelegate(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#getCurrent(), groovy.util.FactoryBuilderSupport#getContextAttribute(java.lang.String), groovy.util.FactoryBuilderSupport#getCurrentFactory(), groovy.util.FactoryBuilderSupport#getCurrentName(), groovy.util.FactoryBuilderSupport#getCurrentBuilder(), groovy.util.FactoryBuilderSupport#getParentFactory(), groovy.util.FactoryBuilderSupport#getParentContext(), groovy.util.FactoryBuilderSupport#getChildBuilder(), groovy.util.FactoryBuilderSupport#addAttributeDelegate(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#removeAttributeDelegate(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#addPreInstantiateDelegate(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#removePreInstantiateDelegate(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#addPostInstantiateDelegate(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#removePostInstantiateDelegate(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#removePostNodeCompletionDelegate(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#registerExplicitProperty(java.lang.String, groovy.lang.Closure, groovy.lang.Closure), groovy.util.FactoryBuilderSupport#registerExplicitProperty(java.lang.String, java.lang.String, groovy.lang.Closure, groovy.lang.Closure), groovy.util.FactoryBuilderSupport#registerExplicitMethod(java.lang.String, groovy.lang.Closure), groovy.util.FactoryBuilderSupport#registerExplicitMethod(java.lang.String, java.lang.String, groovy.lang.Closure), groovy.util.FactoryBuilderSupport#registerBeanFactory(java.lang.String, java.lang.String, java.lang.Class), groovy.util.FactoryBuilderSupport#registerBeanFactory(java.lang.String, java.lang.Class), groovy.util.FactoryBuilderSupport#registerFactory(java.lang.String, groovy.util.Factory), groovy.util.FactoryBuilderSupport#registerFactory(java.lang.String, java.lang.String, groovy.util.Factory), groovy.util.FactoryBuilderSupport#getNameMappingClosure(), groovy.util.FactoryBuilderSupport#setNameMappingClosure(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#withBuilder(java.util.Map, groovy.util.FactoryBuilderSupport, java.lang.String, groovy.lang.Closure), groovy.util.FactoryBuilderSupport#withBuilder(groovy.util.FactoryBuilderSupport, java.lang.String, groovy.lang.Closure), groovy.util.FactoryBuilderSupport#withBuilder(groovy.util.FactoryBuilderSupport, groovy.lang.Closure), groovy.util.FactoryBuilderSupport#addDisposalClosure(groovy.lang.Closure), groovy.util.FactoryBuilderSupport#getDisposalClosures(), groovy.util.FactoryBuilderSupport#getParentName(), groovy.util.FactoryBuilderSupport#setProperty(java.lang.String, java.lang.Object), groovy.util.FactoryBuilderSupport#getProperty(java.lang.String), groovy.util.FactoryBuilderSupport#getName(java.lang.String), groovy.util.FactoryBuilderSupport#getContext(), groovy.util.FactoryBuilderSupport#hasVariable(java.lang.String), groovy.util.FactoryBuilderSupport#getMetaClass(), groovy.util.FactoryBuilderSupport#setMetaClass(groovy.lang.MetaClass), groovy.util.FactoryBuilderSupport#wait(long, int), groovy.util.FactoryBuilderSupport#wait(long), groovy.util.FactoryBuilderSupport#wait(), groovy.util.FactoryBuilderSupport#equals(java.lang.Object), groovy.util.FactoryBuilderSupport#toString(), groovy.util.FactoryBuilderSupport#hashCode(), groovy.util.FactoryBuilderSupport#getClass(), groovy.util.FactoryBuilderSupport#notify(), groovy.util.FactoryBuilderSupport#notifyAll()`

- - ### Constructor Detail

    - #### public DomainBuilder()