public interface StorageManager<SMF extends StorageManagerFactory>
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction()
Starts a transaction on this StorageManager instance.
|
void |
change(CoreField field)
Changes a field to the storage of this builder.
|
void |
change(MMObjectBuilder builder)
Changes the storage of a builder to match its new configuration.
|
void |
change(MMObjectNode node)
Commit this node to the specified builder.
|
void |
commit()
Closes any transaction that was started and commits all changes.
|
void |
create()
Create the basic elements for this storage
|
void |
create(CoreField field)
Creates a field and adds it to the storage of this builder.
|
void |
create(MMObjectBuilder builder)
Create a storage element to store the specified builder's objects.
|
int |
create(MMObjectNode node)
This method creates a new object in the storage, and registers the change.
|
int |
createKey()
Gives an unique number for a new node, to be inserted in the storage.
|
void |
delete(CoreField field)
Deletes a field from the storage of this builder.
|
void |
delete(MMObjectBuilder builder)
Drops the storage of this builder.
|
void |
delete(MMObjectNode node)
Delete a node
|
boolean |
exists()
Determine if the basic storage elements exist
Basic storage elements include the 'object' storage (where all objects and their types are registered).
|
boolean |
exists(MMObjectBuilder builder)
Determine if a storage element exists for storing the given builder's objects
|
byte[] |
getBinaryValue(MMObjectNode node,
CoreField field)
Retrieve a large binary object (byte array) for a specified object field.
|
InputStream |
getInputStreamValue(MMObjectNode node,
CoreField field) |
MMObjectNode |
getNode(MMObjectBuilder builder,
int number)
Select a node from a specified builder
|
int |
getNodeType(int number)
Returns the nodetype for a specified nodereference
|
String |
getStringValue(MMObjectNode node,
CoreField field)
Retrieve a large text for a specified object field.
|
double |
getVersion()
Returns the version of this factory implementation.
|
void |
init(SMF factory)
Initializes the manager.
|
boolean |
isNull(MMObjectNode node,
CoreField field)
Checks for null values for a field from the storage of this builder.
|
boolean |
rollback()
Cancels any transaction that was started and rollback changes if possible.
|
int |
setNodeType(MMObjectNode node,
MMObjectBuilder builder) |
int |
size()
Return the total number of objects in the storage
|
int |
size(MMObjectBuilder builder)
Return the number of objects of a builder in the storage
|
double getVersion()
void init(SMF factory) throws StorageException
factory - the StorageManagerFactory instance that created this storage manager.StorageConfigurationException - if the initialization failedStorageExceptionvoid beginTransaction()
throws StorageException
StorageException - if the transaction could not be createdvoid commit()
throws StorageException
StorageException - if a transaction is not currently active, or an error occurred while committingboolean rollback()
throws StorageException
true if changes were rolled back, false if the transaction was
canceled but the storage does not support rollbackStorageException - if a transaction is not currently active, or an error occurred during rollbackint createKey()
throws StorageException
StorageExceptionString getStringValue(MMObjectNode node, CoreField field) throws StorageException
node - the node to retrieve the text fromfield - the Type of the field to retrieveStorageException - if an error occurred while retrieving the text valuebyte[] getBinaryValue(MMObjectNode node, CoreField field) throws StorageException
node - the node to retrieve the byte array fromfield - the CoreField of the field to retrieveStorageException - if an error occurred while retrieving the binary valueInputStream getInputStreamValue(MMObjectNode node, CoreField field) throws StorageException
StorageExceptionint create(MMObjectNode node) throws StorageException
node - The node to insertStorageException - if an error occurred during insertvoid change(MMObjectNode node) throws StorageException
node - The node to commitStorageException - if an error occurred during commitvoid delete(MMObjectNode node) throws StorageException
node - The node to deleteStorageException - if an error occurred during deleteint setNodeType(MMObjectNode node, MMObjectBuilder builder) throws StorageException
StorageExceptionMMObjectNode getNode(MMObjectBuilder builder, int number) throws StorageException
builder - The builder to select fromnumber - the number of the nodeStorageException - if an error occurred during the getint getNodeType(int number)
throws StorageException
number - the number of the nodeStorageException - if an error occurred during selectionvoid create(MMObjectBuilder builder) throws StorageException
builder - the builder to create the storage element forStorageException - if an error occurred during the creation of the storage elementvoid create()
throws StorageException
StorageException - if an error occurred during the creation of the object storagevoid change(MMObjectBuilder builder) throws StorageException
builder - the builder whose storage to changeStorageExceptionvoid delete(MMObjectBuilder builder) throws StorageException
builder - the builder whose storage to dropStorageExceptionboolean exists(MMObjectBuilder builder) throws StorageException
builder - the builder to checktrue if the storage element exists, false if it doesn'tStorageException - if an error occurred while querying the storageboolean exists()
throws StorageException
true if basic storage elements existStorageException - if an error occurred while querying the storageint size(MMObjectBuilder builder) throws StorageException
builder - the builder whose objects to countStorageException - if the storage element for the builder does not existsint size() throws StorageException
StorageException - if the basic storage elements do not existvoid create(CoreField field) throws StorageException
field - the CoreField of the field to addStorageExceptionvoid change(CoreField field) throws StorageException
field - the CoreField of the field to changeStorageExceptionvoid delete(CoreField field) throws StorageException
field - the CoreField of the field to deleteStorageExceptionboolean isNull(MMObjectNode node, CoreField field) throws StorageException
node - the node to check the value forfield - the CoreFieldtrue when value is null in storageStorageException - if an error occurred during the getMMBase 1.9-SNAPSHOT - ${javadoctimestamp}