Oracle9i Business Components for Java Oracle Domains API Reference
Oracle9i Jdeveloper (9.0.4)
B10392-01


oracle.jbo.domain
Class BaseLobDomain

java.lang.Object
  |
  +--oracle.jbo.domain.BaseLobDomain
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BlobDomain, ClobDomain

public abstract class BaseLobDomain
extends java.lang.Object
implements java.io.Serializable

This class provides a lightweight wrapper for oracle.sql.BLOB, the Java representation of the BLOB database type. This wrapper allows an instance of the oracle.sql.BLOB to be used as a domain object.

Since:
JDeveloper 3.0
See Also:
Serialized Form

Method Summary
 void closeOutputStream()
           
 boolean equals(java.lang.Object obj)
          Tests for equality between this and obj.
 java.lang.Object getData()
          Internal: Applications should not use this method.
 java.io.InputStream getInputStream()
           
static java.lang.reflect.Method getInvokeDomainMethod()
           
 java.io.OutputStream getOutputStream()
           
 DomainOwnerInterface getOwner()
           
 int getOwnerAttributeIndex()
           
protected  DomainOwnerInterface getOwnerRow()
           
protected  int getRemoteBufferSize()
           
 java.lang.String getRemoteIdString()
           
protected  long getRemoteLength()
           
 long getSize()
           
 byte[] getStorageByteArray()
           
 boolean isCacheDataModified()
           
 void loadFromDatabase(Transaction xAct)
          Internal: Applications should not use this method.
 ResponseValues marshal()
           
protected  void resetCachedData()
           
 void saveToDatabase(Transaction xAct)
          Internal: Applications should not use this method.
 void saveToDatabase(Transaction xAct, java.lang.Object emptySQLObject)
          Internal: Applications should not use this method.
 void setBytes(byte[] blobData)
          Sets the blob data for this object.
 void setContext(DomainOwnerInterface owner, Transaction trans, java.lang.Object ctx)
          Internal: Applications should not use this method.
 void syncClientLob(LobInterface oldObj)
           
 void syncServerLob(LobInterface oldObj)
           
 byte[] toByteArray()
          Converts this BLOB contents into a byte array.
 Datum toDatum(oracle.jdbc.driver.OracleConnection c)
           
 java.lang.String toString()
          For testing purposes only: converts this BlobDomain object to a string.

 

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

 

Method Detail

toDatum

public Datum toDatum(oracle.jdbc.driver.OracleConnection c)
              throws java.sql.SQLException
java.sql.SQLException

setBytes

public void setBytes(byte[] blobData)
Sets the blob data for this object. On the client side, if there's a context available with this object, the bytes are streamed to the middle-tier object right-away. However if there's no context object, it's assumed that there will be a setAttribute call invoked on a containing row with this object as argument to stream the bytes via piggy-back.
Parameters:
blobData - data to fill the Blob.

loadFromDatabase

public void loadFromDatabase(Transaction xAct)
                      throws java.lang.Exception
Internal: Applications should not use this method.

Uses the given transaction context to load data from the database.

Parameters:
xAct - name of the transaction context.
java.lang.Exception

setContext

public void setContext(DomainOwnerInterface owner,
                       Transaction trans,
                       java.lang.Object ctx)
Internal: Applications should not use this method.

Sets the transaction context for this Blob.


getRemoteBufferSize

protected int getRemoteBufferSize()

getRemoteLength

protected long getRemoteLength()

getData

public java.lang.Object getData()
Internal: Applications should not use this method.

saveToDatabase

public void saveToDatabase(Transaction xAct)
                    throws java.sql.SQLException
Internal: Applications should not use this method.

Uses the given transaction context to store data back into the database using the blob-locator which should be set before this method is invoked.

Parameters:
xAct - name of the transaction context.
java.sql.SQLException

saveToDatabase

public void saveToDatabase(Transaction xAct,
                           java.lang.Object emptySQLObject)
                    throws java.sql.SQLException
Internal: Applications should not use this method.

Uses the given transaction context to store data back into the database using the blob-locator which should be set before this method is invoked.

java.sql.SQLException

toString

public java.lang.String toString()
For testing purposes only: converts this BlobDomain object to a string.
Overrides:
toString in class java.lang.Object
Returns:
this BlobDomain as a string.

isCacheDataModified

public boolean isCacheDataModified()

getStorageByteArray

public byte[] getStorageByteArray()

toByteArray

public byte[] toByteArray()
Converts this BLOB contents into a byte array.
Returns:
a byte array containing the contents of the BLOB.

equals

public boolean equals(java.lang.Object obj)
Tests for equality between this and obj. Converts all the data into a String and compares the two strings. This is a default implementation of equals which could be overridden to perform more scalable application-specific comparisons.
Overrides:
equals in class java.lang.Object
Parameters:
obj - the data item to compare against.

marshal

public ResponseValues marshal()

getOutputStream

public java.io.OutputStream getOutputStream()

getRemoteIdString

public java.lang.String getRemoteIdString()

getOwner

public DomainOwnerInterface getOwner()

getOwnerAttributeIndex

public int getOwnerAttributeIndex()

getOwnerRow

protected DomainOwnerInterface getOwnerRow()

getInputStream

public java.io.InputStream getInputStream()

resetCachedData

protected void resetCachedData()

syncClientLob

public void syncClientLob(LobInterface oldObj)

syncServerLob

public void syncServerLob(LobInterface oldObj)

getSize

public long getSize()

getInvokeDomainMethod

public static java.lang.reflect.Method getInvokeDomainMethod()

closeOutputStream

public void closeOutputStream()

Oracle9i Business Components for Java Oracle Domains API Reference
Oracle9i Jdeveloper (9.0.4)
B10392-01


 

Copyright © 1997, 2003, Oracle. All rights reserved.