Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.util.jdbc
Class StdBlobColumn

java.lang.Object
  extended by org.hyperic.util.jdbc.StdBlobColumn
All Implemented Interfaces:
BlobColumn
Direct Known Subclasses:
OracleBlobColumn, PostgresBlobColumn

public class StdBlobColumn
extends java.lang.Object
implements BlobColumn

StdBlobColum - a wrapper for Blob columns of different databses. Blobs represent a point of divergence for many vendors and so this class is intended to serve as a base class for more specialized blob handling versions. XXX - to do, support sibling (non-blob) columns


Constructor Summary
StdBlobColumn(java.lang.String dsName, java.lang.String tableName, java.lang.String idColName, java.lang.String blobColName)
           
 
Method Summary
protected  void checkForInsert()
           
protected  void checkIdSet()
           
 void delete()
          delete the blob row
protected  void doDelete()
           
protected  void doInsert()
           
protected  void doSelect()
           
protected static byte[] doSelect(java.sql.ResultSet rs, int columnIndex)
           
protected  void doUpdate()
           
protected  java.lang.Integer fetchNextId()
           
 java.lang.String getBlobColName()
           
 byte[] getBlobData()
           
 java.lang.String getCtxName()
           
protected  java.sql.Connection getDBConn()
           
 java.lang.Integer getId()
           
 java.lang.String getIdColName()
           
protected  javax.naming.InitialContext getInitialContext()
           
 java.lang.String getSeqName()
           
 java.lang.String getTableName()
           
 void insert()
          insert the blob
 void select()
          select the blob data
 void setBlobColName(java.lang.String s)
           
 void setBlobData(byte[] ba)
           
 void setId(java.lang.Integer id)
           
 void setIdColName(java.lang.String s)
           
 void setSequenceInfo(java.lang.String ctxName, java.lang.String seqName)
           
 void setTableName(java.lang.String s)
           
 void update()
          update the blob data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StdBlobColumn

public StdBlobColumn(java.lang.String dsName,
                     java.lang.String tableName,
                     java.lang.String idColName,
                     java.lang.String blobColName)
Method Detail

getId

public java.lang.Integer getId()
Specified by:
getId in interface BlobColumn

setId

public void setId(java.lang.Integer id)
Specified by:
setId in interface BlobColumn

getBlobData

public byte[] getBlobData()
Specified by:
getBlobData in interface BlobColumn

setBlobData

public void setBlobData(byte[] ba)
Specified by:
setBlobData in interface BlobColumn

setTableName

public void setTableName(java.lang.String s)
Specified by:
setTableName in interface BlobColumn

getTableName

public java.lang.String getTableName()
Specified by:
getTableName in interface BlobColumn

setIdColName

public void setIdColName(java.lang.String s)
Specified by:
setIdColName in interface BlobColumn

getIdColName

public java.lang.String getIdColName()
Specified by:
getIdColName in interface BlobColumn

setBlobColName

public void setBlobColName(java.lang.String s)
Specified by:
setBlobColName in interface BlobColumn

getBlobColName

public java.lang.String getBlobColName()
Specified by:
getBlobColName in interface BlobColumn

getSeqName

public java.lang.String getSeqName()
Specified by:
getSeqName in interface BlobColumn

getCtxName

public java.lang.String getCtxName()
Specified by:
getCtxName in interface BlobColumn

setSequenceInfo

public void setSequenceInfo(java.lang.String ctxName,
                            java.lang.String seqName)
Specified by:
setSequenceInfo in interface BlobColumn

select

public void select()
            throws java.sql.SQLException
select the blob data

Specified by:
select in interface BlobColumn
Throws:
java.sql.SQLException

update

public void update()
            throws java.sql.SQLException
update the blob data

Specified by:
update in interface BlobColumn
Throws:
java.sql.SQLException

insert

public void insert()
            throws java.sql.SQLException,
                   javax.naming.NamingException,
                   ConfigPropertyException
insert the blob

Specified by:
insert in interface BlobColumn
Throws:
java.sql.SQLException
javax.naming.NamingException
ConfigPropertyException

delete

public void delete()
            throws java.sql.SQLException
delete the blob row

Specified by:
delete in interface BlobColumn
Throws:
java.sql.SQLException

checkForInsert

protected void checkForInsert()
                       throws java.sql.SQLException,
                              javax.naming.NamingException,
                              ConfigPropertyException
Throws:
java.sql.SQLException
javax.naming.NamingException
ConfigPropertyException

doSelect

protected void doSelect()
                 throws java.sql.SQLException
Throws:
java.sql.SQLException

doSelect

protected static byte[] doSelect(java.sql.ResultSet rs,
                                 int columnIndex)
                          throws java.sql.SQLException
Throws:
java.sql.SQLException

doUpdate

protected void doUpdate()
                 throws java.sql.SQLException
Throws:
java.sql.SQLException

doInsert

protected void doInsert()
                 throws java.sql.SQLException
Throws:
java.sql.SQLException

doDelete

protected void doDelete()
                 throws java.sql.SQLException
Throws:
java.sql.SQLException

fetchNextId

protected java.lang.Integer fetchNextId()
                                 throws java.sql.SQLException,
                                        javax.naming.NamingException,
                                        ConfigPropertyException
Throws:
java.sql.SQLException
javax.naming.NamingException
ConfigPropertyException

checkIdSet

protected void checkIdSet()

getDBConn

protected java.sql.Connection getDBConn()
                                 throws java.sql.SQLException
Throws:
java.sql.SQLException

getInitialContext

protected javax.naming.InitialContext getInitialContext()

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.