inline fun <reified U : Any> PolymorphicDomainObjectContainer<in U>.create(name: String, crossinline configuration: U.() -> Unit): U
Creates a domain object with the specified name and type, adds it to the container, and configures it with the specified action.
name
- the name of the domain object to be created
configuration
- an action for configuring the domain object
InvalidUserDataException
- if a domain object with the specified name already
exists or the container does not support creating a domain object with the specified
type
Parameters
Return
the created domain object
inline fun <reified U : Any> PolymorphicDomainObjectContainer<in U>.create(name: String): U
Creates a domain object with the specified name and type, and adds it to the container.
name
- the name of the domain object to be created
InvalidUserDataException
- if a domain object with the specified name already
exists or the container does not support creating a domain object with the specified
type
Parameters
Return
the created domain object