Package: grails.util

## [Java] Class DomainBuilder

- grails.util.DomainBuilder

-     public class DomainBuilder
      extends groovy.util.ObjectGraphBuilder

  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`

  - ### 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#registerBeanFactory(java.lang.String, java.lang.String, java.lang.Class), groovy.util.ObjectGraphBuilder#registerBeanFactory(java.lang.String, java.lang.Class), groovy.util.ObjectGraphBuilder#addAttributeDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#registerExplicitMethod(java.lang.String, java.lang.String, groovy.lang.Closure), groovy.util.ObjectGraphBuilder#registerExplicitMethod(java.lang.String, groovy.lang.Closure), 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#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#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#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#addPostNodeCompletionDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#removePostNodeCompletionDelegate(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#registerExplicitProperty(java.lang.String, java.lang.String, groovy.lang.Closure, groovy.lang.Closure), groovy.util.ObjectGraphBuilder#registerExplicitProperty(java.lang.String, groovy.lang.Closure, groovy.lang.Closure), groovy.util.ObjectGraphBuilder#getNameMappingClosure(), groovy.util.ObjectGraphBuilder#setNameMappingClosure(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#withBuilder(groovy.util.FactoryBuilderSupport, 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#addDisposalClosure(groovy.lang.Closure), groovy.util.ObjectGraphBuilder#getDisposalClosures(), groovy.util.ObjectGraphBuilder#getCurrent(), groovy.util.ObjectGraphBuilder#getVariables(), groovy.util.ObjectGraphBuilder#getVariable(java.lang.String), groovy.util.ObjectGraphBuilder#setVariable(java.lang.String, java.lang.Object), 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#getParentName(), groovy.util.ObjectGraphBuilder#invokeMethod(java.lang.String, java.lang.Object), groovy.util.ObjectGraphBuilder#invokeMethod(java.lang.String), groovy.util.ObjectGraphBuilder#getProperty(java.lang.String), groovy.util.ObjectGraphBuilder#getName(java.lang.String), groovy.util.ObjectGraphBuilder#setProperty(java.lang.String, java.lang.Object), groovy.util.ObjectGraphBuilder#getContext(), groovy.util.ObjectGraphBuilder#build(groovy.lang.Script), groovy.util.ObjectGraphBuilder#build(java.lang.String, groovy.lang.GroovyClassLoader), groovy.util.ObjectGraphBuilder#build(java.lang.Class), groovy.util.ObjectGraphBuilder#removeVariable(java.lang.String), groovy.util.ObjectGraphBuilder#hasVariable(java.lang.String), groovy.util.ObjectGraphBuilder#getMetaClass(), groovy.util.ObjectGraphBuilder#setMetaClass(groovy.lang.MetaClass), groovy.util.ObjectGraphBuilder#wait(long), groovy.util.ObjectGraphBuilder#wait(long, int), 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()`

- - ### Constructor Detail

    - #### public DomainBuilder()