org.mmbase.module.database.support
Class MMOracle

java.lang.Object
  extended byorg.mmbase.module.database.support.BaseJdbc2Node
      extended byorg.mmbase.module.database.support.MMSQL92Node
          extended byorg.mmbase.module.database.support.MMOracle
All Implemented Interfaces:
MMJdbc2NodeInterface, SearchQueryHandler

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

public class MMOracle
extends MMSQL92Node
implements MMJdbc2NodeInterface

MMSQL92Node implements the MMJdbc2NodeInterface for sql92 types of database this is the class used to abstact the query's needed for mmbase for each database.

Version:
$Id: MMOracle.java,v 1.18.2.2 2004/06/16 08:30:18 michiel Exp $
Author:
Daniel Ockeloen, Pierre van Rooden

Field Summary
 java.lang.String name
          Deprecated.  
 
Fields inherited from interface org.mmbase.storage.search.SearchQueryHandler
FEATURE_MAX_NUMBER, FEATURE_OFFSET, SUPPORT_NONE, SUPPORT_NORMAL, SUPPORT_OPTIMAL, SUPPORT_WEAK
 
Constructor Summary
MMOracle()
          Deprecated.  
 
Method Summary
 boolean commit(MMObjectBuilder bul, MMObjectNode node)
          Deprecated. commit this node to the database
 java.lang.String convertXMLType(FieldDefs def)
          Deprecated.  
 boolean create_real(MMObjectBuilder bul, java.lang.String tableName)
          Deprecated. will be removed once the xml setup system is done
 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 rs, 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 rs, int i, java.lang.String prefix)
          Deprecated.  
 boolean drop_real(MMObjectBuilder bul, java.lang.String tableName)
          Deprecated. will be removed once the xml setup system is done
 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. get byte of a database blob
 int getDBKey()
          Deprecated. gives an unique number this method will work with multiple mmbases
 int getDBKeyOld()
          Deprecated. Get a new object key without using numberTable, that is, by getting the max number of mm_object.
 java.lang.String getDBText(java.sql.ResultSet rs, int idx)
          Deprecated. get text of a database blob
 java.lang.String getDisallowedField(java.lang.String allowedfield)
          Deprecated.  
 java.lang.String getMatchCREATE(java.lang.String tableName)
          Deprecated. gets the sytax of the create statement for current database.
 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.  
 java.util.Hashtable getReverseHash(java.util.Hashtable in)
          Deprecated.  
 byte[] getShortedByte(java.lang.String tableName, java.lang.String fieldname, int number)
          Deprecated. get byte of a database blob
 java.lang.String getShortedText(java.lang.String tableName, java.lang.String fieldname, int number)
          Deprecated. get text from blob
 void init(MMBase mmb, XMLDatabaseReader parser)
          Deprecated.  
 int insert_real(MMObjectBuilder bul, java.lang.String owner, MMObjectNode node, java.lang.String tableName)
          Deprecated.  
 int insert(MMObjectBuilder bul, java.lang.String owner, MMObjectNode node)
          Deprecated. Insert: This method inserts a new object, normally not used (only subtables are used) Only fields with DBState value = DBSTATE_PERSISTENT or DBSTATE_SYSTEM are inserted.
protected  java.lang.String matchType(int type, int size, boolean notnull)
          Deprecated.  
 java.lang.String parseFieldPart(java.lang.String fieldname, int dbtype, java.lang.String part)
          Deprecated.  
 void setDBByte(int i, java.sql.PreparedStatement stmt, byte[] bytes)
          Deprecated. set byte array in database
 void setDBText(int i, java.sql.PreparedStatement stmt, java.lang.String body)
          Deprecated. set text array in database
 int size(java.lang.String tableName)
          Deprecated. return number of entries consisting in given table
 boolean updateTable(MMObjectBuilder bul)
          Deprecated.  
 
Methods inherited from class org.mmbase.module.database.support.MMSQL92Node
addField, changeField, decodeStringField, isAllowedParentBuilder, registerParentBuilder, removeField, removeNode, tableSizeProtection
 
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.module.database.support.MMJdbc2NodeInterface
addField, changeField, isAllowedParentBuilder, registerParentBuilder, removeField, removeNode
 
Methods inherited from interface org.mmbase.storage.search.SearchQueryHandler
getNodes, getSupportLevel, getSupportLevel
 

Field Detail

name

public java.lang.String name
Deprecated. 
Constructor Detail

MMOracle

public MMOracle()
Deprecated. 
Method Detail

init

public void init(MMBase mmb,
                 XMLDatabaseReader parser)
Deprecated. 
Specified by:
init in interface MMJdbc2NodeInterface
Overrides:
init in class MMSQL92Node

decodeDBnodeField

public MMObjectNode decodeDBnodeField(MMObjectNode node,
                                      java.lang.String fieldname,
                                      java.sql.ResultSet rs,
                                      int i)
Deprecated. 
Description copied from interface: MMJdbc2NodeInterface
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.

Specified by:
decodeDBnodeField in interface MMJdbc2NodeInterface
Overrides:
decodeDBnodeField in class MMSQL92Node

decodeDBnodeField

public MMObjectNode decodeDBnodeField(MMObjectNode node,
                                      java.lang.String fieldname,
                                      java.sql.ResultSet rs,
                                      int i,
                                      java.lang.String prefix)
Deprecated. 
Specified by:
decodeDBnodeField in interface MMJdbc2NodeInterface
Overrides:
decodeDBnodeField in class MMSQL92Node

getMMNodeSearch2SQL

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

Specified by:
getMMNodeSearch2SQL in interface MMJdbc2NodeInterface
Overrides:
getMMNodeSearch2SQL in class MMSQL92Node

parseFieldPart

public java.lang.String parseFieldPart(java.lang.String fieldname,
                                       int dbtype,
                                       java.lang.String part)
Deprecated. 
Overrides:
parseFieldPart in class MMSQL92Node

getShortedText

public java.lang.String getShortedText(java.lang.String tableName,
                                       java.lang.String fieldname,
                                       int number)
Deprecated. 
get text from blob

Specified by:
getShortedText in interface MMJdbc2NodeInterface
Overrides:
getShortedText in class MMSQL92Node

getShortedByte

public byte[] getShortedByte(java.lang.String tableName,
                             java.lang.String fieldname,
                             int number)
Deprecated. 
get byte of a database blob

Specified by:
getShortedByte in interface MMJdbc2NodeInterface
Overrides:
getShortedByte in class MMSQL92Node

getDBByte

public byte[] getDBByte(java.sql.ResultSet rs,
                        int idx)
Deprecated. 
get byte of a database blob

Specified by:
getDBByte in interface MMJdbc2NodeInterface
Overrides:
getDBByte in class MMSQL92Node

getDBText

public java.lang.String getDBText(java.sql.ResultSet rs,
                                  int idx)
Deprecated. 
get text of a database blob

Specified by:
getDBText in interface MMJdbc2NodeInterface
Overrides:
getDBText in class MMSQL92Node

insert

public int insert(MMObjectBuilder bul,
                  java.lang.String owner,
                  MMObjectNode node)
Deprecated. 
Insert: This method inserts a new object, normally not used (only subtables are used) Only fields with DBState value = DBSTATE_PERSISTENT or DBSTATE_SYSTEM are inserted. Fields with DBstate values = DBSTATE_VIRTUAL or any other value are skipped.

Specified by:
insert in interface MMJdbc2NodeInterface
Overrides:
insert in class MMSQL92Node
Parameters:
bul - The MMObjectBuilder.
owner - The nodes' owner.
node - The current node that's to be inserted.
Returns:
The DBKey number for this node, or -1 if an error occurs.

insert_real

public int insert_real(MMObjectBuilder bul,
                       java.lang.String owner,
                       MMObjectNode node,
                       java.lang.String tableName)
Deprecated. 
Overrides:
insert_real in class MMSQL92Node

setDBText

public void setDBText(int i,
                      java.sql.PreparedStatement stmt,
                      java.lang.String body)
Deprecated. 
set text array in database

Overrides:
setDBText in class MMSQL92Node

setDBByte

public void setDBByte(int i,
                      java.sql.PreparedStatement stmt,
                      byte[] bytes)
Deprecated. 
set byte array in database

Specified by:
setDBByte in interface MMJdbc2NodeInterface
Overrides:
setDBByte in class MMSQL92Node

commit

public boolean commit(MMObjectBuilder bul,
                      MMObjectNode node)
Deprecated. 
commit this node to the database

Specified by:
commit in interface MMJdbc2NodeInterface
Overrides:
commit in class MMSQL92Node

