|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.module.database.support.BaseJdbc2Node
org.mmbase.storage.database.Support2Storage
org.mmbase.storage.database.AbstractDatabaseStorage
org.mmbase.storage.database.SQL92DatabaseStorage
org.mmbase.storage.database.RelationalDatabaseStorage
RelationalDatabaseStorage implements the DatabaseStorage interface and the MMJdbc2NodeInterface for Ansi SQL 92 relational databases. This class extends AbstractDatabaseStorage to include methods for retrieving data from a relational database systems. It overrides the various update methods to allow for recursive updates on parent tables, the methods for storing and retrieving huge texts and bytefields, and teh methods for determining database key (for the object 'number' field).
| Field Summary |
| Fields inherited from class org.mmbase.storage.database.AbstractDatabaseStorage |
mmb |
| Fields inherited from interface org.mmbase.storage.database.DatabaseStorage |
KEY_FOREIGN, KEY_NONE, KEY_NOTNULL, KEY_PRIMARY, KEY_SECONDARY |
| Fields inherited from interface org.mmbase.storage.search.SearchQueryHandler |
FEATURE_MAX_NUMBER, FEATURE_OFFSET, SUPPORT_NONE, SUPPORT_NORMAL, SUPPORT_OPTIMAL, SUPPORT_WEAK |
| Constructor Summary | |
RelationalDatabaseStorage()
Deprecated. Constructs the Ansi SQL database layer support class |
|
| Method Summary | |
protected boolean |
commitObjectTable(MMObjectNode node,
DatabaseTransaction trans)
Deprecated. Commit this node to the object table. |
boolean |
commitToTable(MMObjectBuilder builder,
MMObjectNode node,
DatabaseTransaction trans)
Deprecated. Commit this node to the specified builder table. |
int |
createKey(Transaction trans)
Deprecated. Gives an unique number for a node to be inserted. |
boolean |
deleteFromTable(MMObjectBuilder builder,
MMObjectNode node,
DatabaseTransaction trans)
Deprecated. Remove a node from the specified builder table. |
protected boolean |
deleteObjectTable(MMObjectNode node,
DatabaseTransaction trans)
Deprecated. Remove a node from the object table. |
java.lang.String |
getText(java.lang.String tableName,
java.lang.String fieldName,
int number)
Deprecated. Get text from blob |
int |
insertIntoTable(MMObjectBuilder builder,
MMObjectNode node,
DatabaseTransaction trans)
Deprecated. This method inserts a new object in a specified builder table. |
protected int |
insertObjectTable(MMObjectNode node,
DatabaseTransaction trans)
Deprecated. This method inserts a new object in the object table. |
protected void |
prepare()
Deprecated. Prepares the database layer. |
boolean |
supportsExtendedTables()
Deprecated. Returns whether this storage layer supports extended tables. |
| Methods inherited from class org.mmbase.storage.database.SQL92DatabaseStorage |
addField, applyCreateScheme, changeField, commit, create, created, created, createObjectStorage, createSQL, delete, deleteSQL, drop, dropSQL, getBinaryFile, getBytes, getFieldsOrderCreate, getNode, getNodeType, getParentBuilder, getParentTableName, getText, init, insert, insertSQL, isAllowedParentBuilder, isParentField, loadExistingTables, loadFieldFromTable, loadSupportInformation, readBytesFromFile, removeField, selectSQL, setValuePreparedStatement, size, size, supportsRollback, updateSQL, updateStorage, writeBytesToFile |
| Methods inherited from class org.mmbase.storage.database.Support2Storage |
commit, createObjectTable, decodeDBnodeField, decodeDBnodeField, getAllowedField, getConnection, getDBKey, getDisallowedField, getMMNodeSearch2SQL, getOTypeString, getOwnerString, getShortedByte, getShortedText, insert, removeNode, updateTable |
| Methods inherited from class org.mmbase.module.database.support.BaseJdbc2Node |
getNodes, getSupportLevel, getSupportLevel, init |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mmbase.storage.Storage |
addField, changeField, commit, commit, create, create, created, createKey, createObjectStorage, createObjectStorage, createTransaction, delete, delete, drop, getBytes, getNode, getNode, getNodeType, getNodeType, getText, insert, insert, isAllowedParentBuilder, registerParentBuilder, removeField, size, supportsRollback, updateStorage |
| Methods inherited from interface org.mmbase.storage.search.SearchQueryHandler |
getNodes, getSupportLevel, getSupportLevel |
| Methods inherited from interface org.mmbase.module.database.support.MMJdbc2NodeInterface |
addField, changeField, commit, create, created, createObjectTable, decodeDBnodeField, decodeDBnodeField, drop, getAllowedField, getConnection, getDBByte, getDBKey, getDBText, getDisallowedField, getMMNodeSearch2SQL, getNumberString, getOTypeString, getOwnerString, getShortedByte, getShortedText, init, insert, isAllowedParentBuilder, registerParentBuilder, removeField, removeNode, setDBByte, updateTable |
| Constructor Detail |
public RelationalDatabaseStorage()
| Method Detail |
public boolean supportsExtendedTables()
DatabaseStorage
supportsExtendedTables in interface DatabaseStoragesupportsExtendedTables in class AbstractDatabaseStorageprotected void prepare()
createKey(org.mmbase.storage.Transaction) method.
Override this method if you use a different way of generating keys,
or if you need to make other preparations for your database.
prepare in class SQL92DatabaseStorage
public java.lang.String getText(java.lang.String tableName,
java.lang.String fieldName,
int number)
getText in class SQL92DatabaseStorage
public int createKey(Transaction trans)
throws StorageException
Storage
createKey in interface StoragecreateKey in class AbstractDatabaseStoragetrans - the transaction to use for obtaining the key
StorageException - if an error occurred while obtaining the key
public int insertIntoTable(MMObjectBuilder builder,
MMObjectNode node,
DatabaseTransaction trans)
throws StorageException
insertIntoTable in class SQL92DatabaseStoragebuilder - the builder to store teh node in. This can be a parentbuilder of the node's actual buildernode - The node to inserttrans - the transaction to perform the insert in
StorageException - if an error occurred during insert
protected int insertObjectTable(MMObjectNode node,
DatabaseTransaction trans)
throws StorageException
SQL92DatabaseStorage.insert(org.mmbase.module.core.MMObjectNode, org.mmbase.storage.Transaction) to maintain consistency.
node - The node to inserttrans - the transaction to perform the insert in
StorageException - if an error occurred during insert
public boolean commitToTable(MMObjectBuilder builder,
MMObjectNode node,
DatabaseTransaction trans)
throws StorageException
commitToTable in class SQL92DatabaseStoragebuilder - the builder to commit the node to. This can be a parentbuilder of the node's actual buildernode - The node to inserttrans - the transaction to perform the insert in
StorageException - if an error occurred during commit
protected boolean commitObjectTable(MMObjectNode node,
DatabaseTransaction trans)
throws StorageException
node - The node to inserttrans - the transaction to perform the insert in
StorageException - if an error occurred during commit
public boolean deleteFromTable(MMObjectBuilder builder,
MMObjectNode node,
DatabaseTransaction trans)
throws StorageException
deleteFromTable in class SQL92DatabaseStoragebuilder - the builder to remove the node from. This can be a parentbuilder of the node's actual buildernode - The node to deletetrans - the transaction to perform the insert in
StorageException - if an error occurred during delete
protected boolean deleteObjectTable(MMObjectNode node,
DatabaseTransaction trans)
throws StorageException
node - The node to deletetrans - the transaction to perform the insert in
StorageException - if an error occurred during delete
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||