public interface WriteableBeanDatabase extends BeanDatabase
BeanDatabase
. Types and instances can be
added to this in-memory databaseModifier and Type | Method and Description |
---|---|
WriteableType |
addType(java.lang.String typeName)
Adds a type of the given name
|
void |
commit()
This method should be called when the writeable database should become
the current database.
|
void |
commit(java.lang.Object commitMessage)
This method should be called when the writeable database should become
the current database.
|
WriteableType |
findOrAddWriteableType(java.lang.String typeName)
Gets or creates a writeable type with the given name
|
WriteableType |
getWriteableType(java.lang.String typeName)
Gets a writeable type of the given name
|
Type |
removeType(java.lang.String typeName)
Removed the given type and all of its instances from the database.
|
dumpDatabase, dumpDatabase, getAllTypes, getInstance, getType
WriteableType addType(java.lang.String typeName)
typeName
- The name of the type to addType removeType(java.lang.String typeName)
typeName
- The non-null type nameWriteableType getWriteableType(java.lang.String typeName)
typeName
- The non-null name of the type to fetchWriteableType findOrAddWriteableType(java.lang.String typeName)
typeName
- The non-null name of the type to find or createvoid commit() throws java.lang.IllegalStateException, MultiException
java.lang.IllegalStateException
- if the current database has been modified
since this writeable database copy was createdMultiException
- if there were user implementations of BeanDatabaseUpdateListener
that failed by throwing exceptions this exception will be thrown wrapping those exceptionsvoid commit(java.lang.Object commitMessage) throws java.lang.IllegalStateException, MultiException
commitMessage
- An object to pass to any BeanDatabaseUpdateListener
that is registeredjava.lang.IllegalStateException
- if the current database has been modified
since this writeable database copy was createdMultiException
- if there were user implementations of BeanDatabaseUpdateListener
that failed by throwing exceptions this exception will be thrown wrapping those exceptions