Package oracle.xml.transviewer DBAccess - Oracle 9i

Syntax:

Description:

Maintains CLOB tables that can hold multiple XML and text documents. Each table is created using the statement: CREATE TABLE tablename FILENAME CHAR( 16) UNIQUE, FILEDATA CLOB) LOB(FILEDATA) STORE AS (DISABLE STORAGE IN ROW). Each XML (or text) document is stored as a row in the table and the FILENAME field holds a unique string that is used as a key to retrieve, update or delete the row. The document text is stored in the FILEDATA field that is a CLOB object. This CLOB tables are automatically maintained by the transviewer bean. The CLOB tables maintained by this class can be later used by the transviewer bean. The class creates and deletes CLOB tables, list a CLOB table content and also add, replace or delete text documents in this CLOB tables.

Constructors

DBAccess():

public DBAccess()

Methods

createBLOBTable(Connection, String):

public boolean createBLOBTable (java.sql.Connection con, java.lang.String tablename)

Create BLOB table

Parameters

con - - the Connection object tablename - - the table name

Returns

true if successfull

createXMLTable(Connection, String):

public boolean createXMLTable (java.sql.Connection con, java.lang.String tablename)

Create XML table

Parameters

con - - the Connection object tablename - - the table name

Returns

true if successfull

deleteBLOBName(Connection, String, String):

public boolean deleteBLOBName (java.sql.Connection con,java.lang.String tablename, java.lang.String xmlname)

Delete binary file from BLOB table

Parameters

con - - the Connection object tablename - - the table name xmlname - - the file name

Returns

true if successfull

deleteXMLName(Connection, String, String):

public boolean deleteXMLName (java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname)

Delete file from XML table

Parameters

con - - the Connection object tablename - - the table name xmlname - - the file name

Returns

true if successfull

dropBLOBTable(Connection, String):

public boolean dropBLOBTable (java.sql.Connection con,java.lang.String tablename)

Delete BLOB table

Parameters

con - - the Connection object tablename - - the table name

Returns

true if successfull

dropXMLTable(Connection, String):

public boolean dropXMLTable (java.sql.Connection con,java.lang.String tablename) Delete XML table

Parameters

con - - the Connection object tablename - - the table name

Returns

true if successfull

getBLOBData(Connection, String, String):

public byte[] getBLOBData (java.sql.Connection con,java.lang.String tablename, java.lang.String xmlname)

Retrieve binary file from BLOB table

Parameters

con - - the Connection object tablename - - the table name xmlname - - the file name

Returns

file as a byte array

getNameSize():

public int getNameSize() Returns the size of the field where the filename is kept.

Returns

filename size

getXMLData(Connection, String, String):

public java.lang.String getXMLData (java.sql.Connection con, java.lang.String tablename, java.lang.String xmlname) Retrieve text file from XML table

Parameters

con - - the Connection object tablename - - the table name xmlname - - the file name

Returns

file as a string

getXMLNames(Connection, String):

public java.lang.String[] getXMLNames (java.sql.Connection con, java.lang.String tablename)

Returns all file names in XML table

Parameters

con - - the Connection object tablename - - the table name

Returns

String array with all file names in this table

getXMLTableNames(Connection, String):

Gets all XML tables with names starting with a given string

Parameters

con - - the Connection object tablePrefix - - table prefix string

Returns: array of all XML tables that begin with tablePrefix

insertBLOBData(Connection, String, String, byte[]):

Inserts binary file as a row in BLOB table

Parameters

con - - the Connection object tablename - - the table name xmlname - - the file name xmldata - - byte array with file data

Returns

true if successfull

insertXMLData(Connection, String, String, String):

Inserts text file as a row in XML table

Parameters

con - - the Connection object tablename - - the table name xmlname - - the file name xmldata - - string with the file data

Returns

true if successfull

isXMLTable(Connection, String):

Check if the table is XML table.

Parameters

con - - the Connection object tableName - - the table name to test

Returns

true if this is XML table

replaceXMLData(Connection, String, String, String):

Replace text file as a row in XML table

Parameters

con - - the Connection object tablename - - the table name xmlname - - the file name xmldata - - string with the file data

Returns

true if successfull

xmlTableExists(Connection, String):

Checks if the XML table exists

Parameters

con - - the Connection object tablename - - the table name

Returns

true if the table exist


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 9i Topics