|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.applib.AbstractContainedObject
public abstract class AbstractContainedObject
Convenience super class for all classes that wish to interact with the container.
DomainObjectContainer| Constructor Summary | |
|---|---|
AbstractContainedObject()
|
|
| Method Summary | ||
|---|---|---|
protected
|
allInstances(Class<T> ofType)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
allMatches(Class<T> ofType,
Filter<T> filter)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
allMatches(Class<T> ofType,
String title)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
allMatches(Class<T> ofType,
T pattern)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
allMatches(Query<T> query)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
firstMatch(Class<T> ofType,
Filter<T> filter)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
firstMatch(Class<T> ofType,
String title)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
firstMatch(Class<T> ofType,
T pattern)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
firstMatch(Query<T> query)
Convenience method that delegates to DomainObjectContainer. |
|
protected DomainObjectContainer |
getContainer()
This field is not persisted, nor displayed to the user. |
|
protected UserMemento |
getUser()
|
|
protected void |
informUser(String message)
Display the specified message to the user, in a non-intrusive fashion. |
|
protected boolean |
isPersistent(Object domainObject)
Whether the provided object is persistent. |
|
protected boolean |
isValid(Object domainObject)
Convenience methods that delegates to DomainObjectContainer. |
|
protected
|
newTransientInstance(Class<T> ofType)
|
|
protected void |
persist(Object transientDomainObject)
Save provided object to the persistent object store. |
|
protected void |
persistIfNotAlready(Object domainObject)
Saves the object, but only if not already persistent. |
|
protected void |
raiseError(String message)
Display the specified message as an error to the user, ensuring that it is acknowledged. |
|
protected void |
remove(Object persistentDomainObject)
Delete the provided object from the persistent object store. |
|
void |
setContainer(DomainObjectContainer container)
Injected by the application container itself. |
|
protected
|
uniqueMatch(Class<T> ofType,
Filter<T> filter)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
uniqueMatch(Class<T> ofType,
String title)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
uniqueMatch(Class<T> ofType,
T pattern)
Convenience method that delegates to DomainObjectContainer. |
|
protected
|
uniqueMatch(Query<T> query)
Convenience method that delegates to DomainObjectContainer. |
|
protected String |
validate(Object domainObject)
Convenience methods that delegates to DomainObjectContainer. |
|
protected void |
warnUser(String message)
Display the specified message as a warning to the user, in a more visible fashion, but without requiring explicit acknowledgement. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractContainedObject()
| Method Detail |
|---|
protected <T> T newTransientInstance(Class<T> ofType)
protected <T> List<T> allInstances(Class<T> ofType)
DomainObjectContainer.
DomainObjectContainer.allInstances(Class)
protected <T> List<T> allMatches(Class<T> ofType,
Filter<T> filter)
DomainObjectContainer.
DomainObjectContainer.allMatches(Class, Filter)
protected <T> List<T> allMatches(Class<T> ofType,
T pattern)
DomainObjectContainer.
DomainObjectContainer.allMatches(Class, Object)
protected <T> List<T> allMatches(Class<T> ofType,
String title)
DomainObjectContainer.
DomainObjectContainer.allMatches(Class, String)protected <T> List<T> allMatches(Query<T> query)
DomainObjectContainer.
DomainObjectContainer.allMatches(Query)
protected <T> T firstMatch(Class<T> ofType,
Filter<T> filter)
DomainObjectContainer.
DomainObjectContainer.firstMatch(Class, Filter)
protected <T> T firstMatch(Class<T> ofType,
T pattern)
DomainObjectContainer.
DomainObjectContainer.firstMatch(Class, Object)
protected <T> T firstMatch(Class<T> ofType,
String title)
DomainObjectContainer.
DomainObjectContainer.firstMatch(Class, String)protected <T> T firstMatch(Query<T> query)
DomainObjectContainer.
DomainObjectContainer.firstMatch(Query)
protected <T> T uniqueMatch(Class<T> ofType,
Filter<T> filter)
DomainObjectContainer.
DomainObjectContainer.uniqueMatch(Class, Filter)
protected <T> T uniqueMatch(Class<T> ofType,
String title)
DomainObjectContainer.
DomainObjectContainer.uniqueMatch(Class, String)
protected <T> T uniqueMatch(Class<T> ofType,
T pattern)
DomainObjectContainer.
DomainObjectContainer.uniqueMatch(Class, Object)protected <T> T uniqueMatch(Query<T> query)
DomainObjectContainer.
DomainObjectContainer.uniqueMatch(Query)protected boolean isValid(Object domainObject)
DomainObjectContainer.
DomainObjectContainer.isValid(Object)protected String validate(Object domainObject)
DomainObjectContainer.
DomainObjectContainer.validate(Object)protected boolean isPersistent(Object domainObject)
protected void persist(Object transientDomainObject)
If the object is persistent already, then
will throw an exception.
persistIfNotAlready(Object)protected void persistIfNotAlready(Object domainObject)
persistent.
#isPersistent(),
persist(Object)protected void remove(Object persistentDomainObject)
protected void informUser(String message)
protected void warnUser(String message)
protected void raiseError(String message)
protected UserMemento getUser()
protected DomainObjectContainer getContainer()
public final void setContainer(DomainObjectContainer container)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||