|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.mmbase.storage.database.Support2Storage
|
+--org.mmbase.storage.database.AbstractDatabaseStorage
AbstractDatabaseStorage implements part of the DatabaseStorage interface, and supplies utility routines for other support classes. In particulatr, this layer implements the 'stateless' builder update methods, methods for creating Transactions, and methods for setting and retrieving configuration data. Further, a number of utility methods are defined for constructing SQL-statements (or parts thereof) using schemes. Finally, a number of abstract methods relating to teh constrcution of SQL statements are defined, which a extending class should implement.
| Field Summary | |
protected MMBase |
mmb
The MMBase instance that uses this database |
| Fields inherited from interface org.mmbase.storage.database.DatabaseStorage |
KEY_FOREIGN, KEY_NONE, KEY_NOTNULL, KEY_PRIMARY, KEY_SECONDARY |
| Constructor Summary | |
protected |
AbstractDatabaseStorage()
Constructs the AbstractDatabaseSupport database layer support class |
| Method Summary | |
abstract boolean |
addField(MMObjectBuilder builder,
java.lang.String fieldname)
Adds a field to the table of this builder. |
protected java.lang.String |
applyCreateScheme(java.lang.String tableName,
java.lang.String fieldDefinitions,
java.lang.String parentTableName)
Applies the create scheme (if available), and returns the result (a field type defintiton string) |
protected java.lang.String |
applyForeignKeyScheme(java.lang.String fieldName,
java.lang.String fieldType,
java.lang.String reference)
Applies the foreign key scheme (if available), and returns the result (a field type defintiton string) |
protected java.lang.String |
applyKeyScheme(java.lang.String fieldName,
java.lang.String fieldType,
java.lang.String indexName)
Applies the key scheme (if available), and returns the result (a field type defintiton string) |
protected java.lang.String |
applyNotNullScheme(java.lang.String fieldName,
java.lang.String fieldType)
Applies the not null scheme (if available), and returns the result (a field type defintiton string) |
protected java.lang.String |
applyPrimaryKeyScheme(java.lang.String fieldName,
java.lang.String fieldType)
Applies the primary key scheme (if available), and returns the result (a field type defintiton string) |
protected java.lang.String |
applyScheme(java.lang.String scheme,
java.lang.String a1,
java.lang.String a2,
java.lang.String a3)
Applies a given scheme. |
abstract boolean |
changeField(MMObjectBuilder builder,
java.lang.String fieldname)
Changes a field to the table of this builder. |
boolean |
commit(MMObjectNode node)
Commit this node to the specified builder table. |
abstract boolean |
commit(MMObjectNode node,
Transaction trans)
Commit this node to the specified builder table within a transaction. |
protected java.lang.String |
constructFieldDefinition(MMObjectBuilder builder,
FieldDefs field)
Constructs a creation definition segment for one field, to use in a CREATE TABLE sql comand |
protected java.lang.String |
constructFieldDefinition(java.lang.String tablename,
java.lang.String fieldname,
int type,
int size,
int keyType)
Constructs a creation definition segment for one field, to use in a CREATE TABLE sql comand |
boolean |
create(MMObjectBuilder builder)
Create a database table for the specified builder. |
abstract boolean |
create(MMObjectBuilder builder,
Transaction trans)
Create a database table for the specified builder. |
abstract boolean |
created(MMObjectBuilder builder)
Tells if a table for the builder already exists |
DatabaseTransaction |
createDatabaseTransaction()
Returns a newly created database transaction object. |
DatabaseTransaction |
createDatabaseTransaction(boolean useRollback)
Returns a newly created database transaction object. |
int |
createKey()
Gives an unique number for a node to be inserted. |
abstract int |
createKey(Transaction trans)
Gives an unique number for a node to be inserted. |
boolean |
createObjectStorage()
Create the object table (the basic table for all objects). |
abstract boolean |
createObjectStorage(Transaction trans)
Create the object table (the basic table for all objects) within a transaction |
protected java.lang.String |
createSQL(java.lang.String tableName,
java.lang.String fields)
Returns the SQL command to use for creating a specified table |
protected abstract java.lang.String |
createSQL(java.lang.String tableName,
java.lang.String fields,
java.lang.String parentTableName,
java.lang.String parentFields)
Returns the SQL command to use for creating a specified table, optionally extending another supplied table. |
Transaction |
createTransaction()
Returns a newly created transaction object. |
boolean |
delete(MMObjectNode node)
Delete a node |
abstract boolean |
delete(MMObjectNode node,
Transaction trans)
Delete a node within a transaction |
protected abstract java.lang.String |
deleteSQL(java.lang.String tableName,
int number)
Returns the SQL command to use for deleting an object in a table. |
void |
deployDatabaseDocument(XMLDatabaseReader document)
This reads database specific content from the database configuration document. |
abstract boolean |
drop(MMObjectBuilder builder)
Drops the table of this builder. |
java.lang.String |
getBinaryFilePath()
Returns the filepath where binary objects are stored. |
abstract byte[] |
getBytes(MMObjectNode node,
java.lang.String fieldname)
Get bytes from blob |
java.lang.String |
getCreateExtendedScheme()
Returns the scheme (SQL command) to use for creating a table that extends another table |
java.lang.String |
getCreateScheme()
Returns the scheme (SQL command) to use for creating a table |
java.util.Map |
getFieldNameMap()
Returns the current mapping of disallowed fieldsnames (typically reserved words) and their replacement names. |
java.lang.String |
getForeignKeyScheme()
Returns the scheme (SQL command) to use for creating a foreign key |
protected java.lang.String |
getFullTableName(java.lang.String tableName)
Returns the fully expanded tablename (includes the MMbase basename prefix) |
JDBCInterface |
getJDBC()
Returns the JDBC module used by this class to connect to the database. |
java.lang.String |
getKeyScheme()
Returns the scheme (SQL command) to use for creating a key |
int |
getMaxDropSize()
Returns the maximum table drop size. |
MMObjectNode |
getNode(MMObjectBuilder builder,
int number)
Select a node from a specified builder |
abstract MMObjectNode |
getNode(MMObjectBuilder builder,
int number,
Transaction trans)
Select a node from a specified builder |
int |
getNodeType(int number)
Returns the nodetype for a specified nodereference |
abstract int |
getNodeType(int number,
Transaction trans)
Returns the nodetype for a specified nodereference |
java.lang.String |
getNotNullScheme()
Returns the scheme (SQL command) to use for creating a non-null field |
java.lang.String |
getNumberString()
Maps the 'number' fieldname to a fieldname acceptable to the database. |
java.lang.String |
getPrimaryKeyScheme()
Returns the scheme (SQL command) to use for creating a primary key |
boolean |
getStoreBinaryAsFile()
Returns whether binary objects are stored as files (rather than in the database) |
abstract java.lang.String |
getText(MMObjectNode node,
java.lang.String fieldname)
Get text from blob |
java.util.Map |
getTypeMap()
Obtains the type map. |
void |
init(MMBase mmb,
XMLDatabaseReader document)
Initializes the database layer. |
int |
insert(MMObjectNode node)
This method inserts a new object, and registers the change. |
abstract int |
insert(MMObjectNode node,
Transaction trans)
This method inserts a new object within a transaction, and registers the change. |
protected abstract java.lang.String |
insertSQL(java.lang.String tableName,
java.lang.String fieldNames,
java.lang.String fieldValues)
Returns the SQL command to use for inserting an object in a table. |
abstract boolean |
isAllowedParentBuilder(MMObjectBuilder builder)
Returns whether this database support layer allows for builder to be a parent builder (that is, other builders can 'extend' this builder and its database tables). |
abstract void |
loadFieldFromTable(MMObjectNode node,
java.lang.String fieldname,
java.sql.ResultSet rs,
int i)
Stores a field in a table ResultSet in a MMObjectNode. |
java.lang.String |
mapToMMBaseFieldName(java.lang.String fieldname)
Maps a database fieldname to a fieldname as used by the MMbase system |
java.lang.String |
mapToTableFieldName(java.lang.String fieldname)
Maps a MMBase fieldname to a fieldname acceptable to the database |
protected java.lang.String |
matchType(int type,
int size)
Map a MMBase Type to a database specific type. |
void |
registerChanged(MMObjectNode node,
java.lang.String change)
Registers the change to a node. |
void |
registerParentBuilder(MMObjectBuilder parent,
MMObjectBuilder child)
Registers a builder as a parent builder (that is, other builders can 'extend' this builder and its database tables). |
abstract boolean |
removeField(MMObjectBuilder builder,
java.lang.String fieldname)
Deletes a field from the table of this builder. |
protected java.lang.String |
selectSQL(java.lang.String tableName,
java.lang.String fieldNames)
Returns the SQL command to use for selecting data from a table. |
protected java.lang.String |
selectSQL(java.lang.String tableName,
java.lang.String fieldNames,
int number)
Returns the SQL command to use for selecting data from one object. |
protected java.lang.String |
selectSQL(java.lang.String tableName,
java.lang.String fieldNames,
java.lang.String where,
java.lang.String orderby)
Returns the SQL command to use for selecting data from a table. |
protected abstract java.lang.String |
selectSQL(java.lang.String tableName,
java.lang.String fieldNames,
java.lang.String where,
java.lang.String orderby,
int offset,
int max)
Returns the SQL command to use for selecting data from a table. |
void |
setBinaryFilePath(java.lang.String path)
Sets the filepath where binary objects are stored. |
void |
setCreateExtendedScheme(java.lang.String scheme)
Sets the scheme (SQL command) to use for creating a table that extends another table An acceptable scheme is: CREATE TABLE {0} ({1}) EXTENDS ({2})
where {0} is replaced with the table name, [1} with the field definitions,
and {2} with teh parent table name |
void |
setCreateScheme(java.lang.String scheme)
Sets the scheme (SQL command) to use for creating a table An acceptable scheme is: CREATE TABLE {0} ({1})
where {0} is replaced with the table name and [1} with the field definitions. |
abstract void |
setDBByte(int i,
java.sql.PreparedStatement stmt,
byte[] bytes)
Set byte array in database |
abstract void |
setDBText(int i,
java.sql.PreparedStatement stmt,
java.lang.String body)
Set text array in database |
void |
setFieldNameMap(java.util.Map fieldmap)
Sets the mapping of MMBase fieldnames (typically reserved words) to database fieldnames. |
void |
setForeignKeyScheme(java.lang.String scheme)
Sets the scheme (SQL command) to use for creating a foreign key An acceptable scheme is: {0} {1} NOT NULL, FOREIGN KEY {0} ({0}) REFERENCES {2} (number)
where {0} and [1} are replaced with the field name and type definition,
and {2} is the table referenced. |
void |
setKeyScheme(java.lang.String scheme)
Sets the scheme (SQL command) to use for creating a key An acceptable scheme is: {0} {1} NOT NULL, UNIQUE ({0})
where {0} and [1} are replaced with the field name and type definition. |
void |
setMaxDropSize(int value)
Sets the maximum table drop size. |
void |
setNotNullScheme(java.lang.String scheme)
Sets the scheme (SQL command) to use for creating a non-null field An acceptable scheme is: {0} {1} NOT NULL
where {0} and [1} are replaced with the field name and type definition. |
void |
setPrimaryKeyScheme(java.lang.String scheme)
Sets the scheme (SQL command) to use for creating a primary key. |
void |
setStoreBinaryAsFile(boolean value)
Sets whether binary objects are stored as files (rather than in the database) |
void |
setTypeMap(java.util.Map typeMap)
Sets the type map. |
abstract boolean |
setValuePreparedStatement(java.sql.PreparedStatement stmt,
MMObjectNode node,
java.lang.String key,
int i)
Set a prepared statement field i with value of key from the given node. |
abstract int |
size(MMObjectBuilder builder)
Return number of objects in a builder |
abstract boolean |
supportsExtendedTables()
Returns whether this storage layer supports extended tables. |
abstract boolean |
supportsRollback()
Returns whether rollback on storage level is supported. |
protected abstract java.lang.String |
updateSQL(java.lang.String tableName,
java.lang.String setFields,
int number)
Returns the SQL command to use for updating an object in a table. |
abstract boolean |
updateStorage(MMObjectBuilder builder)
Changes the storage of a builder to match its new configuration. |
| Methods inherited from class org.mmbase.storage.database.Support2Storage |
commit, createObjectTable, decodeDBnodeField, decodeDBnodeField, getAllowedField, getBytes, getConnection, getDBByte, getDBKey, getDBText, getDisallowedField, getMMNodeSearch2SQL, getOTypeString, getOwnerString, getShortedByte, getShortedText, getText, insert, readBytesFromFile, removeNode, updateTable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mmbase.module.database.support.MMJdbc2NodeInterface |
created |
| Field Detail |
protected MMBase mmb
| Constructor Detail |
protected AbstractDatabaseStorage()
| Method Detail |
public void init(MMBase mmb,
XMLDatabaseReader document)
init in interface DatabaseStoragemmb - the MBase instance that uses this database layerdocument - the database configuration documentpublic void deployDatabaseDocument(XMLDatabaseReader document)
deployDatabaseDocument in interface DatabaseStoragedocument - the database configuration documentpublic boolean getStoreBinaryAsFile()
getStoreBinaryAsFile in interface DatabaseStoragegetStoreBinaryAsFile in class Support2Storagepublic void setStoreBinaryAsFile(boolean value)
setStoreBinaryAsFile in interface DatabaseStoragevalue - if true, binary objects will be stored as filespublic java.lang.String getBinaryFilePath()
getStoreBinaryAsFile() returns true.getBinaryFilePath in interface DatabaseStoragegetBinaryFilePath in class Support2Storagepublic void setBinaryFilePath(java.lang.String path)
getStoreBinaryAsFile() returns true.setBinaryFilePath in interface DatabaseStoragepath - the file pathpublic void setFieldNameMap(java.util.Map fieldmap)
setFieldNameMap in interface DatabaseStoragefieldmap - Map of field mappings. The map contins a key value pairs where the key is
the MMbase fieldname, and the value the replacement acceptable to the database.public java.util.Map getFieldNameMap()
setFieldNameMap(java.util.Map).getFieldNameMap in interface DatabaseStoragepublic void setTypeMap(java.util.Map typeMap)
setTypeMap in interface DatabaseStoragetypemap - Map of MMBase types and their database type.public java.util.Map getTypeMap()
setTypeMap(java.util.Map).
However, the individual map elements are not copies - changing the dTypeInfo objects wil
affect the database layer directly.getTypeMap in interface DatabaseStoragepublic void setPrimaryKeyScheme(java.lang.String scheme)
{0} {1} NOT NULL, PRIMARY KEY ({0})
where {0} and [1} are replaced with the field name and type definition.setPrimaryKeyScheme in interface DatabaseStoragescheme - the scheme to usepublic java.lang.String getPrimaryKeyScheme()
getPrimaryKeyScheme in interface DatabaseStoragepublic void setNotNullScheme(java.lang.String scheme)
{0} {1} NOT NULL
where {0} and [1} are replaced with the field name and type definition.setNotNullScheme in interface DatabaseStoragescheme - the scheme to usepublic java.lang.String getNotNullScheme()
getNotNullScheme in interface DatabaseStoragepublic void setKeyScheme(java.lang.String scheme)
{0} {1} NOT NULL, UNIQUE ({0})
where {0} and [1} are replaced with the field name and type definition.setKeyScheme in interface DatabaseStoragescheme - the scheme to usepublic java.lang.String getKeyScheme()
getKeyScheme in interface DatabaseStoragepublic void setForeignKeyScheme(java.lang.String scheme)
{0} {1} NOT NULL, FOREIGN KEY {0} ({0}) REFERENCES {2} (number)
where {0} and [1} are replaced with the field name and type definition,
and {2} is the table referenced.setForeignKeyScheme in interface DatabaseStoragescheme - the scheme to usepublic java.lang.String getForeignKeyScheme()
getForeignKeyScheme in interface DatabaseStoragepublic void setCreateScheme(java.lang.String scheme)
CREATE TABLE {0} ({1})
where {0} is replaced with the table name and [1} with the field definitions.setCreateScheme in interface DatabaseStoragescheme - the scheme to usepublic java.lang.String getCreateScheme()
getCreateScheme in interface DatabaseStoragepublic void setCreateExtendedScheme(java.lang.String scheme)
CREATE TABLE {0} ({1}) EXTENDS ({2})
where {0} is replaced with the table name, [1} with the field definitions,
and {2} with teh parent table namesetCreateExtendedScheme in interface DatabaseStoragescheme - the scheme to usepublic java.lang.String getCreateExtendedScheme()
getCreateExtendedScheme in interface DatabaseStoragepublic void setMaxDropSize(int value)
setMaxDropSize in interface DatabaseStoragevalue - the maximum size to setpublic int getMaxDropSize()
getMaxDropSize in interface DatabaseStoragepublic abstract boolean supportsExtendedTables()
supportsExtendedTables in interface DatabaseStorageprotected java.lang.String getFullTableName(java.lang.String tableName)
getFullTableName in class Support2StoragetableName - the table name to expand
protected java.lang.String applyScheme(java.lang.String scheme,
java.lang.String a1,
java.lang.String a2,
java.lang.String a3)
scheme - the scheme to applya1 - the first parameter to substitute in the schemea2 - the second parameter to substitute in the schemea3 - the third parameter to substitute in the scheme
protected java.lang.String applyPrimaryKeyScheme(java.lang.String fieldName,
java.lang.String fieldType)
fieldName - the database fieldnamefieldType - the database field type defintition
protected java.lang.String applyNotNullScheme(java.lang.String fieldName,
java.lang.String fieldType)
fieldName - the database fieldnamefieldType - the database field type defintition
protected java.lang.String applyKeyScheme(java.lang.String fieldName,
java.lang.String fieldType,
java.lang.String indexName)
fieldName - the database fieldnamefieldType - the database field type defintitionindexName - the name for the index
protected java.lang.String applyForeignKeyScheme(java.lang.String fieldName,
java.lang.String fieldType,
java.lang.String reference)
fieldName - the database fieldnamefieldType - the database field type defintitionreference - the name of the table refrenced
protected java.lang.String applyCreateScheme(java.lang.String tableName,
java.lang.String fieldDefinitions,
java.lang.String parentTableName)
tableName - the table to createfieldDefinitions - comma separated list of field definitionsparentTableName - the parent table (only used in OO databases)
protected java.lang.String createSQL(java.lang.String tableName,
java.lang.String fields)
tableName - the name of the table to createfields - the definitions of the fields
protected abstract java.lang.String createSQL(java.lang.String tableName,
java.lang.String fields,
java.lang.String parentTableName,
java.lang.String parentFields)
tableName - the name of the table to createfields - the definitions of the fieldsparentTableName - the name of the parent table. this value is null if
the table to be created has no parent table. The table is assumed to exist.parentFields - the definitions of the fields of the parent table (for use by relational databases)
protected abstract java.lang.String insertSQL(java.lang.String tableName,
java.lang.String fieldNames,
java.lang.String fieldValues)
tableName - the name of the table where to insertfieldNames - the names of the fields to insertfieldValues - the values (generally '?' tokens that will be replaced) of the fields to insert
protected abstract java.lang.String updateSQL(java.lang.String tableName,
java.lang.String setFields,
int number)
tableName - the name of the table where to updatesetfields - the set-commands for the table fields, generally of the format 'field1=?, field2=? ...'number - the number of the object to update
protected abstract java.lang.String deleteSQL(java.lang.String tableName,
int number)
tableName - the name of the table where to deletenumber - the number of the object to delete
protected java.lang.String selectSQL(java.lang.String tableName,
java.lang.String fieldNames,
int number)
tableName - the name of the table where to updatefieldNames - commaseparated list of fieldnames to retrieve, can be null (retrieve all fields)number - the number of the object to update
protected java.lang.String selectSQL(java.lang.String tableName,
java.lang.String fieldNames)
tableName - the name of the table where to updatefieldNames - commaseparated list of fieldnames to retrieve, can be null (retrieve all fields)
protected java.lang.String selectSQL(java.lang.String tableName,
java.lang.String fieldNames,
java.lang.String where,
java.lang.String orderby)
tableName - the name of the table where to updatefieldNames - commaseparated list of fieldnames to retrieve, can be null (retrieve all fields)where - constraints, can be null (no constraints)orderby - optional fields to order by, can be null (no order)
protected abstract java.lang.String selectSQL(java.lang.String tableName,
java.lang.String fieldNames,
java.lang.String where,
java.lang.String orderby,
int offset,
int max)
tableName - the name of the table where to updatefieldNames - commaseparated list of fieldnames to retrieve, can be null (retrieve all fields)where - constraints, can be null (no constraints)orderby - optional fields to order by, can be null (no order)offset - offset from where to select records. Note: if you specify an offset larger than 0, you have to specify maxmax - maximum number of records, can be -1 (no max)
protected java.lang.String constructFieldDefinition(MMObjectBuilder builder,
FieldDefs field)
builder - the fields builderfield - the FieldDefs object to make a create definition for
protected java.lang.String matchType(int type,
int size)
type - the MMBase typesize - the desired size (or -1 if unspecifed)
protected java.lang.String constructFieldDefinition(java.lang.String tablename,
java.lang.String fieldname,
int type,
int size,
int keyType)
tablename - name of the table this field belongs tofieldname - name of the field in MMBasetype - MMBase type of the fieldsize - size of the field (or -1 if n.a.)keyType - one of KEY_NONE, KEY_PRIMARY, KEY_SECONDARY, KEY_FOREIGN, KEY_NOTNULLpublic java.lang.String mapToTableFieldName(java.lang.String fieldname)
mapToTableFieldName in interface DatabaseStoragemapToTableFieldName in class Support2Storagefieldname - the fieldname to mappublic java.lang.String mapToMMBaseFieldName(java.lang.String fieldname)
mapToMMBaseFieldName in interface DatabaseStoragemapToMMBaseFieldName in class Support2Storagefieldname - the fieldname to mappublic java.lang.String getNumberString()
public abstract boolean isAllowedParentBuilder(MMObjectBuilder builder)
isAllowedParentBuilder in interface Storagebuilder - the builder to test
public void registerParentBuilder(MMObjectBuilder parent,
MMObjectBuilder child)
throws UnsupportedDatabaseOperationException
registerParentBuilder in interface Storageparent - the parent builder to registerchild - the builder to register as the parent's childUnsupportedDatabaseOperationException - when the database layer does not allow extension of this builder
public abstract void loadFieldFromTable(MMObjectNode node,
java.lang.String fieldname,
java.sql.ResultSet rs,
int i)
loadFieldFromTable in interface DatabaseStorageloadFieldFromTable in class Support2Storagenode - the node to store the field infieldname - the name of the field as it is known to MMBasers - the ResultSet containing the table rowi - the index of the field in the ResultSet
public abstract java.lang.String getText(MMObjectNode node,
java.lang.String fieldname)
getText in interface Storageorg.mmbase.storage.Storagenode - the node to retrieve the text fromfieldname - the name of the field to retrieve
public abstract byte[] getBytes(MMObjectNode node,
java.lang.String fieldname)
getBytes in interface Storageorg.mmbase.storage.Storagenode - the node to retrieve the byte array fromfieldname - the name of the field to retrieve
public abstract boolean setValuePreparedStatement(java.sql.PreparedStatement stmt,
MMObjectNode node,
java.lang.String key,
int i)
throws java.sql.SQLException
setValuePreparedStatement in interface DatabaseStoragejava.sql.SQLException - if an error occurred while filling in the fieldspublic JDBCInterface getJDBC()
getJDBC in interface DatabaseStoragepublic abstract boolean supportsRollback()
supportsRollback in interface Storage
public Transaction createTransaction()
throws StorageException
createTransaction in interface StorageStorageException - if an error occurred when creating the transaction
public DatabaseTransaction createDatabaseTransaction()
throws StorageException
StorageException - if an error occurred when creating the transaction
public DatabaseTransaction createDatabaseTransaction(boolean useRollback)
throws StorageException
useRollback - if true, the transaction should use rollback facilities if the database supports themStorageException - if an error occurred when creating the transaction
public void registerChanged(MMObjectNode node,
java.lang.String change)
registerChanged in interface DatabaseStoragenode - the node to registerchange - the type of change: "n": new, "c": commit, "d": delete
public abstract void setDBText(int i,
java.sql.PreparedStatement stmt,
java.lang.String body)
public abstract void setDBByte(int i,
java.sql.PreparedStatement stmt,
byte[] bytes)
public int createKey()
createKey in interface StoragecreateKey in class Support2Storage
public abstract int createKey(Transaction trans)
throws StorageException
createKey in interface Storagetrans - the transaction to use for obtaining the keyStorageException - if an error occurred while obtaining the keypublic int insert(MMObjectNode node)
insert in interface Storageinsert in class Support2Storagenode - The node to insert
public abstract int insert(MMObjectNode node,
Transaction trans)
throws StorageException
insert in interface Storagenode - The node to inserttrans - the transaction to perform the insert inStorageException - if an error occurred during insertpublic boolean commit(MMObjectNode node)
commit in interface Storagecommit in class Support2Storagebuilder - the builder to commit the node to. This can be a parentbuilder of the node's actual buildernode - The node to commit
public abstract boolean commit(MMObjectNode node,
Transaction trans)
throws StorageException
commit in interface Storagebuilder - the builder to commit the node to. This can be a parentbuilder of the node's actual buildernode - The node to committrans - the transaction to perform the insert inStorageException - if an error occurred during commitpublic boolean delete(MMObjectNode node)
delete in interface Storagedelete in class Support2Storagenode - The node to delete
public abstract boolean delete(MMObjectNode node,
Transaction trans)
throws StorageException
delete in interface Storagenode - The node to deletetrans - the transaction to perform the insert inStorageException - if an error occurred during delete
public MMObjectNode getNode(MMObjectBuilder builder,
int number)
getNode in interface Storagebuilder - The builder to select fromnumber - the number of the node
public abstract MMObjectNode getNode(MMObjectBuilder builder,
int number,
Transaction trans)
throws StorageException
getNode in interface Storagebuilder - The builder to select fromnumber - the number of the nodetrans - the transaction to perform the insert inStorageException - if an error occurred during selectionpublic int getNodeType(int number)
getNodeType in interface Storagenumber - the number of the node
public abstract int getNodeType(int number,
Transaction trans)
throws StorageException
getNodeType in interface Storagenumber - the number of the nodetrans - the transaction to perform the insert inStorageException - if an error occurred during selectionpublic boolean create(MMObjectBuilder builder)
create in interface Storagebuilder - the builder to create the table for\
public abstract boolean create(MMObjectBuilder builder,
Transaction trans)
throws StorageException
create in interface Storagebuilder - the builder to create the table for\trans - the transaction to perform the insert inStorageException - if an error occurred during createpublic boolean createObjectStorage()
createObjectStorage in interface StoragecreateObjectStorage in class Support2Storage
public abstract boolean createObjectStorage(Transaction trans)
throws StorageException
createObjectStorage in interface Storagetrans - the transaction to perform the insert inStorageException - if an error occurred during craetepublic abstract boolean created(MMObjectBuilder builder)
created in interface Storagebuilder - the builder to checkpublic abstract int size(MMObjectBuilder builder)
size in interface Storagebuilder - the builder whose objects to countpublic abstract boolean drop(MMObjectBuilder builder)
drop in interface Storagebuilder - the builder whose table to drop
public abstract boolean addField(MMObjectBuilder builder,
java.lang.String fieldname)
addField in interface Storagebuilder - the builder whose table to changefieldname - the name fo the field to add
public abstract boolean removeField(MMObjectBuilder builder,
java.lang.String fieldname)
removeField in interface Storagebuilder - the builder whose table to changefieldname - the name fo the field to delete
public abstract boolean changeField(MMObjectBuilder builder,
java.lang.String fieldname)
changeField in interface Storagebuilder - the builder whose table to changefieldname - the name fo the field to changepublic abstract boolean updateStorage(MMObjectBuilder builder)
updateStorage in interface StorageupdateStorage in class Support2Storagebuilder - the builder whose table to change
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||