|
|||||||||
| Home >> All >> com >> jcorporate >> expresso >> core >> [ dbobj overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.jcorporate.expresso.core.dbobj
Class LOBSupport

java.lang.Objectcom.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:
- Size - The arbitrary size of LOB objects can significantly consume system resources if you automatically load all LOBS along with the rest of the data object
- JDBC Interface - Many JDBC Drivers require you to use streams to retrieve LOBs from a database as opposed to standard objects loaded from a connection.
- Transaction Requirements -Many JDBC Drivers require to update BLOBS within an explicitly committed transaction
- Object Oriented Wrapping - LOBs by definition are of unknown objects Therefore, it is difficult for an Object Oriented System to deal with the arbitrariness of the object. Some sort of data type mapping must be supplied
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
- Default Constructor
| Method Detail |
getInstance
public static LOBSupport getInstance()
- Deprecated.
- Singleton implementation. Use this to get to the LOB helper functions
- 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
- 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.
- 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.
- 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.
- 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
- 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 $
- Internal helper function that does the guts of the work
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 $
- Internal helper function to prepare a LOB update
finalizeUpdate
protected void finalizeUpdate(com.jcorporate.expresso.core.db.DBConnection theConnection) throws com.jcorporate.expresso.core.db.DBException
- Deprecated.
|
|||||||||
| Home >> All >> com >> jcorporate >> expresso >> core >> [ dbobj overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.jcorporate.expresso.core.dbobj.LOBSupport