org.mmbase.module.database.support
Interface MMJdbc2NodeInterface

All Superinterfaces:
SearchQueryHandler
All Known Implementing Classes:
JDBC2NodeWrapper, MMInformix42Node, MMMckoiNode, MMMysql42Node, MMOORel2Node, MMOracle, MMPostgres42Node, MMSQL92Node, PostgreSQL, RelationalDatabaseStorage, Sql92SingleFields, Sql92WithViews, Support2Storage

Deprecated. This code is scheduled for removal once MMBase has been fully converted to the new StorageManager implementation.

public interface MMJdbc2NodeInterface
extends SearchQueryHandler

MMJdbc2NodeInterface interface needs to be implemented to support a new database It is used to abstract the query's needed for mmbase for each database.

Version:
$Id: MMJdbc2NodeInterface.java,v 1.26.2.1 2004/07/23 08:54:23 pierre Exp $
Author:
Vpro, Pierre van Rooden

Field Summary
 
Fields inherited from interface org.mmbase.storage.search.SearchQueryHandler
FEATURE_MAX_NUMBER, FEATURE_OFFSET, SUPPORT_NONE, SUPPORT_NORMAL, SUPPORT_OPTIMAL, SUPPORT_WEAK
 
Method Summary
 boolean addField(MMObjectBuilder bul, java.lang.String dbname)
          Deprecated.  
 boolean changeField(MMObjectBuilder bul, java.lang.String dbname)
          Deprecated.  
 boolean commit(MMObjectBuilder bul, MMObjectNode node)
          Deprecated.  
 boolean create(MMObjectBuilder bul)
          Deprecated.  
 boolean created(java.lang.String tableName)
          Deprecated. Tells if a table already exists
 boolean createObjectTable(java.lang.String baseName)
          Deprecated.  
 MMObjectNode decodeDBnodeField(MMObjectNode node, java.lang.String fieldName, java.sql.ResultSet resultSet, int i)
          Deprecated. Sets the value of the field with name 'fieldName' in the node.
 MMObjectNode decodeDBnodeField(MMObjectNode node, java.lang.String fieldName, java.sql.ResultSet resultSet, int i, java.lang.String prefix)
          Deprecated.  
 boolean drop(MMObjectBuilder bul)
          Deprecated.  
 java.lang.String getAllowedField(java.lang.String disallowedfield)
          Deprecated.  
 MultiConnection getConnection(JDBCInterface jdbc)
          Deprecated.  
 byte[] getDBByte(java.sql.ResultSet rs, int idx)
          Deprecated.  
 int getDBKey()
          Deprecated. Gives an unique number for a node to be inserted.
 java.lang.String getDBText(java.sql.ResultSet rs, int idx)
          Deprecated.  
 java.lang.String getDisallowedField(java.lang.String allowedfield)
          Deprecated.  
 java.lang.String getMMNodeSearch2SQL(java.lang.String where, MMObjectBuilder bul)
          Deprecated. Converts an MMNODE expression to an SQL expression.
 java.lang.String getNumberString()
          Deprecated.  
 java.lang.String getOTypeString()
          Deprecated.  
 java.lang.String getOwnerString()
          Deprecated.  
 byte[] getShortedByte(java.lang.String tableName, java.lang.String fieldname, int number)
          Deprecated.  
 java.lang.String getShortedText(java.lang.String tableName, java.lang.String fieldname, int number)
          Deprecated.  
 void init(MMBase mmb, XMLDatabaseReader parser)
          Deprecated.  
 int insert(MMObjectBuilder bul, java.lang.String owner, MMObjectNode node)
          Deprecated.  
 boolean isAllowedParentBuilder(MMObjectBuilder builder)
          Deprecated. Returns whether this database support layer allows for buidler to be a parent builder (that is, other builders can 'extend' this builder and its database tables).
 void registerParentBuilder(MMObjectBuilder parent, MMObjectBuilder child)
          Deprecated. Registers a builder as a parent builder (that is, other buidlers can 'extend' this builder and its database tables).
 boolean removeField(MMObjectBuilder bul, java.lang.String dbname)
          Deprecated.  
 void removeNode(MMObjectBuilder bul, MMObjectNode node)
          Deprecated.  
 void setDBByte(int i, java.sql.PreparedStatement stmt, byte[] bytes)
          Deprecated.  
 boolean updateTable(MMObjectBuilder bul)
          Deprecated.  
 
Methods inherited from interface org.mmbase.storage.search.SearchQueryHandler
getNodes, getSupportLevel, getSupportLevel
 

Method Detail

isAllowedParentBuilder

public boolean isAllowedParentBuilder(MMObjectBuilder builder)
Deprecated. 
Returns whether this database support layer allows for buidler to be a parent builder (that is, other builders can 'extend' this builder and its database tables).

Parameters:
builder - the builder to test
Returns:
true if the builder can be extended
Since:
MMBase-1.6

registerParentBuilder

public void registerParentBuilder(MMObjectBuilder parent,
                                  MMObjectBuilder child)
                           throws StorageException
Deprecated. 
Registers a builder as a parent builder (that is, other buidlers can 'extend' this builder and its database tables). At the least, this code should check whether the builder is allowed as a parent builder, and throw an exception if this is not possible. This method can be overridden to allow for optimization of code regarding such builders.

