Business Components

oracle.jbo.domain
Class BlobDomain

java.lang.Object
  |
  +--oracle.jbo.domain.BlobDomain

public synchronized class BlobDomain
extends java.lang.Object
implements BlobDomainInterface, XMLDomainInterface, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
BlobDomain()
           
BlobDomain(oracle.sql.BLOB)
           
BlobDomain(oracle.sql.BLOB, byte[])
           
BlobDomain(BlobDomain, byte[])
           
BlobDomain(byte[])
           
 
Method Summary
static oracle.sql.BLOB createEmptyBLOB(java.lang.Object)
           
 boolean equals(java.lang.Object)
           
 java.lang.Object getData()
          Returns the value in the format that is acceptable to the database.
 org.w3c.dom.Node getXMLContentNode(org.w3c.dom.Document)
           
static XMLDomainFactory getXMLDomainFactory(java.lang.Class)
           
protected  java.lang.String getXMLElementTag()
           
 void loadFromDatabase(Transaction)
          Loads the actual data of the "blob" type database attribute into memory.
 void prepareForDML(java.lang.Object)
           
 java.lang.String printXMLDefinition(java.util.Hashtable, java.io.PrintWriter, boolean)
           
 void saveToDatabase(Transaction)
          Saves data in memory to a database "blob" type attribute.
 void saveToDatabase(Transaction, java.lang.Object)
           
 void setBytes(byte[])
           
 void setContext(DomainOwnerInterface, Transaction, java.lang.Object)
           
 void shareBLOB(BlobDomain)
           
 byte[] toByteArray()
           
 java.lang.String toString()
           
 void useBLOB(oracle.sql.BLOB)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlobDomain

public BlobDomain()

BlobDomain

public BlobDomain(oracle.sql.BLOB)

BlobDomain

public BlobDomain(byte[])

BlobDomain

public BlobDomain(oracle.sql.BLOB,
                  byte[])

BlobDomain

public BlobDomain(BlobDomain,
                  byte[])
Method Detail

shareBLOB

public void shareBLOB(BlobDomain)

useBLOB

public void useBLOB(oracle.sql.BLOB)

setBytes

public void setBytes(byte[])

loadFromDatabase

public void loadFromDatabase(Transaction)
                      throws java.lang.Exception
Description copied from interface: BlobDomainInterface
Loads the actual data of the "blob" type database attribute into memory.

The transaction argument is needed to perform an additional query into the database to extract the data.

This method does not need to be invoked for a new attribute.

Specified by:
loadFromDatabase in interface BlobDomainInterface
Tags copied from interface: BlobDomainInterface
Parameters:
transaction - the oracle.jbo.rt.DBTransactionImpl of the current appmodule.

setContext

public void setContext(DomainOwnerInterface,
                       Transaction,
                       java.lang.Object)

getData

public java.lang.Object getData()
Description copied from interface: DomainInterface
Returns the value in the format that is acceptable to the database.

For domain classes based on oracle.sql.* classes, this method returns a Datum object. For domains based on java.lang types such as String, the value-holder object that is passed to JDBC is returned.

Tags copied from interface: DomainInterface
Returns:
a formatted value object.

saveToDatabase

public void saveToDatabase(Transaction)
                    throws java.sql.SQLException
Description copied from interface: BlobDomainInterface
Saves data in memory to a database "blob" type attribute.

The transaction argument is is needed to perform an additional query into the database to write the data.

This method does not need to be invoked if this attribute's data has not changed.

Specified by:
saveToDatabase in interface BlobDomainInterface
Tags copied from interface: BlobDomainInterface
Parameters:
transaction - the oracle.jbo.rt.DBTransactionImpl instance of the current application module.

saveToDatabase

public void saveToDatabase(Transaction,
                           java.lang.Object)
                    throws java.sql.SQLException
Specified by:
saveToDatabase in interface BlobDomainInterface

prepareForDML

public void prepareForDML(java.lang.Object)
Specified by:
prepareForDML in interface BlobDomainInterface

createEmptyBLOB

public static oracle.sql.BLOB createEmptyBLOB(java.lang.Object)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toByteArray

public byte[] toByteArray()

equals

public boolean equals(java.lang.Object)
Overrides:
equals in class java.lang.Object

getXMLElementTag

protected java.lang.String getXMLElementTag()

getXMLContentNode

public org.w3c.dom.Node getXMLContentNode(org.w3c.dom.Document)
Specified by:
getXMLContentNode in interface XMLDomainInterface

printXMLDefinition

public java.lang.String printXMLDefinition(java.util.Hashtable,
                                           java.io.PrintWriter,
                                           boolean)
Specified by:
printXMLDefinition in interface XMLDomainInterface

getXMLDomainFactory

public static XMLDomainFactory getXMLDomainFactory(java.lang.Class)

Business Components