|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DomainObjectContainer
Represents a container that the domain objects work within. It provides access to the persistence mechanism and user interface.
| Method Summary | ||
|---|---|---|
|
allInstances(java.lang.Class<T> ofType)
Returns all the instances of the specified type (including subtypes). |
|
|
allMatches(java.lang.Class<T> ofType,
Filter<T> filter)
Returns all the instances of the specified type (including subtypes) that the filter object accepts. |
|
|
allMatches(java.lang.Class<T> ofType,
java.lang.String title)
Returns all the instances of the specified type (including subtypes) that have the given title. |
|
|
allMatches(java.lang.Class<T> ofType,
T pattern)
Returns all the instances of the specified type (including subtypes) that match the given object: where any property that is set will be tested and properties that are not set will be ignored. |
|
|
allMatches(Query<T> query)
Returns all the instances that match the given Query. |
|
void |
commit()
Commit all changes to the object store. |
|
|
firstMatch(java.lang.Class<T> ofType,
Filter<T> filter)
Returns the first instance of the specified type (including subtypes) that matches the supplied Filter, or null if none. |
|
|
firstMatch(java.lang.Class<T> ofType,
java.lang.String title)
Returns the first instance of the specified type (including subtypes) that matches the supplied title, or null if none. |
|
|
firstMatch(java.lang.Class<T> ofType,
T pattern)
Returns the first instance of the specified type (including subtypes) that matches the supplied object as a pattern, or null if none. |
|
|
firstMatch(Query<T> query)
Returns the first instance that matches the supplied query, or null if none. |
|
boolean |
flush()
Flush all changes to the object store. |
|
UserMemento |
getUser()
Get the details about the current user. |
|
void |
informUser(java.lang.String message)
Make the specified message available to the user. |
|
boolean |
isPersistent(java.lang.Object domainObject)
Determines if the specified object is persistent (that it is stored permanently outside of the virtual machine). |
|
boolean |
isValid(java.lang.Object domainObject)
Whether the object is in a valid state, that is that none of the validation of properties, collections and object-level is vetoing. |
|
|
newInstance(java.lang.Class<T> ofType,
java.lang.Object object)
Returns a new instance of the specified class that has the sane persisted state as the specified object. |
|
|
newPersistentInstance(java.lang.Class<T> ofType)
Returns a new instance of the specified class that will have been persisted. |
|
|
newTransientInstance(java.lang.Class<T> ofType)
Create a new instance of the specified class, but do not persist it. |
|
void |
objectChanged(java.lang.Object domainObject)
Flags that the specified object's state has changed and its changes need to be saved. |
|
void |
persist(java.lang.Object transientDomainObject)
Make the specified transient object persistent. |
|
void |
persistIfNotAlready(java.lang.Object domainObject)
Make the specified object persistent if not already. |
|
void |
raiseError(java.lang.String message)
Notify the user of an application error with the specified message. |
|
void |
remove(java.lang.Object persistentDomainObject)
Removes (deletes) the persisted object. |
|
void |
resolve(java.lang.Object domainObject)
Ensure that the specified object is completely loaded into memory. |
|
void |
resolve(java.lang.Object domainObject,
java.lang.Object field)
Ensure that the specified object is completely loaded into memory, though only if the supplied field reference is null. |
|
|
uniqueMatch(java.lang.Class<T> ofType,
Filter<T> filter)
Find the only instance of the specified type (including subtypes) that has the specified title. |
|
|
uniqueMatch(java.lang.Class<T> ofType,
java.lang.String title)
Find the only instance of the specified type (including subtypes) that has the specified title. |
|
|
uniqueMatch(java.lang.Class<T> ofType,
T pattern)
Find the only instance of the patterned object type (including subtypes) that matches the set fields in the pattern object: where any property that is set will be tested and properties that are not set will be ignored. |
|
|
uniqueMatch(Query<T> query)
Find the only instance that matches the provided query. |
|
java.lang.String |
validate(java.lang.Object domainObject)
The reason, if any why the object is in a invalid state |
|
void |
warnUser(java.lang.String message)
Warn the user about a situation with the specified message. |
|
| Method Detail |
|---|
void resolve(java.lang.Object domainObject)
This forces the lazy loading mechanism to load the object if it is not already loaded.
void resolve(java.lang.Object domainObject,
java.lang.Object field)
This forces the lazy loading mechanism to load the object if it is not already loaded.
void objectChanged(java.lang.Object domainObject)
boolean flush()
Typically only for use by tests.
void commit()
Typically only for use by tests.
<T> T newTransientInstance(java.lang.Class<T> ofType)
newPersistentInstance(Class)<T> T newPersistentInstance(java.lang.Class<T> ofType)
<T> T newInstance(java.lang.Class<T> ofType,
java.lang.Object object)
boolean isValid(java.lang.Object domainObject)
validate(Object)java.lang.String validate(java.lang.Object domainObject)
Checks the validation of all of the properties, collections and object-level.
isValid(Object)boolean isPersistent(java.lang.Object domainObject)
void persist(java.lang.Object transientDomainObject)
Throws an exception if object is already persistent.
isPersistent(Object),
persistIfNotAlready(Object)void persistIfNotAlready(java.lang.Object domainObject)
Does nothing otherwise.
isPersistent(Object),
persist(Object)void remove(java.lang.Object persistentDomainObject)
persistentDomainObject - void informUser(java.lang.String message)
warnUser(String),
raiseError(String)void warnUser(java.lang.String message)
raiseError(String),
informUser(String)void raiseError(java.lang.String message)
warnUser(String),
informUser(String)UserMemento getUser()
<T> java.util.List<T> allInstances(java.lang.Class<T> ofType)
If there are no instances the list will be empty. This method creates a
new List object each time it is called so the caller is free to
use or modify the returned List, but the changes will not be
reflected back to the repository.
This method should only be called where the number of instances is known to be relatively low.
<T> java.util.List<T> allMatches(java.lang.Class<T> ofType,
Filter<T> filter)
If there are no instances the list will be empty. This method creates a
new List object each time it is called so the caller is free to
use or modify the returned List, but the changes will not be
reflected back to the repository.
This method is useful during exploration/prototyping, but you may want to use
allMatches(Query) for production code.
<T> java.util.List<T> allMatches(java.lang.Class<T> ofType,
java.lang.String title)
If there are no instances the list will be empty. This method creates a
new List object each time it is called so the caller is free to
use or modify the returned List, but the changes will not be
reflected back to the repository.
This method is useful during exploration/prototyping, but you may want to use
allMatches(Query) for production code.
<T> java.util.List<T> allMatches(java.lang.Class<T> ofType,
T pattern)
If there are no instances the list will be empty. This method creates a
new List object each time it is called so the caller is free to
use or modify the returned List, but the changes will not be
reflected back to the repository.
This method is useful during exploration/prototyping, but you may want to use
allMatches(Query) for production code.
<T> java.util.List<T> allMatches(Query<T> query)
Query.
If there are no instances the list will be empty. This method creates a
new List object each time it is called so the caller is free to
use or modify the returned List, but the changes will not be
reflected back to the repository.
<T> T firstMatch(java.lang.Class<T> ofType,
Filter<T> filter)
Filter, or null if none.
This method is useful during exploration/prototyping, but you may want to use
firstMatch(Query) for production code.
<T> T firstMatch(java.lang.Class<T> ofType,
java.lang.String title)
This method is useful during exploration/prototyping, but you may want to use
firstMatch(Query) for production code.
<T> T firstMatch(java.lang.Class<T> ofType,
T pattern)
This method is useful during exploration/prototyping, but you may want to use
firstMatch(Query) for production code.
<T> T firstMatch(Query<T> query)
<T> T uniqueMatch(java.lang.Class<T> ofType,
Filter<T> filter)
If no instance is found then null will be return, while if there is more that one instances a run-time exception will be thrown.
This method is useful during exploration/prototyping, but you may want to use
uniqueMatch(Query) for production code.
<T> T uniqueMatch(java.lang.Class<T> ofType,
java.lang.String title)
If no instance is found then null will be returned, while if there is more that one instances a run-time exception will be thrown.
This method is useful during exploration/prototyping, but you may want to use
uniqueMatch(Query) for production code.
<T> T uniqueMatch(java.lang.Class<T> ofType,
T pattern)
If no instance is found then null will be return, while if there is more that one instances a run-time exception will be thrown.
This method is useful during exploration/prototyping, but you may want to use
uniqueMatch(Query) for production code.
<T> T uniqueMatch(Query<T> query)
If no instance is found then null will be return, while if there is more that one instances a run-time exception will be thrown.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||