Skip navigation links


com.essbase.eas.server
Class PersistentObjects

java.lang.Object
  extended by com.essbase.eas.server.PersistentObjects


public class PersistentObjects
extends java.lang.Object

Supports conversion of mid-tier database objects to XML representation. how to use this class for jdbc support: 1. user must first open jdbc cnx by calling: openCNX() 2. then execute the SQL via: getResultSet, getXML, getReplicationXML, modifyData 3. then close the jdbc cnx after all rows are processed via: closeCNX()

Version:
1.0.0, 06/06/2001 Created (based upon a version by PaintedWord)
Author:
Hung Vo

Field Summary
 java.sql.Connection con
           
 java.sql.PreparedStatement pstmt
           
 java.sql.ResultSet rs
           
 java.sql.Statement stmt
           

 

Constructor Summary
PersistentObjects()
           

 

Method Summary
 boolean bindInt(int index, int value)
           
 boolean bindString(int index, java.lang.String value)
           
 boolean bindTimestamp(int index, java.sql.Timestamp value)
           
 void closeCNX()
          closes result set, statement object, and jdbc cnx
 void commit()
           
 boolean createDB()
          create NEW DB.
 boolean createPreparedStmt(java.lang.String sql)
           
 boolean execPreparedStmt()
           
 boolean execSQL(java.lang.String sql)
           
 java.lang.String getReplicationXML(java.lang.String table, java.lang.String[] criterion, java.lang.String[] constraint)
          * Returns a replication object as a well-formed XML document.
 java.sql.ResultSet getResultSet(java.lang.String query)
           
 java.sql.ResultSet getResultSet(java.lang.String table, java.lang.String[] criterion, java.lang.String[] constraint)
          Returns a result set must call openCNX before and closeCNX after this call.
 java.lang.String getXML(java.lang.String table, java.lang.String[] criterion, java.lang.String[] constraint)
          * Returns a persistent object as a well-formed XML document.
static void main(java.lang.String[] args)
           
 boolean openCNX()
          opens a jdbc cnx and create a statement object.
 void parseNextNode(java.lang.Integer column, java.lang.Integer totalColumns, org.w3c.dom.Node oldNode, org.w3c.dom.Node newNode, java.lang.Integer generation, java.sql.ResultSet rs, java.sql.ResultSetMetaData rsmd, org.w3c.dom.Document document)
          * recursively build XML document hierarchy
 void setAutoCommit(boolean flag)
           
 boolean setData(java.lang.String table, java.lang.String[] column, java.lang.String[] arg, java.lang.String action)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

rs

public java.sql.ResultSet rs

con

public java.sql.Connection con

stmt

public java.sql.Statement stmt

pstmt

public java.sql.PreparedStatement pstmt

Constructor Detail

PersistentObjects

public PersistentObjects()

Method Detail

getXML

public java.lang.String getXML(java.lang.String table,
                               java.lang.String[] criterion,
                               java.lang.String[] constraint)
* Returns a persistent object as a well-formed XML document.

parseNextNode

public void parseNextNode(java.lang.Integer column,
                          java.lang.Integer totalColumns,
                          org.w3c.dom.Node oldNode,
                          org.w3c.dom.Node newNode,
                          java.lang.Integer generation,
                          java.sql.ResultSet rs,
                          java.sql.ResultSetMetaData rsmd,
                          org.w3c.dom.Document document)
* recursively build XML document hierarchy

getResultSet

public java.sql.ResultSet getResultSet(java.lang.String table,
                                       java.lang.String[] criterion,
                                       java.lang.String[] constraint)
Returns a result set must call openCNX before and closeCNX after this call.

getResultSet

public java.sql.ResultSet getResultSet(java.lang.String query)

getReplicationXML

public java.lang.String getReplicationXML(java.lang.String table,
                                          java.lang.String[] criterion,
                                          java.lang.String[] constraint)
* Returns a replication object as a well-formed XML document.

execSQL

public boolean execSQL(java.lang.String sql)

execPreparedStmt

public boolean execPreparedStmt()

setData

public boolean setData(java.lang.String table,
                       java.lang.String[] column,
                       java.lang.String[] arg,
                       java.lang.String action)

createPreparedStmt

public boolean createPreparedStmt(java.lang.String sql)

bindString

public boolean bindString(int index,
                          java.lang.String value)

bindInt

public boolean bindInt(int index,
                       int value)

bindTimestamp

public boolean bindTimestamp(int index,
                             java.sql.Timestamp value)

openCNX

public boolean openCNX()
opens a jdbc cnx and create a statement object.

createDB

public boolean createDB()
create NEW DB. this should only be used by initDB. log in as 'public' opens a jdbc cnx and create a statement object.

commit

public void commit()

setAutoCommit

public void setAutoCommit(boolean flag)

closeCNX

public void closeCNX()
closes result set, statement object, and jdbc cnx

main

public static void main(java.lang.String[] args)

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.