Interface OracleClob
-
- All Superinterfaces:
Clob
- All Known Subinterfaces:
OracleNClob
public interface OracleClob extends Clob
This interface extends the standard JDBC interfaceClob
and defines methods for Oracle specific Clob .Generally any new code should avoid the direct use of the class
CLOB
. For variable declarations use the interfaceClob
or this interface as required. Instead of the static methodsCLOB.createTemporary(java.sql.Connection, boolean, int)
andCLOB.empty_lob()
please useConnection.createClob()
andCLOB.getEmptyCLOB()
respectively.- Since:
- 11.2.0.3
-
<section role="region">
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
close()
Close a previously opened CLOB.boolean
isEmptyLob()
Return true if this is a empty lob.boolean
isOpen()
Check whether the CLOB is opened.boolean
isSecureFile()
Returnstrue
if this is a SecureFile (LOBs with the STORE AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1).boolean
isTemporary()
Return true if the lob locator points to a temporary clob.void
open(LargeObjectAccessMode mode)
Open a CLOB in the indicated mode.default Flow.Publisher<String>
publisherOracle(long position)
Returns aPublisher
that publishes the content of thisClob
beginning at the specified position.default Flow.Subscriber<String>
subscriberOracle(long position)
Returns aSubscriber
that will append the published characters to thisClob
beginning at the specified position.default Flow.Subscriber<String>
subscriberOracle(long position, Flow.Subscriber<Long> outcomeSubscriber)
Returns aSubscriber
that will append the published characters to thisClob
beginning at the specified position.SQLXML
toSQLXML()
Returns an object which impements java.sql.SQLXML with content taken from this Clob.SQLXML
toSQLXML(String schemaURL)
Returns an object which impements java.sql.SQLXML with content taken from this Clob.-
Methods inherited from interface java.sql.Clob
free, getAsciiStream, getCharacterStream, getCharacterStream, getSubString, length, position, position, setAsciiStream, setCharacterStream, setString, setString, truncate
-
-
-
<section role="region">
-
Method Detail
-
open
void open(LargeObjectAccessMode mode) throws SQLException
Open a CLOB in the indicated mode. Valid modes include MODE_READONLY, and MODE_READWRITE. It is an error to open the same LOB twice.- Throws:
SQLException
- Since:
- 8.2.0
-
close
void close() throws SQLException
Close a previously opened CLOB.- Throws:
SQLException
- Since:
- 8.2.0
-
isOpen
boolean isOpen() throws SQLException
Check whether the CLOB is opened.- Returns:
- true if the LOB is opened.
- Throws:
SQLException
- Since:
- 8.2.0
-
isTemporary
boolean isTemporary() throws SQLException
Return true if the lob locator points to a temporary clob. False if it does not.- Returns:
- true if the lob locator points to a temporary clob. False if it does not.
- Throws:
SQLException
- Since:
- 8.2.0
-
isEmptyLob
boolean isEmptyLob() throws SQLException
Return true if this is a empty lob.- Returns:
- true if this is a empty lob.
- Throws:
SQLException
- Since:
- 8.1.7
- See Also:
empty_lob
-
isSecureFile
boolean isSecureFile() throws SQLException
Returnstrue
if this is a SecureFile (LOBs with the STORE AS SECUREFILE option, which were introduced in Oracle Database 11g Release 1).- Returns:
true
if this is a SecureFile andfalse
otherwise.- Throws:
SQLException
-
toSQLXML
SQLXML toSQLXML() throws SQLException
Returns an object which impements java.sql.SQLXML with content taken from this Clob.- Returns:
- the new SQLXML object
- Throws:
SQLException
- Since:
- 12.2
-
toSQLXML
SQLXML toSQLXML(String schemaURL) throws SQLException
Returns an object which impements java.sql.SQLXML with content taken from this Clob.- Returns:
- the new SQLXML object
- Throws:
SQLException
- Since:
- 12.2
-
publisherOracle
default Flow.Publisher<String> publisherOracle(long position) throws SQLException
Returns aPublisher
that publishes the content of thisClob
beginning at the specified position. The argument to each call toSubscriber.onNext
will contain an implementation defined number of characters.Calling any method of this
Clob
exceptisEmptyLob()
,isSecureFile()
,isTemporary()
, or one defined byObject
between the time this method is called and the time when the returned publisher terminates will block.The returned publisher terminates once all subscribers have received
Subscriber.onComplete
, receivedSubscriber.onError
, or cancelled their subscription.- Parameters:
position
- the position at which to start writing to the CLOB value that thisClob
object represents; The first position is 1- Returns:
- a
Publisher
of the content of thisClob
- Throws:
SQLException
- if a database error occurs, or if this method is called on aClob
that has been freed, or ifposition
is less than 1- Since:
- 20
-
subscriberOracle
default Flow.Subscriber<String> subscriberOracle(long position) throws SQLException
Returns aSubscriber
that will append the published characters to thisClob
beginning at the specified position.Calling any method of this
Clob
exceptisEmptyLob()
,isSecureFile()
,isTemporary()
, or one defined byObject
between the time this method is called and the time when the returnedSubscriber
terminates will block.The returned
Subscriber
terminates onceSubscriber.onComplete
is received,Subscriber.onError
is received, or its subscription is cancelled.- Parameters:
position
- the position at which to start writing to the CLOB value that thisClob
object represents; The first position is 1- Returns:
- a
Subscriber
that appends characters to thisClob
- Throws:
SQLException
- if a database error occurs, or if this method is called on aClob
that has been freed, or ifposition
is less than 1
-
subscriberOracle
default Flow.Subscriber<String> subscriberOracle(long position, Flow.Subscriber<Long> outcomeSubscriber) throws SQLException
Returns aSubscriber
that will append the published characters to thisClob
beginning at the specified position.Calling any method of this
Clob
exceptisEmptyLob()
,isSecureFile()
,isTemporary()
, or one defined byObject
between the time this method is called and the time when the returnedSubscriber
terminates will block.The returned
Subscriber
terminates onceSubscriber.onComplete
is received,Subscriber.onError
is received, or its subscription is cancelled.The outcome of writing published characters to the CLOB value that this Clob object represents is published to the
outcomeSubscriber
:- The
outcomeSubscriber
receives anonNext
signal each time a write to the CLOB value is successful. The number of characters transferred by each successful write is delivered with each invocation ofonNext
. - The
outcomeSubscriber
receives anonComplete
signal after the last published character has been written successfully. - The
outcomeSubscriber
receives anonError
signal with aSQLException
if a failure occurs when writing published characters.
outcomeSubscriber
must signal demand in order to receive any of the signals listed above. If more thanFlow.defaultBufferSize()
writes have succeeded without demand from theoutcomeSubscriber
, then the returned subscriber will not signal further demand until theoutcomeSubscriber
has also signalled demand.The number of writes used to transfer published characters to the CLOB value is implementation defined, and may be different from the number of Strings published to the returned
Subscriber
.- Parameters:
position
- the position at which to start writing to the CLOB value that thisClob
object represents; The first position is 1outcomeSubscriber
- aSubscriber
of write outcomes.- Returns:
- a
Subscriber
that appends characters to thisClob
- Throws:
SQLException
- if a database error occurs, or if this method is called on aClob
that has been freed, or ifposition
is less than 1NullPointerException
- if theoutcomeSubscriber
argument is null.- Since:
- 20
- The
-
-