|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.datatype.ClobImpl
public class ClobImpl
The mapping in the JavaTM programming language for the SQL CLOB type.
An SQL CLOB is a built-in type that stores a Character Large Object as a column value
in a row of a database table. By default drivers implement a Clob object using an SQL
locator(CLOB), which means that a Clob object contains a logical pointer to the
SQL CLOB data rather than the data itself. A Clob object is valid for the duration
of the transaction in which it was created.
The Clob interface provides methods for getting the length of an SQL CLOB
(Character Large Object) value, for materializing a CLOB value on the client, and for
searching for a substring or CLOB object within a CLOB value.
Methods in the interfaces ResultSet, CallableStatement, and PreparedStatement, such as
getClob and setClob allow a programmer to access an SQL CLOB value.
In addition, this interface has methods for updating a CLOB value.
| Constructor Summary | |
|---|---|
ClobImpl(java.lang.String string)
Constructor taking a string. |
|
| Method Summary | |
|---|---|
void |
free()
Free the Blob object and releases the resources that it holds. |
java.io.InputStream |
getAsciiStream()
|
java.io.Reader |
getCharacterStream()
|
java.io.Reader |
getCharacterStream(long pos,
long length)
Returns a Reader object that contains a partial Clob value, starting with the character specified by pos, which is length characters in length. |
java.lang.String |
getSubString(long pos,
int length)
|
long |
length()
|
long |
position(java.sql.Clob searchstr,
long start)
|
long |
position(java.lang.String searchstr,
long start)
|
java.io.OutputStream |
setAsciiStream(long pos)
|
java.io.Writer |
setCharacterStream(long pos)
|
int |
setString(long pos,
java.lang.String str)
|
int |
setString(long pos,
java.lang.String str,
int offset,
int len)
|
void |
truncate(long len)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClobImpl(java.lang.String string)
throws java.io.IOException
string - The string.
java.io.IOException| Method Detail |
|---|
public long length()
throws java.sql.SQLException
length in interface java.sql.Clobjava.sql.SQLException
public void truncate(long len)
throws java.sql.SQLException
truncate in interface java.sql.Clobjava.sql.SQLException
public java.io.InputStream getAsciiStream()
throws java.sql.SQLException
getAsciiStream in interface java.sql.Clobjava.sql.SQLException
public java.io.OutputStream setAsciiStream(long pos)
throws java.sql.SQLException
setAsciiStream in interface java.sql.Clobjava.sql.SQLException
public java.io.Reader getCharacterStream()
throws java.sql.SQLException
getCharacterStream in interface java.sql.Clobjava.sql.SQLException
public java.io.Writer setCharacterStream(long pos)
throws java.sql.SQLException
setCharacterStream in interface java.sql.Clobjava.sql.SQLException
public void free()
throws java.sql.SQLException
free in interface java.sql.Clobjava.sql.SQLException
public java.io.Reader getCharacterStream(long pos,
long length)
throws java.sql.SQLException
getCharacterStream in interface java.sql.Clobpos - the offset to the first byte of the partial value to be retrieved.
The first byte in the Clob is at position 1length - the length in bytes of the partial value to be retrieved
java.sql.SQLException
public java.lang.String getSubString(long pos,
int length)
throws java.sql.SQLException
getSubString in interface java.sql.Clobjava.sql.SQLException
public int setString(long pos,
java.lang.String str)
throws java.sql.SQLException
setString in interface java.sql.Clobjava.sql.SQLException
public int setString(long pos,
java.lang.String str,
int offset,
int len)
throws java.sql.SQLException
setString in interface java.sql.Clobjava.sql.SQLException
public long position(java.lang.String searchstr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobjava.sql.SQLException
public long position(java.sql.Clob searchstr,
long start)
throws java.sql.SQLException
position in interface java.sql.Clobjava.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||