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


oracle.jbo.domain
Class BlobDomain

java.lang.Object
  |
  +--oracle.jbo.domain.BaseLobDomain
        |
        +--oracle.jbo.domain.BlobDomain
All Implemented Interfaces:
java.io.Serializable

public class BlobDomain
extends BaseLobDomain
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

Constructor Summary
BlobDomain()
          Constructor for this object.
BlobDomain(BLOB blob)
          Constructor for this object.
BlobDomain(BLOB blob, byte[] blobData)
          Creates an instance of this class with data as described in blobData and using the transaction context from blob to use the blob-locator in the database.

 

Method Summary
static BLOB createEmptyBLOB(java.lang.Object context)
          Creates an empty Blob object.
 boolean equals(java.lang.Object obj)
          Tests for equality between this and obj.
 java.io.OutputStream getBinaryOutputStream()
           
 java.io.InputStream getBinaryStream()
           
 int getBufferSize()
           
 byte[] getBytes(long offset, int length)
           
 int getBytes(long pos, int length, byte[] buf)
           
 java.io.Reader getCharacterStream()
           
 long getLength()
           
 Node getXMLContentNode(Document xmlDoc)
          Creates the XML node in the given XML document for this domain's data.
static XMLDomainFactory getXMLDomainFactory(java.lang.Class attrClass)
          Internal: Applications should not use this method.
protected  java.lang.String getXMLElementTag()
          Returns this class name as an XML-element tag for this Struct domain object.
 void prepareForDML(java.lang.Object context)
          Internal: Applications should not use this method.
 java.lang.String printXMLDefinition(java.util.Hashtable allDefs, java.io.PrintWriter pw, boolean bContainees)
          Prints the DTD information for this domain in the given print writer.
 void useBLOB(BLOB nBlob)
          Obselete

 

Methods inherited from class oracle.jbo.domain.BaseLobDomain
closeOutputStream, getData, getInputStream, getInvokeDomainMethod, getOutputStream, getOwner, getOwnerAttributeIndex, getOwnerRow, getRemoteBufferSize, getRemoteIdString, getRemoteLength, getSize, getStorageByteArray, isCacheDataModified, loadFromDatabase, marshal, resetCachedData, saveToDatabase, saveToDatabase, setBytes, setContext, syncClientLob, syncServerLob, toByteArray, toDatum, toString

 

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

 

Constructor Detail

BlobDomain

public BlobDomain()
Constructor for this object.

BlobDomain

public BlobDomain(BLOB blob)
Constructor for this object. This is for use by JDBC. This constructor uses the transaction context from blob to use the blob-locator in the database.
Parameters:
blob - the BLOB from which to construct the BlobDomain.

BlobDomain

public BlobDomain(BLOB blob,
                  byte[] blobData)
Creates an instance of this class with data as described in blobData and using the transaction context from blob to use the blob-locator in the database.
Parameters:
blob - transaction context for the BLOB locator, as a BLOB object.
blobData - data for the BLOB.
Method Detail

useBLOB

public void useBLOB(BLOB nBlob)
Obselete

prepareForDML

public void prepareForDML(java.lang.Object context)
Internal: Applications should not use this method.
Overrides:
prepareForDML in class BaseLobDomain
Parameters:
context - an internal framework context.

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 BaseLobDomain
Parameters:
obj - the data item to compare against.

getXMLElementTag

protected java.lang.String getXMLElementTag()
Returns this class name as an XML-element tag for this Struct domain object. Override this method to return a custom XML-element tag for this domain.

getXMLContentNode

public Node getXMLContentNode(Document xmlDoc)
Creates the XML node in the given XML document for this domain's data.
Parameters:
xmlDoc - name of the XML document.

printXMLDefinition

public java.lang.String printXMLDefinition(java.util.Hashtable allDefs,
                                           java.io.PrintWriter pw,
                                           boolean bContainees)
Prints the DTD information for this domain in the given print writer. Returns the DTD string to be added to this domain's container entity/domain.
Parameters:
allDefs - name of hashtable containing key-value pairs of XML tags and their values.
pw - printwriter on which the information should be printed.
bContainees - whether this domain container has containees.

getXMLDomainFactory

public static XMLDomainFactory getXMLDomainFactory(java.lang.Class attrClass)
Internal: Applications should not use this method.

createEmptyBLOB

public static BLOB createEmptyBLOB(java.lang.Object context)
Creates an empty Blob object.
Parameters:
context - an internal framework context.

getBinaryOutputStream

public java.io.OutputStream getBinaryOutputStream()
                                           throws java.sql.SQLException
java.sql.SQLException

getBinaryStream

public java.io.InputStream getBinaryStream()

getBytes

public byte[] getBytes(long offset,
                       int length)

getLength

public long getLength()
Overrides:
getLength in class BaseLobDomain

getBufferSize

public int getBufferSize()

getBytes

public int getBytes(long pos,
                    int length,
                    byte[] buf)

getCharacterStream

public java.io.Reader getCharacterStream()

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


 

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