public interface WriteableBeanDatabase extends BeanDatabase
BeanDatabase
. Types and instances can be
added to this in-memory databaseModifier and Type | Method and Description |
---|---|
WriteableType |
addType(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(Object commitMessage)
This method should be called when the writeable database should become
the current database.
|
WriteableType |
findOrAddWriteableType(String typeName)
Gets or creates a writeable type with the given name
|
Set<WriteableType> |
getAllWriteableTypes()
Gets an unmodifiable set of all the types in the bean database
|
Object |
getCommitMessage()
Gets the commit message for this writeable bean database
|
TwoPhaseResource |
getTwoPhaseResource()
Returns a two-phase resource that can be used by a
DynamicConfiguration to tie the transaction done by
this WriteableBeanDatabase into a commit done by the
DynamicConfiguration.
|
WriteableType |
getWriteableType(String typeName)
Gets a writeable type of the given name
|
Type |
removeType(String typeName)
Removed the given type and all of its instances from the database.
|
void |
setCommitMessage(Object commitMessage)
Sets the commit message for this writeable bean database
|
dumpDatabase, dumpDatabase, dumpDatabaseAsString, getAllTypes, getInstance, getType
Set<WriteableType> getAllWriteableTypes()
WriteableType addType(String typeName)
typeName
- The name of the type to addType removeType(String typeName)
typeName
- The non-null type nameWriteableType getWriteableType(String typeName)
typeName
- The non-null name of the type to fetchWriteableType findOrAddWriteableType(String typeName)
typeName
- The non-null name of the type to find or createObject getCommitMessage()
void setCommitMessage(Object commitMessage)
commitMessage
- The possibly null commit message
for this writeable bean databaseTwoPhaseResource getTwoPhaseResource()
void commit() throws IllegalStateException, MultiException
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(Object commitMessage) throws IllegalStateException, MultiException
commitMessage
- An object to pass to any BeanDatabaseUpdateListener
that is registeredIllegalStateException
- 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 exceptionsCopyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.