Like repositories, factories are defined by interface in the domain, decoupling the domain objects from their actual implementation.
Unlike repositories, there is no particular need to change the implementation when moving from one object store to another, because in all cases the factory can simply delegate to its injected
The methods for
DomainObjectContainer that are relevant for a factory are:
<T> T newTransientInstance(final Class<T> ofClass)
<T> T newPersistentInstance(final Class<T> ofClass)
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.