Table of Contents
| API Documentation: | NamedDomainObjectSet |
|---|
| Known Subtypes: |
|
|---|
A specialization of NamedDomainObjectCollection that also implements Set and orders objects by their inherent name.
All object equality is determined in terms of object names. That is, calling remove() with an object that is NOT equal to
an existing object in terms of equals, but IS in terms of name equality will result in the existing collection item with
the equal name being removed.
You can create an instance of this type using the factory method ObjectFactory.namedDomainObjectSet(java.lang.Class).
| Method | Description |
getByName(name) | Locates an object by name, failing if there is no such object. |
getByName(name, configureClosure) | Locates an object by name, failing if there is no such object. The given configure closure is executed against the object before it is returned from this method. The object is passed to the closure as its delegate. |
getByName(name, configureAction) | Locates an object by name, failing if there is no such object. The given configure action is executed against the object before it is returned from this method. |
named(name) | Locates a object by name, without triggering its creation or configuration, failing if there is no such object. |
named(name, type) | Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object. |
named(name, type, configurationAction) | Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider. |
named(name, configurationAction) | Locates a object by name, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider. |
T getByName(String name)
Locates an object by name, failing if there is no such object.
Locates an object by name, failing if there is no such object. The given configure closure is executed against the object before it is returned from this method. The object is passed to the closure as its delegate.
Locates an object by name, failing if there is no such object. The given configure action is executed against the object before it is returned from this method.
NamedDomainObjectProvider<T> named(String name)
NamedDomainObjectProvider<T>Locates a object by name, without triggering its creation or configuration, failing if there is no such object.
NamedDomainObjectProvider<S> named(String name, Class<S> type)
NamedDomainObjectProvider<S>Class<S>Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object.
NamedDomainObjectProvider<S> named(String name, Class<S> type, Action<? super S> configurationAction)
NamedDomainObjectProvider<S>Class<S>Action<? super S>Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider.
NamedDomainObjectProvider<T> named(String name, Action<? super T> configurationAction)
NamedDomainObjectProvider<T>Action<? super T>Locates a object by name, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider.