Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.jcorporate.expresso.core.dbobj
Class LOBSupport  view LOBSupport download LOBSupport.java

java.lang.Object
  extended bycom.jcorporate.expresso.core.dbobj.LOBSupport

Deprecated. since Expresso 5.3 the ways it worked on LOBs wasn't remotely efficient and has been replaced by the implementation in com.jcorporate.expresso. core.dataobjects.jdbc.LOBField

public class LOBSupport
extends java.lang.Object

Many databases support arbitrarily large objects. The problem with large objects is that their symantics are significantly different compared to other standard database fields. Specifically some highlighted differences are:

To support this, LOB Support is designed to provide several facilities to assist with this:

Delayed Loading: The LOBSupport class is activated by DBObjects only when a LOB data field's data is requested.

Separate command execution The LOBSupport executes a second statement to the database in the form of a PreparedStatement to retrieve all the Large Objects

Transaction usage IF supported If the JDBC driver indicates it supports transactions, LOBSupport will automatically attempt to setAutoCommit(false) and call explitic commit()s. If you are already within a transaction, LOBSupport will not attempt to get another transaction

Usage

Most often you would not use this class directly, but instead call the similar DBObject method calls. However, sometimes access to the lower level capabilities of these functions are useful for performance sake and therefore...

Since:
$DatabaseSchema $Date: 2004/11/17 20:48:11 $

Field Summary
private static org.apache.log4j.Logger log
          Deprecated.  
protected static LOBSupport theInstance
          Deprecated.  
 
Constructor Summary
protected LOBSupport()
          Deprecated. Default Constructor
 
Method Summary
protected  void finalizeUpdate(com.jcorporate.expresso.core.db.DBConnection theConnection)
          Deprecated.  
 byte[] getBLOB(DBObject baseObject, java.lang.String fieldName, com.jcorporate.expresso.core.db.DBConnection theConnection)
          Deprecated. Returns a single stream for a LOB object.
 java.lang.String getCLOB(DBObject baseObject, java.lang.String fieldName)
          Deprecated.  
 java.lang.String getCLOB(DBObject baseObject, java.lang.String fieldName, com.jcorporate.expresso.core.db.DBConnection theConnection)
          Deprecated. Retrieves the CLOB data for the specified DBObject and the specified fieldName
static LOBSupport getInstance()
          Deprecated. Singleton implementation.
protected  void prepSelectResultSet(DBObject baseObject, java.lang.String fieldName, com.jcorporate.expresso.core.db.DBConnection theConnection)
          Deprecated. Internal helper function that does the guts of the work
protected  java.sql.PreparedStatement prepUpdate(DBObject baseObject, java.lang.String fieldName, com.jcorporate.expresso.core.db.DBConnection theConnection)
          Deprecated. Internal helper function to prepare a LOB update
 void setBLOB(DBObject baseObject, java.lang.String fieldName, byte[] theData, com.jcorporate.expresso.core.db.DBConnection theConnection)
          Deprecated. Updates the underlying table with a BLOB object.
 void setBLOB(DBObject baseObject, java.lang.String fieldName, java.io.InputStream theData, int dataLength, com.jcorporate.expresso.core.db.DBConnection theConnection)
          Deprecated. Updates the underlying table with a BLOB object.
 void setCLOB(DBObject baseObject, java.lang.String fieldName, java.lang.String theData, com.jcorporate.expresso.core.db.DBConnection theConnection)
          Deprecated. Writes a LONG Character string to the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theInstance

protected static LOBSupport theInstance
Deprecated. 

log

private static org.apache.log4j.Logger log
Deprecated. 
Constructor Detail

LOBSupport

protected LOBSupport()
Deprecated. 
Default Constructor

Method Detail

getInstance

public static LOBSupport getInstance()
Deprecated. 
Singleton implementation. Use this to get to the LOB helper functions


getCLOB

public java.lang.String getCLOB(DBObject baseObject,
                                java.lang.String fieldName)
                         throws com.jcorporate.expresso.core.db.DBException
Deprecated. 

getCLOB

public java.lang.String getCLOB(DBObject baseObject,
                                java.lang.String fieldName,
                                com.jcorporate.expresso.core.db.DBConnection theConnection)
                         throws com.jcorporate.expresso.core.db.DBException
Deprecated. 
Retrieves the CLOB data for the specified DBObject and the specified fieldName


setCLOB

public void setCLOB(DBObject baseObject,
                    java.lang.String fieldName,
                    java.lang.String theData,
                    com.jcorporate.expresso.core.db.DBConnection theConnection)
             throws com.jcorporate.expresso.core.db.DBException
Deprecated. 
Writes a LONG Character string to the database.


getBLOB

public byte[] getBLOB(DBObject baseObject,
                      java.lang.String fieldName,
                      com.jcorporate.expresso.core.db.DBConnection theConnection)
               throws com.jcorporate.expresso.core.db.DBException
Deprecated. 
Returns a single stream for a LOB object. This single LOB object is not wrapped by any javax.activation code and therefore is strictly up to the code creator on how to use the Input Stream.


setBLOB

public void setBLOB(DBObject baseObject,
                    java.lang.String fieldName,
                    byte[] theData,
                    com.jcorporate.expresso.core.db.DBConnection theConnection)
             throws com.jcorporate.expresso.core.db.DBException
Deprecated. 
Updates the underlying table with a BLOB object.


setBLOB

public void setBLOB(DBObject baseObject,
                    java.lang.String fieldName,
                    java.io.InputStream theData,
                    int dataLength,
                    com.jcorporate.expresso.core.db.DBConnection theConnection)
             throws com.jcorporate.expresso.core.db.DBException
Deprecated. 
Updates the underlying table with a BLOB object. Same as the byte[] method but uses InputStreams intead


prepSelectResultSet

protected void prepSelectResultSet(DBObject baseObject,
                                   java.lang.String fieldName,
                                   com.jcorporate.expresso.core.db.DBConnection theConnection)
                            throws com.jcorporate.expresso.core.db.DBException
Deprecated. 
Internal helper function that does the guts of the work

Since:
$DatabaseSchema $Date: 2004/11/17 20:48:11 $

prepUpdate

protected java.sql.PreparedStatement prepUpdate(DBObject baseObject,
                                                java.lang.String fieldName,
                                                com.jcorporate.expresso.core.db.DBConnection theConnection)
                                         throws com.jcorporate.expresso.core.db.DBException
Deprecated. 
Internal helper function to prepare a LOB update

Since:
$DatabaseSchema $Date: 2004/11/17 20:48:11 $

finalizeUpdate

protected void finalizeUpdate(com.jcorporate.expresso.core.db.DBConnection theConnection)
                       throws com.jcorporate.expresso.core.db.DBException
Deprecated.