public class WriteableBeanDatabaseImpl extends Object implements WriteableBeanDatabase
| Modifier 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.
|
void |
dumpDatabase()
Dumps the type and instance names to stderr
|
void |
dumpDatabase(PrintStream output)
Dumps the type and instance names to the given stream
|
String |
dumpDatabaseAsString()
Dumps the type and instance names to a String for debugging
|
WriteableType |
findOrAddWriteableType(String typeName)
Gets or creates a writeable type with the given name
|
Set<Type> |
getAllTypes()
Gets an unmodifiable set of all the types in the bean database
|
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
|
Instance |
getInstance(String type,
String instanceKey)
Returns the instance with the given instanceKey from the
type with the given name
|
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.
|
Type |
getType(String type)
Gets the type with the given name
|
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
|
String |
toString() |
public Set<Type> getAllTypes()
BeanDatabasegetAllTypes in interface BeanDatabasepublic Set<WriteableType> getAllWriteableTypes()
WriteableBeanDatabasegetAllWriteableTypes in interface WriteableBeanDatabasepublic Type getType(String type)
BeanDatabasegetType in interface BeanDatabasetype - The non-null namepublic Instance getInstance(String type, String instanceKey)
BeanDatabasegetInstance in interface BeanDatabasetype - The non-null name of the type to get the instance frominstanceKey - The non-null key of the instancepublic WriteableType addType(String typeName)
WriteableBeanDatabaseaddType in interface WriteableBeanDatabasetypeName - The name of the type to addpublic Type removeType(String typeName)
WriteableBeanDatabaseremoveType in interface WriteableBeanDatabasetypeName - The non-null type namepublic WriteableType getWriteableType(String typeName)
WriteableBeanDatabasegetWriteableType in interface WriteableBeanDatabasetypeName - The non-null name of the type to fetchpublic WriteableType findOrAddWriteableType(String typeName)
WriteableBeanDatabasefindOrAddWriteableType in interface WriteableBeanDatabasetypeName - The non-null name of the type to find or createpublic void commit()
WriteableBeanDatabasecommit in interface WriteableBeanDatabasepublic void commit(Object commitMessage)
WriteableBeanDatabasecommit in interface WriteableBeanDatabasecommitMessage - An object to pass to any BeanDatabaseUpdateListener
that is registeredpublic void dumpDatabase()
BeanDatabasedumpDatabase in interface BeanDatabasepublic void dumpDatabase(PrintStream output)
BeanDatabasedumpDatabase in interface BeanDatabaseoutput - - The non-null outut stream to write the database topublic String dumpDatabaseAsString()
BeanDatabasedumpDatabaseAsString in interface BeanDatabasepublic TwoPhaseResource getTwoPhaseResource()
WriteableBeanDatabasegetTwoPhaseResource in interface WriteableBeanDatabasepublic Object getCommitMessage()
WriteableBeanDatabasegetCommitMessage in interface WriteableBeanDatabasepublic void setCommitMessage(Object commitMessage)
WriteableBeanDatabasesetCommitMessage in interface WriteableBeanDatabasecommitMessage - The possibly null commit message
for this writeable bean databaseCopyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.