Provides a single point of contact from domain objects into the Apache Isis framework.
DomainObjectContainer interface provides a single point of contact
from domain objects into the Isis framework. It can also be used as a
lightweight general purpose repository during prototyping.
The following table lists the most important (ie non deprecated) methods in this interface.
|Object creation||newTransientInstance(Class<T>)||Creates new non-persisted object.
|Validation||isValid(Object)||whether object is valid|
|validate(Object)||reason why object is invalid (if any)|
|Generic Repository||allInstances(Class<T>)||All persisted instances of specified type|
|allMatches(Class<T>, Predicate<T>)||All persistenced instances of specified type matching predicate|
|allMatches(Class<T>, String)||All persisted instances with the specified string as their title|
|allMatches(Class<T>, Object)||All persisted instances matching object (query-by-example)|
|allMatches(Query<T>)||All instances satisfying the provided query|
|firstMatch(...)||As for allMatches(...), but returning first instance|
|uniqueMatch(...)||As for firstMatch(...), but requiring there to be only one match|
|Object persistence||isPersistent(Object)||whether object is persistent|
|persist(Object)||persist the transient object|
|persistIfNotAlready(Object)||persist the object (provided is not already persisted)|
|remove(Object)||remove the persisted object|
|removeIfNotAlready(Object)||remove the object (provided is not already transient)|
|Presentation||titleOf(Object)||Returns the title of the object.|
|Messages and warnings||informUser(String)||Inform the user|
|warnUser(String)||Warn the user about a situation, requiring acknowledgement.|
|raiseError(String)||Notify user of a serious application error, typically requiring further action on behalf of the user|
|Security||getUser()||The currently-logged on user|
|Properties||getProperty(String)||Value of configuration property|
|getPropertyNames()||All configuration properties available|
|Object store control||flush()||Flush all pending changes to object store|
All edits are reviewed before going live, so feel free to do much more than fix typos or links. If you see a page that could benefit from an entire rewrite, we'd be thrilled to review it. Don't be surprised if we like it so much we ask you for help with other pages :)NOTICE: unless indicated otherwise on the pages in question, all editable content available from apache.org is presumed to be licensed under the Apache License (AL) version 2.0 and hence all submissions to apache.org treated as formal Contributions under the license terms.