Package org.intermine.objectstore.query
Class PendingClob
- java.lang.Object
-
- org.intermine.objectstore.query.ClobAccess
-
- org.intermine.objectstore.query.PendingClob
-
- All Implemented Interfaces:
java.lang.CharSequence
,Lazy
public class PendingClob extends ClobAccess
Subclass of ClobAccess that contains data to be written to the database instead of access to data already in the database.- Author:
- Matthew Wakeling
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.intermine.objectstore.query.ClobAccess
ClobAccess.ClobAccessSubclassFactory
-
-
Field Summary
-
Fields inherited from class org.intermine.objectstore.query.ClobAccess
clob, length, offset, os, results, subSequence
-
-
Constructor Summary
Constructors Constructor Description PendingClob(java.lang.String text)
Construct a PendingClob from a String.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char
charAt(int index)
Return a character from the specified index.Clob
getClob()
Return the Clob that this object is accessing.java.lang.String
getDbDescription()
Returns a String that describes this object sufficiently for it to be recreated given an ObjectStore.ObjectStore
getObjectStore()
Returns the ObjectStore that this object will use to access data.int
getOffset()
Return the offset into the underlying clob that this object is using.int
length()
Returns the length of this character sequence.PendingClob
subSequence(int start, int end)
Returns a new CharSequence that is a subsequence of this sequence, from start (inclusive) to end (exclusive).java.lang.String
toString()
Converts the Clob into a String.-
Methods inherited from class org.intermine.objectstore.query.ClobAccess
decodeDbDescription, drainToPrintStream, getLengthWithoutInit, getOs, getResultsWithoutInit, getSubSequence, init
-
-
-
-
Method Detail
-
getClob
public Clob getClob()
Return the Clob that this object is accessing.- Overrides:
getClob
in classClobAccess
- Returns:
- a Clob object
-
getOffset
public int getOffset()
Return the offset into the underlying clob that this object is using.- Overrides:
getOffset
in classClobAccess
- Returns:
- an int
-
charAt
public char charAt(int index)
Return a character from the specified index.- Specified by:
charAt
in interfacejava.lang.CharSequence
- Overrides:
charAt
in classClobAccess
- Parameters:
index
- the position from which to return a character- Returns:
- a character
- Throws:
java.lang.IndexOutOfBoundsException
- if the index argument is negative or not less than length()
-
length
public int length()
Returns the length of this character sequence.- Specified by:
length
in interfacejava.lang.CharSequence
- Overrides:
length
in classClobAccess
- Returns:
- the number of chars in this sequence
-
subSequence
public PendingClob subSequence(int start, int end)
Returns a new CharSequence that is a subsequence of this sequence, from start (inclusive) to end (exclusive).- Specified by:
subSequence
in interfacejava.lang.CharSequence
- Overrides:
subSequence
in classClobAccess
- Parameters:
start
- the start index, inclusiveend
- the end index, exclusive- Returns:
- the specified sequence
-
getObjectStore
public ObjectStore getObjectStore()
Returns the ObjectStore that this object will use to access data.- Specified by:
getObjectStore
in interfaceLazy
- Overrides:
getObjectStore
in classClobAccess
- Returns:
- an ObjectStore
-
toString
public java.lang.String toString()
Converts the Clob into a String. Be careful that it can fit in memory!- Specified by:
toString
in interfacejava.lang.CharSequence
- Overrides:
toString
in classClobAccess
- Returns:
- a String
-
getDbDescription
public java.lang.String getDbDescription()
Returns a String that describes this object sufficiently for it to be recreated given an ObjectStore. This format is stored in the database.- Overrides:
getDbDescription
in classClobAccess
- Returns:
- a String
-
-