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
|
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
|
Instance |
getInstance(String type,
String instanceKey)
Returns the instance with the given instanceKey from the
type with the given name
|
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.
|
public Set<Type> getAllTypes()
BeanDatabase
getAllTypes
in interface BeanDatabase
public Type getType(String type)
BeanDatabase
getType
in interface BeanDatabase
type
- The non-null namepublic Instance getInstance(String type, String instanceKey)
BeanDatabase
getInstance
in interface BeanDatabase
type
- The non-null name of the type to get the instance frominstanceKey
- The non-null key of the instancepublic WriteableType addType(String typeName)
WriteableBeanDatabase
addType
in interface WriteableBeanDatabase
typeName
- The name of the type to addpublic Type removeType(String typeName)
WriteableBeanDatabase
removeType
in interface WriteableBeanDatabase
typeName
- The non-null type namepublic WriteableType getWriteableType(String typeName)
WriteableBeanDatabase
getWriteableType
in interface WriteableBeanDatabase
typeName
- The non-null name of the type to fetchpublic WriteableType findOrAddWriteableType(String typeName)
WriteableBeanDatabase
findOrAddWriteableType
in interface WriteableBeanDatabase
typeName
- The non-null name of the type to find or createpublic void commit()
WriteableBeanDatabase
commit
in interface WriteableBeanDatabase
public void commit(Object commitMessage)
WriteableBeanDatabase
commit
in interface WriteableBeanDatabase
commitMessage
- An object to pass to any BeanDatabaseUpdateListener
that is registeredpublic void dumpDatabase()
BeanDatabase
dumpDatabase
in interface BeanDatabase
public void dumpDatabase(PrintStream output)
BeanDatabase
dumpDatabase
in interface BeanDatabase
output
- - The non-null outut stream to write the database toCopyright © 2009-2016 Oracle Corporation. All Rights Reserved.