|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.jbo.domain.BaseLobDomain
public abstract class BaseLobDomain
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.
Nested Class Summary | |
---|---|
protected class |
BaseLobDomain.BlobOutputStream
|
Field Summary | |
---|---|
protected java.lang.Object |
lob
|
protected static java.lang.String |
LOGGER_NAME
|
protected boolean |
mClient
|
protected BaseLobDomain.BlobOutputStream |
mData
|
protected boolean |
mDataModified
|
protected java.lang.String |
mIndexString
|
protected boolean |
mNeedsServerSync
|
protected DomainOwnerInterface |
mOwner
|
protected java.lang.Integer |
relIdx
|
protected Transaction |
xAct
|
Constructor Summary | |
---|---|
protected |
BaseLobDomain()
Constructor for this object. |
protected |
BaseLobDomain(BaseLobDomain nblob,
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. |
protected |
BaseLobDomain(byte[] data)
Constructor for this class. |
protected |
BaseLobDomain(java.lang.Object blob)
Constructor for this object. |
protected |
BaseLobDomain(java.lang.Object 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. |
protected |
BaseLobDomain(ResponseValues respVals)
|
Method Summary | |
---|---|
void |
closeCharacterStream()
|
void |
closeInputStream()
|
void |
closeOutputStream()
|
boolean |
equals(java.lang.Object obj)
Tests for equality between this and obj. |
java.io.Reader |
getCharacterStream()
|
java.lang.Object |
getData()
Internal: Applications should not use this method. |
java.io.InputStream |
getInputStream()
|
protected java.io.InputStream |
getInputStream(long pos,
long length)
|
protected abstract java.io.InputStream |
getInternalDataStream()
|
protected abstract java.io.InputStream |
getInternalDataStream(long pos,
long length)
|
protected abstract java.io.OutputStream |
getInternalOutputStream(long pos)
|
protected abstract java.io.InputStream |
getInternalStream()
|
protected abstract java.io.InputStream |
getInternalStream(long pos,
long length)
|
static java.lang.reflect.Method |
getInvokeDomainMethod()
|
abstract long |
getLength()
|
java.io.OutputStream |
getOutputStream()
|
protected java.io.OutputStream |
getOutputStream(long pos)
|
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()
|
abstract void |
prepareForDML(java.lang.Object context)
|
protected abstract byte[] |
readBytesFromLob(long offset,
int length)
|
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. |
int |
setBytes(long pos,
byte[] blobData,
int offset,
int len)
|
void |
setContext(DomainOwnerInterface owner,
Transaction trans,
java.lang.Object ctx)
Internal: Applications should not use this method. |
void |
syncClientLob(LobInterface oldObj)
|
protected abstract void |
syncLob(java.lang.Object otherLob)
|
void |
syncServerLob(LobInterface oldObj)
|
byte[] |
toByteArray()
Converts this BLOB contents into a byte array. |
Datum |
toDatum(java.sql.Connection c)
Internal: Applications should not use this method. |
java.lang.String |
toString()
For testing purposes only: converts this BlobDomain object to a string. |
protected abstract void |
writeBytesToLob()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String LOGGER_NAME
protected transient BaseLobDomain.BlobOutputStream mData
protected transient java.lang.Object lob
protected transient DomainOwnerInterface mOwner
protected transient Transaction xAct
protected transient boolean mDataModified
protected transient boolean mClient
protected transient java.lang.Integer relIdx
protected transient java.lang.String mIndexString
protected transient boolean mNeedsServerSync
Constructor Detail |
---|
protected BaseLobDomain()
protected BaseLobDomain(java.lang.Object blob)
blob
to use the blob-locator
in the database.
blob
- the BLOB from which to construct the BlobDomain.protected BaseLobDomain(byte[] data)
blobData
.
blobData
- data for the BLOB.protected BaseLobDomain(java.lang.Object 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.protected BaseLobDomain(BaseLobDomain nblob, 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.protected BaseLobDomain(ResponseValues respVals)
Method Detail |
---|
public Datum toDatum(java.sql.Connection c) throws java.sql.SQLException
Converts this Domain object back into a SQL object.
toDatum
in interface ORAData
c
- OracleConnection
Not used.
Datum
object.
java.sql.SQLException
- if the serialization or deserialization fails.public void setBytes(byte[] blobData)
blobData
- data to fill the Blob.public int setBytes(long pos, byte[] blobData, int offset, int len)
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.
java.lang.Exception
public void setContext(DomainOwnerInterface owner, Transaction trans, java.lang.Object ctx)
Sets the transaction context for this Blob.
public abstract void prepareForDML(java.lang.Object context)
protected abstract byte[] readBytesFromLob(long offset, int length)
protected abstract void writeBytesToLob()
protected abstract java.io.OutputStream getInternalOutputStream(long pos)
protected abstract java.io.InputStream getInternalStream()
protected abstract java.io.InputStream getInternalStream(long pos, long length)
protected abstract java.io.InputStream getInternalDataStream()
protected abstract java.io.InputStream getInternalDataStream(long pos, long length)
protected abstract void syncLob(java.lang.Object otherLob)
public abstract long getLength()
protected int getRemoteBufferSize()
protected long getRemoteLength()
public java.lang.Object getData()
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.
java.sql.SQLException
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.
java.sql.SQLException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isCacheDataModified()
public byte[] getStorageByteArray()
public byte[] toByteArray()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the data item to compare against.public ResponseValues marshal()
marshal
in interface MarshalledDomain
public java.io.OutputStream getOutputStream()
protected java.io.OutputStream getOutputStream(long pos)
public java.lang.String getRemoteIdString()
public DomainOwnerInterface getOwner()
public int getOwnerAttributeIndex()
protected DomainOwnerInterface getOwnerRow()
public java.io.InputStream getInputStream()
protected java.io.InputStream getInputStream(long pos, long length)
public java.io.Reader getCharacterStream()
protected void resetCachedData()
public void syncClientLob(LobInterface oldObj)
public void syncServerLob(LobInterface oldObj)
public long getSize()
public static java.lang.reflect.Method getInvokeDomainMethod()
public void closeOutputStream()
public void closeInputStream()
public void closeCharacterStream()
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |