|
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
oracle.jbo.domain.generic.GenericClob
public class GenericClob
This class provides a lightweight wrapper for oracle.sql.Clob, the Java representation of the Clob database type. This wrapper allows an instance of the oracle.sql.Clob to be used as a domain object.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class oracle.jbo.domain.BaseLobDomain |
---|
BaseLobDomain.BlobOutputStream |
Field Summary |
---|
Fields inherited from class oracle.jbo.domain.BaseLobDomain |
---|
lob, LOGGER_NAME, mClient, mData, mDataModified, mIndexString, mNeedsServerSync, mOwner, relIdx, xAct |
Constructor Summary | |
---|---|
GenericClob()
Constructor for this class. |
|
GenericClob(char[] data)
Constructs an instance of this class, given a char array. |
|
GenericClob(java.sql.Clob clob)
Constructs an instance of this class, given a Clob object. |
|
GenericClob(java.sql.Clob clob,
byte[] clobData)
Deprecated. since 9.0.3.5. Use GenericClob(Clob clob, char[] clobData) Constructor instead. |
|
GenericClob(java.sql.Clob clob,
char[] clobData)
Internal: Applications should not use this constructor. |
|
GenericClob(GenericClob nclob,
byte[] clobData)
Deprecated. since 9.0.3.5. Use GenericClob(GenericClob clob, char[] clobData) Constructor instead. |
|
GenericClob(GenericClob nclob,
char[] clobData,
java.sql.Connection conn)
Creates an instance of this class with data as described in clobData
and using the transaction context from clob to use the clob-locator
in the database. |
|
GenericClob(ResponseValues respVals)
|
|
GenericClob(java.lang.String str)
Constructs an instance of this class, given a string. |
Method Summary | |
---|---|
void |
closeCharacterOutputStream()
Closes and cleansup internal reference to writer. |
void |
closeCharacterStream()
Close the Clob contents as a Unicode reader. |
void |
closeOutputStream()
Closes the OutputStream object. |
static java.sql.Clob |
createEmptyCLOB(java.lang.Object context)
Creates an empty Clob object. |
boolean |
equals(java.lang.Object obj)
Converts all the data into a String and compares the two strings. |
void |
free()
|
java.io.OutputStream |
getAsciiOutputStream()
Deprecated. since 9.0.3.5. Use getCharacterOutputStream() instead. |
java.io.InputStream |
getAsciiStream()
Deprecated. since 11.1.2.0.0. Use getCharacterStream() instead. |
int |
getBufferSize()
Get ideal LOB db access buffer size. |
java.io.Writer |
getCharacterOutputStream()
Returns a Writer for Unicode stream to the Clob that uses the default character encoding. |
protected java.io.Writer |
getCharacterOutputStream(long pos)
|
java.io.Reader |
getCharacterStream()
Gets the Clob contents as a Unicode reader. |
java.io.Reader |
getCharacterStream(long pos,
long length)
|
java.io.Reader |
getCharacterStream(java.lang.String enc)
Deprecated. since 9.0.3.5. Use getCharacterStream() instead. |
java.lang.Object |
getData()
Internal: Applications should not use this method. |
java.io.InputStream |
getInputStream()
Deprecated. since 9.0.3.5. Use getCharacterStream() instead. |
protected java.io.InputStream |
getInternalDataStream()
|
protected java.io.InputStream |
getInternalDataStream(long pos,
long length)
|
protected java.io.OutputStream |
getInternalOutputStream(long pos)
|
protected java.io.InputStream |
getInternalStream()
|
protected java.io.InputStream |
getInternalStream(long pos,
long length)
|
long |
getLength()
Returns the number of characters in the Clob value
designated by this Clob object. |
java.io.OutputStream |
getOutputStream()
Deprecated. since 9.0.3.5. Use getCharacterOutputStream() instead. |
byte[] |
getStorageByteArray()
Deprecated. since 9.0.3.5. Use getStorageCharArray() instead. |
byte[] |
getStorageByteArray(java.lang.String enc)
Deprecated. since 9.0.3.5. Use getStorageCharArray() instead. |
char[] |
getStorageCharArray()
Converts this Clob contents into a char array. |
java.lang.String |
getSubString(long offset,
int length)
Returns a copy of the specified substring in the Clob value
designated by this Clob object. |
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. |
long |
length()
|
ResponseValues |
marshal()
Internal: Applications should not use this method. |
long |
position(java.sql.Clob searchstr,
long start)
|
long |
position(java.lang.String searchstr,
long start)
|
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. |
protected 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. |
java.io.OutputStream |
setAsciiStream(long pos)
|
void |
setBytes(byte[] clobData)
Deprecated. since 9.0.3.5. Use setChars(char[] clobData) instead. |
java.io.Writer |
setCharacterStream(long pos)
|
void |
setChars(char[] clobData)
Sets the Clob data for this object. |
void |
setIsBindVar(boolean isBindVar)
Internal: Applications should not use this method. |
int |
setString(long pos,
java.lang.String str)
|
int |
setString(long pos,
java.lang.String str,
int offset,
int length)
|
void |
syncClientLob(LobInterface oldObj)
Internal: Applications should not use this function. |
protected void |
syncLob(java.lang.Object otherLob)
|
void |
syncServerLob(LobInterface oldObj)
Internal: Applications should not use this function. |
char[] |
toCharArray()
Converts this cLOB contents into a char array. |
java.lang.String |
toString()
Converts this GenericClob object to a string. |
void |
truncate(long len)
|
void |
useCLOB(java.sql.Clob newClob)
Internal: Applications should not use this method. |
protected void |
writeBytesToLob()
|
Methods inherited from class oracle.jbo.domain.BaseLobDomain |
---|
closeInputStream, getInputStream, getInvokeDomainMethod, getOutputStream, getOwner, getOwnerAttributeIndex, getOwnerRow, getRemoteBufferSize, getRemoteIdString, getRemoteLength, getSize, isCacheDataModified, loadFromDatabase, setBytes, setContext, toByteArray, toDatum |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.jbo.domain.LobStreamInterface |
---|
closeInputStream |
Methods inherited from interface oracle.jbo.domain.LobInterface |
---|
getOwner, getOwnerAttributeIndex, getRemoteIdString, getSize |
Methods inherited from interface oracle.jbo.domain.BlobDomainInterface |
---|
loadFromDatabase |
Methods inherited from interface oracle.jbo.domain.DomainInterface |
---|
setContext |
Constructor Detail |
---|
public GenericClob()
public GenericClob(java.lang.String str)
str
- a string to be used for a GenericClob.public GenericClob(char[] data)
data
- a char array to be used for a GenericClob.public GenericClob(java.sql.Clob clob)
clob
- a Clob to be used for a GenericClob.public GenericClob(java.sql.Clob clob, byte[] clobData)
Creates an instance of this class with data as described in
clobData
and using the transaction context from clob
to use the
Clob locator
in the database.
clob
- name of the Clob to use as a GenericClob.clobData
- data to fill the Clob.public GenericClob(java.sql.Clob clob, char[] clobData)
Creates an instance of this class with char data as described in
clobData
and using the transaction context from clob
to use the
Clob locator
in the database.
clob
- name of the Clob to use as a GenericClob.clobData
- data to fill the Clob.public GenericClob(GenericClob nclob, byte[] clobData)
clobData
and using the transaction context from clob
to use the clob-locator
in the database.
This constructor should be used by applications using the framework to create GenericClob objects.
nclob
- name of the Clob to use as a GenericClob.clobData
- data to fill the Clob.public GenericClob(GenericClob nclob, char[] clobData, java.sql.Connection conn)
clobData
and using the transaction context from clob
to use the clob-locator
in the database.
This constructor should be used by applications using the framework to create GenericClob objects.
nclob
- name of the Clob to use as a GenericClob.clobData
- data to fill the Clob.public GenericClob(ResponseValues respVals)
Method Detail |
---|
public void useCLOB(java.sql.Clob newClob)
If this object does not have a transaction context, shares the transaction
and Clob locator from newClob
.
newClob
- name of the Clob with which this Clob will share its
transaction and Clob locator information.public ResponseValues marshal()
marshal
in interface MarshalledDomain
marshal
in class BaseLobDomain
public void prepareForDML(java.lang.Object context)
prepareForDML
in interface BlobDomainInterface
prepareForDML
in class BaseLobDomain
public void setIsBindVar(boolean isBindVar)
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.
saveToDatabase
in interface BlobDomainInterface
saveToDatabase
in class BaseLobDomain
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.
saveToDatabase
in interface BlobDomainInterface
saveToDatabase
in class BaseLobDomain
java.sql.SQLException
public boolean equals(java.lang.Object obj)
equals
in class BaseLobDomain
obj
- the object to compare to this GenericClob.public static XMLDomainFactory getXMLDomainFactory(java.lang.Class attrClass)
public static java.sql.Clob createEmptyCLOB(java.lang.Object context)
context
- an internal framework context.public java.lang.String getSubString(long offset, int length)
Clob
value
designated by this Clob
object.
The substring begins at position
offset
and has up to length
consecutive
characters.
getSubString
in interface java.sql.Clob
offset
- the first character of the substring to be extracted.
The first character is at position 0.length
- the number of consecutive characters to be copied
String
that is the specified substring in
the Clob
value designated by this Clob
object
java.sql.SQLException
- if there is an error accessing the
Clob
public java.io.OutputStream getAsciiOutputStream()
public java.io.InputStream getInputStream()
Clob
value designated by this Clob
object as a stream of Ascii bytes.
getInputStream
in interface LobStreamInterface
getInputStream
in class BaseLobDomain
Clob
data
Clob
valuepublic java.io.InputStream getAsciiStream()
Clob
value designated by this Clob
object as a stream of Ascii bytes.
getAsciiStream
in interface java.sql.Clob
Clob
data
Clob
valuepublic java.io.OutputStream setAsciiStream(long pos) throws java.sql.SQLException
setAsciiStream
in interface java.sql.Clob
java.sql.SQLException
public java.io.Writer setCharacterStream(long pos) throws java.sql.SQLException
setCharacterStream
in interface java.sql.Clob
java.sql.SQLException
public void truncate(long len) throws java.sql.SQLException
truncate
in interface java.sql.Clob
java.sql.SQLException
protected void resetCachedData()
resetCachedData
in class BaseLobDomain
public char[] getStorageCharArray()
public byte[] getStorageByteArray()
getStorageByteArray
in class BaseLobDomain
public byte[] getStorageByteArray(java.lang.String enc)
public java.io.OutputStream getOutputStream()
getOutputStream
in interface LobStreamInterface
getOutputStream
in class BaseLobDomain
public java.io.Writer getCharacterOutputStream()
getCharacterOutputStream
in interface LobStreamInterface
protected java.io.Writer getCharacterOutputStream(long pos)
public void closeCharacterStream()
Clob
contents as a Unicode reader.
Clob
closeCharacterStream
in interface LobStreamInterface
closeCharacterStream
in class BaseLobDomain
public java.io.Reader getCharacterStream()
Clob
contents as a Unicode reader.
getCharacterStream
in interface java.sql.Clob
getCharacterStream
in interface LobStreamInterface
getCharacterStream
in class BaseLobDomain
Clob
data
java.sql.SQLException
- if there is an error accessing the
Clob
public java.io.Reader getCharacterStream(java.lang.String enc)
Clob
contents as a Unicode stream that uses the named character encoding.
Clob
data
java.sql.SQLException
- if there is an error accessing the
Clob
public java.io.Reader getCharacterStream(long pos, long length) throws java.sql.SQLException
getCharacterStream
in interface java.sql.Clob
java.sql.SQLException
public long position(java.lang.String searchstr, long start) throws java.sql.SQLException
position
in interface java.sql.Clob
java.sql.SQLException
public long position(java.sql.Clob searchstr, long start) throws java.sql.SQLException
position
in interface java.sql.Clob
java.sql.SQLException
public int setString(long pos, java.lang.String str, int offset, int length) throws java.sql.SQLException
setString
in interface java.sql.Clob
java.sql.SQLException
public int setString(long pos, java.lang.String str) throws java.sql.SQLException
setString
in interface java.sql.Clob
java.sql.SQLException
public void setBytes(byte[] clobData)
setBytes
in class BaseLobDomain
clobData
- data to fill the Blob.public void setChars(char[] clobData)
clobData
- data to fill the Blob.public void syncClientLob(LobInterface oldObj)
syncClientLob
in interface LobInterface
syncClientLob
in class BaseLobDomain
public void syncServerLob(LobInterface oldObj)
syncServerLob
in interface LobInterface
syncServerLob
in class BaseLobDomain
public java.lang.String toString()
toString
in class BaseLobDomain
public java.lang.Object getData()
getData
in interface DomainInterface
getData
in class BaseLobDomain
public char[] toCharArray()
protected byte[] readBytesFromLob(long offset, int length)
readBytesFromLob
in class BaseLobDomain
protected void writeBytesToLob()
writeBytesToLob
in class BaseLobDomain
protected java.io.OutputStream getInternalOutputStream(long pos)
getInternalOutputStream
in class BaseLobDomain
protected java.io.InputStream getInternalStream()
getInternalStream
in class BaseLobDomain
protected java.io.InputStream getInternalStream(long pos, long length)
getInternalStream
in class BaseLobDomain
protected java.io.InputStream getInternalDataStream()
getInternalDataStream
in class BaseLobDomain
protected java.io.InputStream getInternalDataStream(long pos, long length)
getInternalDataStream
in class BaseLobDomain
protected void syncLob(java.lang.Object otherLob)
syncLob
in class BaseLobDomain
public long getLength()
Clob
value
designated by this Clob
object.
getLength
in class BaseLobDomain
Clob
in characterspublic int getBufferSize()
public void closeOutputStream()
LobStreamInterface
closeOutputStream
in interface LobStreamInterface
closeOutputStream
in class BaseLobDomain
public void closeCharacterOutputStream()
LobStreamInterface
closeCharacterOutputStream
in interface LobStreamInterface
public Node getXMLContentNode(Document xmlDoc)
getXMLContentNode
in interface XMLDomainInterface
xmlDoc
- name of the XML document.public java.lang.String printXMLDefinition(java.util.Hashtable allDefs, java.io.PrintWriter pw, boolean bContainees)
printXMLDefinition
in interface XMLDomainInterface
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 void free() throws java.sql.SQLException
free
in interface java.sql.Clob
java.sql.SQLException
public long length() throws java.sql.SQLException
length
in interface java.sql.Clob
java.sql.SQLException
|
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 |