getDBKey

public int getDBKey()
Deprecated. 
gives an unique number this method will work with multiple mmbases

Specified by:
getDBKey in interface MMJdbc2NodeInterface
Overrides:
getDBKey in class MMSQL92Node
Returns:
unique number

getDBKeyOld

public int getDBKeyOld()
Deprecated. 
Description copied from class: MMSQL92Node
Get a new object key without using numberTable, that is, by getting the max number of mm_object. If object table does not exist (yet), it returns 1. This is only used when creating the numberTable.

Overrides:
getDBKeyOld in class MMSQL92Node

created

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

Specified by:
created in interface MMJdbc2NodeInterface
Overrides:
created in class MMSQL92Node
Returns:
true if table exists

size

public int size(java.lang.String tableName)
Deprecated. 
return number of entries consisting in given table

Overrides:
size in class MMSQL92Node
Parameters:
tableName - the table that has to be counted
Returns:
the number of items the table has

create

public boolean create(MMObjectBuilder bul)
Deprecated. 
Specified by:
create in interface MMJdbc2NodeInterface
Overrides:
create in class MMSQL92Node

create_real

public boolean create_real(MMObjectBuilder bul,
                           java.lang.String tableName)
Deprecated. 
will be removed once the xml setup system is done

Overrides:
create_real in class MMSQL92Node

drop

public boolean drop(MMObjectBuilder bul)
Deprecated. 
Specified by:
drop in interface MMJdbc2NodeInterface
Overrides:
drop in class MMSQL92Node

drop_real

public boolean drop_real(MMObjectBuilder bul,
                         java.lang.String tableName)
Deprecated. 
will be removed once the xml setup system is done

Overrides:
drop_real in class MMSQL92Node

updateTable

public boolean updateTable(MMObjectBuilder bul)
Deprecated. 
Specified by:
updateTable in interface MMJdbc2NodeInterface
Overrides:
updateTable in class MMSQL92Node

createObjectTable

public boolean createObjectTable(java.lang.String baseName)
Deprecated. 
Specified by:
createObjectTable in interface MMJdbc2NodeInterface
Overrides:
createObjectTable in class MMSQL92Node

convertXMLType

public java.lang.String convertXMLType(FieldDefs def)
Deprecated. 
Overrides:
convertXMLType in class MMSQL92Node

matchType

protected java.lang.String matchType(int type,
                                     int size,
                                     boolean notnull)
Deprecated. 
Overrides:
matchType in class MMSQL92Node

getMatchCREATE

public java.lang.String getMatchCREATE(java.lang.String tableName)
Deprecated. 
gets the sytax of the create statement for current database.

Overrides:
getMatchCREATE in class MMSQL92Node

getReverseHash

public java.util.Hashtable getReverseHash(java.util.Hashtable in)
Deprecated. 
Overrides:
getReverseHash in class MMSQL92Node

getDisallowedField

public java.lang.String getDisallowedField(java.lang.String allowedfield)
Deprecated. 
Specified by:
getDisallowedField in interface MMJdbc2NodeInterface
Overrides:
getDisallowedField in class MMSQL92Node

getAllowedField

public java.lang.String getAllowedField(java.lang.String disallowedfield)
Deprecated. 
Specified by:
getAllowedField in interface MMJdbc2NodeInterface
Overrides:
getAllowedField in class MMSQL92Node

getConnection

public MultiConnection getConnection(JDBCInterface jdbc)
                              throws java.sql.SQLException
Deprecated. 
Specified by:
getConnection in interface MMJdbc2NodeInterface
Overrides:
getConnection in class MMSQL92Node
Throws:
java.sql.SQLException

getNumberString

public java.lang.String getNumberString()
Deprecated. 
Specified by:
getNumberString in interface MMJdbc2NodeInterface
Overrides:
getNumberString in class MMSQL92Node

getOTypeString

public java.lang.String getOTypeString()
Deprecated. 
Specified by:
getOTypeString in interface MMJdbc2NodeInterface
Overrides:
getOTypeString in class MMSQL92Node

getOwnerString

public java.lang.String getOwnerString()
Deprecated. 
Specified by:
getOwnerString in interface MMJdbc2NodeInterface
Overrides:
getOwnerString in class MMSQL92Node


MMBase build 1.7.1.20041002