|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.storage.database.Support2Storage
Support2Storage implements a number of methods that allow a DatabaseStorage class to also implement the MMJdbc2NodeInterface, for backward compatibility. This code may become deprecated in the future.
| Fields inherited from interface org.mmbase.storage.database.DatabaseStorage |
KEY_FOREIGN, KEY_NONE, KEY_NOTNULL, KEY_PRIMARY, KEY_SECONDARY |
| Constructor Summary | |
protected |
Support2Storage()
Constructs the Support2Storage database layer support class |
| Method Summary | |
boolean |
commit(MMObjectBuilder builder,
MMObjectNode node)
Deprecated. use commit(org.mmbase.module.core.MMObjectNode) |
abstract boolean |
commit(MMObjectNode node)
Commit this node to the specified builder. |
abstract int |
createKey()
Gives an unique number for a node to be inserted. |
abstract boolean |
createObjectStorage()
Create the object storage (the storage where to register all objects). |
boolean |
createObjectTable(java.lang.String baseName)
Deprecated. use createObjectStorage() |
MMObjectNode |
decodeDBnodeField(MMObjectNode node,
java.lang.String fieldname,
java.sql.ResultSet rs,
int i)
Deprecated. use loadFieldFromTable(org.mmbase.module.core.MMObjectNode, java.lang.String, java.sql.ResultSet, int) |
MMObjectNode |
decodeDBnodeField(MMObjectNode node,
java.lang.String fieldname,
java.sql.ResultSet rs,
int i,
java.lang.String prefix)
Deprecated. use loadFieldFromTable(org.mmbase.module.core.MMObjectNode, java.lang.String, java.sql.ResultSet, int) |
abstract boolean |
delete(MMObjectNode node)
Delete a node |
java.lang.String |
getAllowedField(java.lang.String disallowedfield)
Deprecated. use mapToTableFieldName(java.lang.String) |
abstract java.lang.String |
getBinaryFilePath()
Returns the filepath where binary objects are stored. |
protected abstract byte[] |
getBytes(java.lang.String tableName,
java.lang.String fieldname,
int number)
Utility method, defined in AbstractDatabaseStorage |
MultiConnection |
getConnection(JDBCInterface jdbc)
Deprecated. Obsolete as the database should not connect to any other engine than the one loaded by the associated (known) MMBase instance. Use Storage.createTransaction() instead. |
abstract byte[] |
getDBByte(java.sql.ResultSet rs,
int idx)
Get byte of a database blob |
int |
getDBKey()
Deprecated. use createKey() |
abstract java.lang.String |
getDBText(java.sql.ResultSet rs,
int idx)
Get text of a database blob |
java.lang.String |
getDisallowedField(java.lang.String allowedfield)
Deprecated. use mapToMMBaseFieldName(java.lang.String) |
protected abstract java.lang.String |
getFullTableName(java.lang.String name)
Utility method, defined in AbstractDatabaseStorage |
java.lang.String |
getMMNodeSearch2SQL(java.lang.String where,
MMObjectBuilder builder)
Deprecated. This is not supported by this database layer, and only included due to the interface requirements. |
java.lang.String |
getOTypeString()
Maps the 'otype' fieldname to a fieldname acceptable to the database. |
java.lang.String |
getOwnerString()
Maps the 'owner' fieldname to a fieldname acceptable to the database. |
byte[] |
getShortedByte(java.lang.String tableName,
java.lang.String fieldname,
int number)
Deprecated. use getBytes(MMObjectNode,fieldname) |
java.lang.String |
getShortedText(java.lang.String tableName,
java.lang.String fieldname,
int number)
Deprecated. use getText(MMObjectNode,fieldname); |
abstract boolean |
getStoreBinaryAsFile()
Returns whether binary objects are stored as files (rather than in the database) |
protected abstract java.lang.String |
getText(java.lang.String tableName,
java.lang.String fieldname,
int number)
Utility method, defined in AbstractDatabaseStorage |
int |
insert(MMObjectBuilder builder,
java.lang.String owner,
MMObjectNode node)
Deprecated. use insert(org.mmbase.module.core.MMObjectNode) |
abstract int |
insert(MMObjectNode node)
This method inserts a new object, and registers the change. |
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. |
abstract java.lang.String |
mapToMMBaseFieldName(java.lang.String allowedfield)
Maps a database fieldname to a fieldname as used by the MMbase system |
abstract java.lang.String |
mapToTableFieldName(java.lang.String disallowedfield)
Maps a MMBase fieldname to a fieldname acceptable to the database |
protected abstract byte[] |
readBytesFromFile(java.lang.String path)
Utility method, defined in SQL92DatabaseStorage |
void |
removeNode(MMObjectBuilder builder,
MMObjectNode node)
Deprecated. use delete(org.mmbase.module.core.MMObjectNode) |
abstract boolean |
updateStorage(MMObjectBuilder builder)
Changes the storage of a builder to match its new configuration. |
boolean |
updateTable(MMObjectBuilder builder)
Deprecated. use updateStorage(org.mmbase.module.core.MMObjectBuilder) |
| 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.database.DatabaseStorage |
deployDatabaseDocument, getCreateExtendedScheme, getCreateScheme, getFieldNameMap, getForeignKeyScheme, getJDBC, getKeyScheme, getMaxDropSize, getNotNullScheme, getPrimaryKeyScheme, getTypeMap, init, registerChanged, setBinaryFilePath, setCreateExtendedScheme, setCreateScheme, setFieldNameMap, setForeignKeyScheme, setKeyScheme, setMaxDropSize, setNotNullScheme, setPrimaryKeyScheme, setStoreBinaryAsFile, setTypeMap, setValuePreparedStatement, supportsExtendedTables |
| Methods inherited from interface org.mmbase.storage.Storage |
addField, changeField, commit, create, create, created, createKey, createObjectStorage, createTransaction, delete, drop, getBytes, getNode, getNode, getNodeType, getNodeType, getText, insert, isAllowedParentBuilder, registerParentBuilder, removeField, size, supportsRollback |
| Methods inherited from interface org.mmbase.module.database.support.MMJdbc2NodeInterface |
addField, changeField, create, created, drop, getNumberString, init, isAllowedParentBuilder, registerParentBuilder, removeField, setDBByte |
| Constructor Detail |
protected Support2Storage()
| Method Detail |
protected abstract java.lang.String getFullTableName(java.lang.String name)
public abstract boolean getStoreBinaryAsFile()
DatabaseStoragegetStoreBinaryAsFile in interface DatabaseStorageorg.mmbase.storage.database.DatabaseStoragepublic abstract java.lang.String getBinaryFilePath()
DatabaseStorageDatabaseStorage.getStoreBinaryAsFile() returns true.getBinaryFilePath in interface DatabaseStorageorg.mmbase.storage.database.DatabaseStoragepublic abstract java.lang.String mapToMMBaseFieldName(java.lang.String allowedfield)
DatabaseStoragemapToMMBaseFieldName in interface DatabaseStorageorg.mmbase.storage.database.DatabaseStoragefieldname - the fieldname to mappublic abstract java.lang.String mapToTableFieldName(java.lang.String disallowedfield)
DatabaseStoragemapToTableFieldName in interface DatabaseStorageorg.mmbase.storage.database.DatabaseStoragefieldname - the fieldname to map
public abstract void loadFieldFromTable(MMObjectNode node,
java.lang.String fieldname,
java.sql.ResultSet rs,
int i)
DatabaseStorageloadFieldFromTable in interface DatabaseStorageorg.mmbase.storage.database.DatabaseStoragenode - 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
protected abstract java.lang.String getText(java.lang.String tableName,
java.lang.String fieldname,
int number)
protected abstract byte[] getBytes(java.lang.String tableName,
java.lang.String fieldname,
int number)
protected abstract byte[] readBytesFromFile(java.lang.String path)
public abstract int insert(MMObjectNode node)
Storageinsert in interface Storageorg.mmbase.storage.Storagenode - The node to insertpublic abstract boolean commit(MMObjectNode node)
Storagecommit in interface Storageorg.mmbase.storage.Storagenode - The node to commitpublic abstract boolean delete(MMObjectNode node)
Storagedelete in interface Storageorg.mmbase.storage.Storagenode - The node to deletetrue if succesfulpublic abstract boolean createObjectStorage()
StoragecreateObjectStorage in interface Storageorg.mmbase.storage.Storagepublic abstract int createKey()
StoragecreateKey in interface Storageorg.mmbase.storage.Storagepublic abstract boolean updateStorage(MMObjectBuilder builder)
StorageupdateStorage in interface Storageorg.mmbase.storage.Storagebuilder - the builder whose storage to changepublic java.lang.String getDisallowedField(java.lang.String allowedfield)
mapToMMBaseFieldName(java.lang.String)
getDisallowedField in interface MMJdbc2NodeInterfacefieldname - the fieldname to mappublic java.lang.String getAllowedField(java.lang.String disallowedfield)
mapToTableFieldName(java.lang.String)
getAllowedField in interface MMJdbc2NodeInterfacefieldname - the fieldname to mappublic java.lang.String getOTypeString()
getOTypeString in interface MMJdbc2NodeInterfacepublic java.lang.String getOwnerString()
getOwnerString in interface MMJdbc2NodeInterface
public MMObjectNode decodeDBnodeField(MMObjectNode node,
java.lang.String fieldname,
java.sql.ResultSet rs,
int i)
loadFieldFromTable(org.mmbase.module.core.MMObjectNode, java.lang.String, java.sql.ResultSet, int)
decodeDBnodeField in interface MMJdbc2NodeInterfacenode - the node to store the field infieldname - the name of the field as it is known in the ResultSetrs - the ResultSet containing the table rowi - the index of the field in the ResultSetloadFieldFromTable(MMObjectNode,String, ResultSet,int)
public MMObjectNode decodeDBnodeField(MMObjectNode node,
java.lang.String fieldname,
java.sql.ResultSet rs,
int i,
java.lang.String prefix)
loadFieldFromTable(org.mmbase.module.core.MMObjectNode, java.lang.String, java.sql.ResultSet, int)
decodeDBnodeField in interface MMJdbc2NodeInterfacenode - the node to store the field infieldname - the name of the field as it is known in the ResultSetrs - the ResultSet containing the table rowi - the index of the field in the ResultSetprefix - a prefix to use when determining the node's fieldname. used for clusternodes
public java.lang.String getMMNodeSearch2SQL(java.lang.String where,
MMObjectBuilder builder)
getMMNodeSearch2SQL in interface MMJdbc2NodeInterface
public java.lang.String getShortedText(java.lang.String tableName,
java.lang.String fieldname,
int number)
getShortedText in interface MMJdbc2NodeInterface
public byte[] getShortedByte(java.lang.String tableName,
java.lang.String fieldname,
int number)
getShortedByte in interface MMJdbc2NodeInterface
public MultiConnection getConnection(JDBCInterface jdbc)
throws java.sql.SQLException
Storage.createTransaction() instead.
getConnection in interface MMJdbc2NodeInterfacejdbc - the JDBC engineto usejava.sql.SQLException - if the connection could not be made
public int insert(MMObjectBuilder builder,
java.lang.String owner,
MMObjectNode node)
insert(org.mmbase.module.core.MMObjectNode)
insert in interface MMJdbc2NodeInterfaceowner - The nodes' owner. Ignorednode - The node to insert
public boolean commit(MMObjectBuilder builder,
MMObjectNode node)
commit(org.mmbase.module.core.MMObjectNode)
commit in interface MMJdbc2NodeInterfacebuilder - the builder to commit the node to. This can be a parentbuilder of the node's actual buildernode - The node to commit
public void removeNode(MMObjectBuilder builder,
MMObjectNode node)
delete(org.mmbase.module.core.MMObjectNode)
removeNode in interface MMJdbc2NodeInterfacebuilder - the builder to remove the node from. This can be a parentbuilder of the node's actual buildernode - The node to deletepublic boolean createObjectTable(java.lang.String baseName)
createObjectStorage()
createObjectTable in interface MMJdbc2NodeInterfacebaseName - the basename of the table to create. This parameter is already known and is ignored.public int getDBKey()
createKey()
getDBKey in interface MMJdbc2NodeInterfacepublic boolean updateTable(MMObjectBuilder builder)
updateStorage(org.mmbase.module.core.MMObjectBuilder)
updateTable in interface MMJdbc2NodeInterfacebuilder - the builder whose table to change
public abstract byte[] getDBByte(java.sql.ResultSet rs,
int idx)
getDBByte in interface MMJdbc2NodeInterface
public abstract java.lang.String getDBText(java.sql.ResultSet rs,
int idx)
getDBText in interface MMJdbc2NodeInterface
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||