|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StorageManager<SMF extends StorageManagerFactory>
The StorageManager interface defines how to access a storage device. It contains methods that can be used to query the storage, insert, update, or remove objects, or to change object definitions (adding fields, etc.).
| Method Summary | |
|---|---|
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 |
| Method Detail |
|---|
double getVersion()
void init(SMF factory)
throws StorageException
factory - the StorageManagerFactory instance that created this storage manager.
StorageConfigurationException - if the initialization failed
StorageException
void beginTransaction()
throws StorageException
StorageException - if the transaction could not be created
void commit()
throws StorageException
StorageException - if a transaction is not currently active, or an error occurred while committing
boolean rollback()
throws StorageException
true if changes were rolled back, false if the transaction was
canceled but the storage does not support rollback
StorageException - if a transaction is not currently active, or an error occurred during rollback
int createKey()
throws StorageException
StorageException
String getStringValue(MMObjectNode node,
CoreField field)
throws StorageException
node - the node to retrieve the text fromfield - the Type of the field to retrieve
StorageException - if an error occurred while retrieving the text value
byte[] getBinaryValue(MMObjectNode node,
CoreField field)
throws StorageException
node - the node to retrieve the byte array fromfield - the CoreField of the field to retrieve
StorageException - if an error occurred while retrieving the binary value
InputStream getInputStreamValue(MMObjectNode node,
CoreField field)
throws StorageException
StorageException
int create(MMObjectNode node)
throws StorageException
node - The node to insert
StorageException - if an error occurred during insert
void change(MMObjectNode node)
throws StorageException
node - The node to commit
StorageException - if an error occurred during commit
void delete(MMObjectNode node)
throws StorageException
node - The node to delete
StorageException - if an error occurred during delete
int setNodeType(MMObjectNode node,
MMObjectBuilder builder)
throws StorageException
StorageException
MMObjectNode getNode(MMObjectBuilder builder,
int number)
throws StorageException
builder - The builder to select fromnumber - the number of the node
StorageException - if an error occurred during the get
int getNodeType(int number)
throws StorageException
number - the number of the node
StorageException - if an error occurred during selection
void create(MMObjectBuilder builder)
throws StorageException
builder - the builder to create the storage element for
StorageException - if an error occurred during the creation of the storage element
void create()
throws StorageException
StorageException - if an error occurred during the creation of the object storage
void change(MMObjectBuilder builder)
throws StorageException
builder - the builder whose storage to change
StorageException
void delete(MMObjectBuilder builder)
throws StorageException
builder - the builder whose storage to drop
StorageException
boolean exists(MMObjectBuilder builder)
throws StorageException
builder - the builder to check
true if the storage element exists, false if it doesn't
StorageException - if an error occurred while querying the storage
boolean exists()
throws StorageException
true if basic storage elements exist
StorageException - if an error occurred while querying the storage
int size(MMObjectBuilder builder)
throws StorageException
builder - the builder whose objects to count
StorageException - if the storage element for the builder does not exists
int size()
throws StorageException
StorageException - if the basic storage elements do not exist
void create(CoreField field)
throws StorageException
field - the CoreField of the field to add
StorageException
void change(CoreField field)
throws StorageException
field - the CoreField of the field to change
StorageException
void delete(CoreField field)
throws StorageException
field - the CoreField of the field to delete
StorageException
boolean isNull(MMObjectNode node,
CoreField field)
throws StorageException
node - the node to check the value forfield - the CoreField
true when value is null in storage
StorageException - if an error occurred during the get
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||