Class 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
    • Constructor Detail

      • PendingClob

        public PendingClob​(java.lang.String text)
        Construct a PendingClob from a String.
        Parameters:
        text - the String
    • Method Detail

      • getClob

        public Clob getClob()
        Return the Clob that this object is accessing.
        Overrides:
        getClob in class ClobAccess
        Returns:
        a Clob object
      • getOffset

        public int getOffset()
        Return the offset into the underlying clob that this object is using.
        Overrides:
        getOffset in class ClobAccess
        Returns:
        an int
      • charAt

        public char charAt​(int index)
        Return a character from the specified index.
        Specified by:
        charAt in interface java.lang.CharSequence
        Overrides:
        charAt in class ClobAccess
        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 interface java.lang.CharSequence
        Overrides:
        length in class ClobAccess
        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 interface java.lang.CharSequence
        Overrides:
        subSequence in class ClobAccess
        Parameters:
        start - the start index, inclusive
        end - the end index, exclusive
        Returns:
        the specified sequence
      • toString

        public java.lang.String toString()
        Converts the Clob into a String. Be careful that it can fit in memory!
        Specified by:
        toString in interface java.lang.CharSequence
        Overrides:
        toString in class ClobAccess
        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 class ClobAccess
        Returns:
        a String