Parameters:
parent - the parent builder to register
child - the builder to register as the parent's child
Throws:
UnsupportedDatabaseOperationException - when the databse layer does not allow extension of this builder
StorageException
Since:
MMBase-1.6

decodeDBnodeField

public MMObjectNode decodeDBnodeField(MMObjectNode node,
                                      java.lang.String fieldName,
                                      java.sql.ResultSet resultSet,
                                      int i)
Deprecated. 
Sets the value of the field with name 'fieldName' in the node. Using the given database result set. The value of the field will be taken from the i-th collumn of the result set. Note: This method may attempt to map the provided 'database' fieldname to the MMBase name. In very specific cases, this may not have the desired result.

Parameters:
node - The node from which a field must be set
fieldName - The name of the field which must be set. This is expected to be the field as used by the database, not the field as used by MMBase.
resultSet - The resultset from which the value of the field must be obtained
i - The integer indicating from which position the value must be gotten from the resultSet record.

decodeDBnodeField

public MMObjectNode decodeDBnodeField(MMObjectNode node,
                                      java.lang.String fieldName,
                                      java.sql.ResultSet resultSet,
                                      int i,
                                      java.lang.String prefix)
Deprecated. 
Parameters:
prefix - When using cluster nodes, the key of the value map of the node must be prefixed (e.g. with 'news.')
See Also:
decodeDBnodeField(MMObjectNode, String, ResultSet, int)

getMMNodeSearch2SQL

public java.lang.String getMMNodeSearch2SQL(java.lang.String where,
                                            MMObjectBuilder bul)
Deprecated. 
Converts an MMNODE expression to an SQL expression. Returns the result as an SQL where-clause, but with the leading "WHERE " left out.

Parameters:
where - The MMNODE expression.
bul - The builder for the type of nodes that is queried.
Returns:
The SQL expression.
See Also:
MMObjectBuilder.convertMMNode2SQL(String)

getShortedText

public java.lang.String getShortedText(java.lang.String tableName,
                                       java.lang.String fieldname,
                                       int number)
Deprecated. 
Warning: No Java Documentation Available.

getShortedByte

public byte[] getShortedByte(java.lang.String tableName,
                             java.lang.String fieldname,
                             int number)
Deprecated. 
Warning: No Java Documentation Available.

getDBByte

public byte[] getDBByte(java.sql.ResultSet rs,
                        int idx)
Deprecated. 
Warning: No Java Documentation Available.

getDBText

public java.lang.String getDBText(java.sql.ResultSet rs,
                                  int idx)
Deprecated. 
Warning: No Java Documentation Available.

insert

public int insert(MMObjectBuilder bul,
                  java.lang.String owner,
                  MMObjectNode node)
Deprecated. 
Warning: No Java Documentation Available.

commit

public boolean commit(MMObjectBuilder bul,
                      MMObjectNode node)
Deprecated. 
Warning: No Java Documentation Available.

removeNode

public void removeNode(MMObjectBuilder bul,
                       MMObjectNode node)
Deprecated. 
Warning: No Java Documentation Available.

getDBKey

public int getDBKey()
Deprecated. 
Gives an unique number for a node to be inserted. This method should be implemneted to work with multiple mmbase instances working on the same storage.

Returns:
unique number

init

public void init(MMBase mmb,
                 XMLDatabaseReader parser)
Deprecated. 
Warning: No Java Documentation Available.

setDBByte

public void setDBByte(int i,
                      java.sql.PreparedStatement stmt,
                      byte[] bytes)
Deprecated. 
Warning: No Java Documentation Available.

created

public boolean created(java.lang.String tableName)
Deprecated. 
Tells if a table already exists

Returns:
true if table exists, false if table doesn't exists

create

public boolean create(MMObjectBuilder bul)
Deprecated. 
Warning: No Java Documentation Available.

createObjectTable

public boolean createObjectTable(java.lang.String baseName)
Deprecated. 
Warning: No Java Documentation Available.

getConnection

public MultiConnection getConnection(JDBCInterface jdbc)
                              throws java.sql.SQLException
Deprecated. 
Throws:
java.sql.SQLException
Warning: No Java Documentation Available.

getDisallowedField

public java.lang.String getDisallowedField(java.lang.String allowedfield)
Deprecated. 
Warning: No Java Documentation Available.

getAllowedField

public java.lang.String getAllowedField(java.lang.String disallowedfield)
Deprecated. 
Warning: No Java Documentation Available.

getNumberString

public java.lang.String getNumberString()
Deprecated. 
Warning: No Java Documentation Available.

getOwnerString

public java.lang.String getOwnerString()
Deprecated. 
Warning: No Java Documentation Available.

getOTypeString

public java.lang.String getOTypeString()
Deprecated. 
Warning: No Java Documentation Available.

drop

public boolean drop(MMObjectBuilder bul)
Deprecated. 
Warning: No Java Documentation Available.

updateTable

public boolean updateTable(MMObjectBuilder bul)
Deprecated. 
Warning: No Java Documentation Available.

addField

public boolean addField(MMObjectBuilder bul,
                        java.lang.String dbname)
Deprecated. 
Warning: No Java Documentation Available.

removeField

public boolean removeField(MMObjectBuilder bul,
                           java.lang.String dbname)
Deprecated. 
Warning: No Java Documentation Available.

changeField

public boolean changeField(MMObjectBuilder bul,
                           java.lang.String dbname)
Deprecated. 
Warning: No Java Documentation Available.


MMBase build 1.7.1.20041002