grails.util
Class DomainBuilder

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by groovy.lang.Binding
          extended by groovy.util.FactoryBuilderSupport
              extended by groovy.util.ObjectGraphBuilder
                  extended by grails.util.DomainBuilder
All Implemented Interfaces:
groovy.lang.GroovyObject

public class DomainBuilder
extends groovy.util.ObjectGraphBuilder

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 )
                }
 

Author:
Scott Vlaminck

Nested Class Summary
static class DomainBuilder.DefaultGrailsChildPropertySetter
           
 
Nested classes/interfaces inherited from class groovy.util.ObjectGraphBuilder
groovy.util.ObjectGraphBuilder.ChildPropertySetter, groovy.util.ObjectGraphBuilder.ClassNameResolver, groovy.util.ObjectGraphBuilder.DefaultChildPropertySetter, groovy.util.ObjectGraphBuilder.DefaultClassNameResolver, groovy.util.ObjectGraphBuilder.DefaultIdentifierResolver, groovy.util.ObjectGraphBuilder.DefaultNewInstanceResolver, groovy.util.ObjectGraphBuilder.DefaultReferenceResolver, groovy.util.ObjectGraphBuilder.DefaultRelationNameResolver, groovy.util.ObjectGraphBuilder.IdentifierResolver, groovy.util.ObjectGraphBuilder.NewInstanceResolver, groovy.util.ObjectGraphBuilder.ReferenceResolver, groovy.util.ObjectGraphBuilder.ReflectionClassNameResolver, groovy.util.ObjectGraphBuilder.RelationNameResolver
 
Field Summary
 
Fields inherited from class groovy.util.ObjectGraphBuilder
CLASSNAME_RESOLVER_KEY, CLASSNAME_RESOLVER_REFLECTION, CLASSNAME_RESOLVER_REFLECTION_ROOT, LAZY_REF, NODE_CLASS, NODE_NAME, OBJECT_ID
 
Fields inherited from class groovy.util.FactoryBuilderSupport
attributeDelegates, autoRegistrationComplete, autoRegistrationRunning, CHILD_BUILDER, CURRENT_BUILDER, CURRENT_FACTORY, CURRENT_NAME, CURRENT_NODE, explicitMethods, explicitProperties, OWNER, PARENT_BUILDER, PARENT_CONTEXT, PARENT_FACTORY, PARENT_NAME, PARENT_NODE, postInstantiateDelegates, postNodeCompletionDelegates, preInstantiateDelegates, registrationGroup, registrationGroupName
 
Constructor Summary
DomainBuilder()
           
 
Method Summary
 
Methods inherited from class groovy.util.ObjectGraphBuilder
getBeanFactoryName, getChildPropertySetter, getClassLoader, getClassNameResolver, getNewInstanceResolver, getRelationNameResolver, isLazyReferencesAllowed, postInstantiate, preInstantiate, resolveFactory, setBeanFactoryName, setChildPropertySetter, setClassLoader, setClassNameResolver, setIdentifierResolver, setLazyReferencesAllowed, setNewInstanceResolver, setReferenceResolver, setRelationNameResolver
 
Methods inherited from class groovy.util.FactoryBuilderSupport
addAttributeDelegate, addDisposalClosure, addPostInstantiateDelegate, addPostNodeCompletionDelegate, addPreInstantiateDelegate, autoRegisterNodes, build, build, build, checkExplicitMethod, checkValueIsNull, checkValueIsType, checkValueIsTypeNotString, createNode, dispathNodeCall, dispose, getAttributeDelegates, getChildBuilder, getContext, getContextAttribute, getContexts, getContinuationData, getCurrent, getCurrentBuilder, getCurrentFactory, getCurrentName, getExplicitMethods, getExplicitProperties, getFactories, getLocalExplicitMethods, getLocalExplicitProperties, getLocalFactories, getName, getNameMappingClosure, getParentContext, getParentFactory, getParentName, getParentNode, getPostInstantiateDelegates, getPostNodeCompletionDelegates, getPreInstantiateDelegates, getProperty, getProxyBuilder, getRegistrationGroupItems, getRegistrationGroups, getVariable, getVariables, handleNodeAttributes, invokeMethod, invokeMethod, newContext, nodeCompleted, popContext, postNodeCompletion, registerBeanFactory, registerBeanFactory, registerExplicitMethod, registerExplicitMethod, registerExplicitProperty, registerExplicitProperty, registerFactory, registerFactory, removeAttributeDelegate, removePostInstantiateDelegate, removePostNodeCompletionDelegate, removePreInstantiateDelegate, reset, resolveExplicitMethod, resolveExplicitProperty, restoreFromContinuationData, setClosureDelegate, setNameMappingClosure, setNodeAttributes, setParent, setProperty, setProxyBuilder, setVariable, withBuilder, withBuilder, withBuilder
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, setMetaClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainBuilder

public DomainBuilder()


Copyright (c) 2005-2009 The Grails project