|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.domain.BlobDomain
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.
Constructor Summary | |
BlobDomain()
Constructor for this object. |
|
BlobDomain(oracle.sql.BLOB blob)
Constructor for this object. |
|
BlobDomain(oracle.sql.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. |
|
BlobDomain(BlobDomain 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. |
|
BlobDomain(byte[] data)
Constructor for this class. |
Method Summary | |
static oracle.sql.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.lang.Object |
getData()
Internal: Applications should not use this method. |
org.w3c.dom.Node |
getXMLContentNode(org.w3c.dom.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 |
loadFromDatabase(Transaction xAct)
Internal: Applications should not use this method. |
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 |
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 |
shareBLOB(BlobDomain newBlob)
Internal: Applications should not use this method. |
byte[] |
toByteArray()
Converts this BLOB contents into a byte array. |
java.lang.String |
toString()
For testing purposes only: converts this BlobDomain object to a string. |
void |
useBLOB(oracle.sql.BLOB newBlob)
Internal: Applications should not use this method. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public BlobDomain()
public BlobDomain(oracle.sql.BLOB blob)
blob
to use the blob-locator
in the database.blob
- the BLOB from which to construct the BlobDomain.public BlobDomain(byte[] data)
blobData
.blobData
- data for the BLOB.public BlobDomain(oracle.sql.BLOB blob, byte[] blobData)
blobData
and using the transaction context from blob
to use the blob-locator
in the database.
blob
- transaction context for the BLOB locator, as a BLOB object.blobData
- data for the BLOB.public BlobDomain(BlobDomain blob, byte[] blobData)
blobData
and using the transaction context from blob
to use the blob-locator
in the database.
This constructor should be used by applications using the framework to create BlobDomain objects.
blob
- transaction context for the BLOB locator as a BlobDomain object.blobData
- data for the BLOB.Method Detail |
public void shareBLOB(BlobDomain newBlob)
If this object does
not have a transaction context, it obtains the transaction
data from newBlob
.
newBlob
- name of the Blob which will share its translaction
data.public void useBLOB(oracle.sql.BLOB newBlob)
If this object does not have a transaction context, shares the transaction
and blob-locator from newBlob
.
newBlob
- name of the Blob that will share its transaction context and
Blob locator data.public void setBytes(byte[] blobData)
blobData
- data to fill the Blob.public void loadFromDatabase(Transaction xAct) throws java.lang.Exception
Uses the given transaction context to load data from the database.
xAct
- name of the transaction context.public void setContext(DomainOwnerInterface owner, Transaction trans, java.lang.Object ctx)
Sets the transaction context for this Blob.
public java.lang.Object getData()
Returns BLOB
that contains data for this object.
public void saveToDatabase(Transaction xAct) throws java.sql.SQLException
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.
xAct
- name of the transaction context.public void saveToDatabase(Transaction xAct, java.lang.Object emptySQLObject) throws java.sql.SQLException
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.
public void prepareForDML(java.lang.Object context)
context
- an internal framework context.public static oracle.sql.BLOB createEmptyBLOB(java.lang.Object context)
context
- an internal framework context.public java.lang.String toString()
public byte[] toByteArray()
public boolean equals(java.lang.Object obj)
obj
- the data item to compare against.protected java.lang.String getXMLElementTag()
public org.w3c.dom.Node getXMLContentNode(org.w3c.dom.Document xmlDoc)
xmlDoc
- name of the XML document.public java.lang.String printXMLDefinition(java.util.Hashtable allDefs, java.io.PrintWriter pw, boolean bContainees)
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.public static XMLDomainFactory getXMLDomainFactory(java.lang.Class attrClass)
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |