org.brains2b.sql.oracle
Class OracleDC

java.lang.Object
  |
  +--org.brains2b.sql.oracle.OracleDC
All Implemented Interfaces:
DataControl

public abstract class OracleDC
extends java.lang.Object
implements DataControl

Abstract class for OraceDataControl objects.

Implements the Object to hold, the Connection and the PreparedStatement to use but propagates all methods of the DataControl interface for concrete implementation

Adds an additional protected abstract method getObject(ResultSet) as a standardized method to create a data Object from a given ResultSet

Version:
0.1 [20-01-2002]
Author:
dennis@brains2b.nl
See Also:
DataControl

Field Summary
protected  java.sql.Connection mCon
           
protected  java.lang.Object mObj
           
protected  java.sql.PreparedStatement mPrep
           
 
Constructor Summary
OracleDC(java.sql.Connection con, java.lang.Object o)
          Constructor for OracleDC which sets the Connection to use for this DataControl and the Object on which it should operate.
 
Method Summary
protected abstract  java.lang.Object getObject(java.sql.ResultSet rs)
          Method getObject returns an instance of the Object this DataControl was intended to service by reading out the resultset and filling the methods of the object with the values of the individual fields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.brains2b.data.DataControl
deleteOnPk, insert, selectAll, selectFromCondition, selectOnParent, selectOnPk, updateOnPk
 

Field Detail

mObj

protected java.lang.Object mObj

mCon

protected java.sql.Connection mCon

mPrep

protected java.sql.PreparedStatement mPrep
Constructor Detail

OracleDC

public OracleDC(java.sql.Connection con,
                java.lang.Object o)
Constructor for OracleDC which sets the Connection to use for this DataControl and the Object on which it should operate.

Method Detail

getObject

protected abstract java.lang.Object getObject(java.sql.ResultSet rs)
                                       throws java.lang.Exception
Method getObject returns an instance of the Object this DataControl was intended to service by reading out the resultset and filling the methods of the object with the values of the individual fields

This function needs to be implemented to match the specific class definition of the return Object.

Parameters:
rs - ResultSet, Actually a specific position in the ResultSet representing a row in the table to be mapped to an instance of the Object
Returns:
Object, an instance of the Object with all it's particular members filled from the ResultSet row given through the parameter.
Throws:
Exception, - if a SqlException occures.
java.lang.Exception