Package org.jooq.impl

Class ArrayRecordImpl<T>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, ArrayRecord<T>, Attachable, Formattable

    @Pro
    @Internal
    public class ArrayRecordImpl<T>
    extends java.lang.Object
    implements ArrayRecord<T>
    A common base class for Oracle ARRAY types

    This type is for JOOQ INTERNAL USE only. Do not reference directly

    Author:
    Lukas Eder
    See Also:
    Serialized Form
    • Method Detail

      • get

        @Deprecated
        public final T[] get()
        Deprecated.
        Description copied from interface: ArrayRecord
        Get the contained array.
        Specified by:
        get in interface ArrayRecord<T>
      • getList

        @Deprecated
        public final java.util.List<T> getList()
        Deprecated.
        Description copied from interface: ArrayRecord
        Get the contained array as a List.
        Specified by:
        getList in interface ArrayRecord<T>
      • set

        @Deprecated
        public final void set​(T... array)
        Deprecated.
        Description copied from interface: ArrayRecord
        Set the contained array.
        Specified by:
        set in interface ArrayRecord<T>
      • set

        @Deprecated
        public final void set​(java.sql.Array array)
                       throws java.sql.SQLException
        Deprecated.
        Description copied from interface: ArrayRecord
        Set the contained array.
        Specified by:
        set in interface ArrayRecord<T>
        Throws:
        java.sql.SQLException
      • set

        @Deprecated
        public final void set​(java.util.Collection<? extends T> collection)
        Deprecated.
        Description copied from interface: ArrayRecord
        Set the contained array as a List.
        Specified by:
        set in interface ArrayRecord<T>
      • setList

        @Deprecated
        public final void setList​(java.util.List<? extends T> list)
        Deprecated.
        Description copied from interface: ArrayRecord
        Set the contained array as a List.
        Specified by:
        setList in interface ArrayRecord<T>
      • isSQLUsable

        public final boolean isSQLUsable()
        Description copied from interface: ArrayRecord
        Whether this data type can be used from SQL statements.
        Specified by:
        isSQLUsable in interface ArrayRecord<T>
      • getName

        public final java.lang.String getName()
        Description copied from interface: ArrayRecord
        Get the unqualified name of the array type.
        Specified by:
        getName in interface ArrayRecord<T>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • size

        public final int size()
        Specified by:
        size in interface java.util.Collection<T>
        Specified by:
        size in interface java.util.List<T>
      • isEmpty

        public final boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<T>
        Specified by:
        isEmpty in interface java.util.List<T>
      • contains

        public final boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<T>
        Specified by:
        contains in interface java.util.List<T>
      • iterator

        public final java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Specified by:
        iterator in interface java.util.List<T>
      • toArray

        public final java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<T>
        Specified by:
        toArray in interface java.util.List<T>
      • toArray

        public final <Z> Z[] toArray​(Z[] a)
        Specified by:
        toArray in interface java.util.Collection<T>
        Specified by:
        toArray in interface java.util.List<T>
      • add

        public final boolean add​(T e)
        Specified by:
        add in interface java.util.Collection<T>
        Specified by:
        add in interface java.util.List<T>
      • remove

        public final boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<T>
        Specified by:
        remove in interface java.util.List<T>
      • containsAll

        public final boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<T>
        Specified by:
        containsAll in interface java.util.List<T>
      • addAll

        public final boolean addAll​(java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.Collection<T>
        Specified by:
        addAll in interface java.util.List<T>
      • addAll

        public final boolean addAll​(int index,
                                    java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.List<T>
      • removeAll

        public final boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<T>
        Specified by:
        removeAll in interface java.util.List<T>
      • retainAll

        public final boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<T>
        Specified by:
        retainAll in interface java.util.List<T>
      • clear

        public final void clear()
        Specified by:
        clear in interface java.util.Collection<T>
        Specified by:
        clear in interface java.util.List<T>
      • equals

        public final boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<T>
        Specified by:
        equals in interface java.util.List<T>
      • hashCode

        public final int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<T>
        Specified by:
        hashCode in interface java.util.List<T>
      • get

        public final T get​(int index)
        Specified by:
        get in interface java.util.List<T>
      • set

        public final T set​(int index,
                           T element)
        Specified by:
        set in interface java.util.List<T>
      • add

        public final void add​(int index,
                              T element)
        Specified by:
        add in interface java.util.List<T>
      • remove

        public final T remove​(int index)
        Specified by:
        remove in interface java.util.List<T>
      • indexOf

        public final int indexOf​(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List<T>
      • lastIndexOf

        public final int lastIndexOf​(java.lang.Object o)
        Specified by:
        lastIndexOf in interface java.util.List<T>
      • listIterator

        public final java.util.ListIterator<T> listIterator()
        Specified by:
        listIterator in interface java.util.List<T>
      • listIterator

        public final java.util.ListIterator<T> listIterator​(int index)
        Specified by:
        listIterator in interface java.util.List<T>
      • subList

        public final java.util.List<T> subList​(int fromIndex,
                                               int toIndex)
        Specified by:
        subList in interface java.util.List<T>
      • attach

        public final void attach​(Configuration c)
        Description copied from interface: Attachable
        Attach this object to a new Configuration.
        Specified by:
        attach in interface Attachable
        Parameters:
        c - A configuration or null, if you wish to detach this Attachable from its previous configuration.
      • detach

        public final void detach()
        Description copied from interface: Attachable
        Detach this object from its current Configuration.

        This is the same as calling attach(null).

        Specified by:
        detach in interface Attachable
      • format

        public final java.lang.String format()
        Description copied from interface: Formattable
        Get a simple formatted representation of this result.

        This is the same as calling Formattable.format(int) with maxRows = Integer.MAX_VALUE

        Specified by:
        format in interface Formattable
        Returns:
        The formatted result
      • format

        public final java.lang.String format​(int maxRecords)
        Description copied from interface: Formattable
        Get a simple formatted representation of this result.
        Specified by:
        format in interface Formattable
        Parameters:
        maxRecords - The maximum number of records to include in the formatted result
        Returns:
        The formatted result
      • format

        public final java.lang.String format​(TXTFormat format)
        Description copied from interface: Formattable
        Get a simple formatted representation of this result.
        Specified by:
        format in interface Formattable
        Parameters:
        format - The formatting information
        Returns:
        The formatted result
      • format

        public final void format​(java.io.OutputStream stream,
                                 int maxRecords)
        Description copied from interface: Formattable
        Like Formattable.format(int), but the data is output onto an OutputStream.
        Specified by:
        format in interface Formattable
      • formatCSV

        public final java.lang.String formatCSV()
        Description copied from interface: Formattable
        Get a simple formatted representation of this result as CSV.

        This is the same as calling formatCSV(true, ',', "")

        Specified by:
        formatCSV in interface Formattable
        Returns:
        The formatted result
      • formatCSV

        public final java.lang.String formatCSV​(boolean header)
        Description copied from interface: Formattable
        Get a simple formatted representation of this result as CSV.

        This is the same as calling formatCSV(',', "")

        Specified by:
        formatCSV in interface Formattable
        Parameters:
        header - Whether to emit a CSV header line
        Returns:
        The formatted result
      • formatCSV

        public final java.lang.String formatCSV​(char delimiter)
        Description copied from interface: Formattable
        Get a simple formatted representation of this result as CSV.

        This is the same as calling formatCSV(true, delimiter, "")

        Specified by:
        formatCSV in interface Formattable
        Parameters:
        delimiter - The delimiter to use between records
        Returns:
        The formatted result
      • formatCSV

        public final java.lang.String formatCSV​(boolean header,
                                                char delimiter)
        Description copied from interface: Formattable
        Get a simple formatted representation of this result as CSV.

        This is the same as calling formatCSV(delimiter, "")

        Specified by:
        formatCSV in interface Formattable
        Parameters:
        header - Whether to emit a CSV header line
        delimiter - The delimiter to use between records
        Returns:
        The formatted result
      • formatCSV

        public final java.lang.String formatCSV​(char delimiter,
                                                java.lang.String nullString)
        Description copied from interface: Formattable
        Get a simple formatted representation of this result as CSV.

        This is the same as calling formatCSV(true, delimiter, nullString)

        Specified by:
        formatCSV in interface Formattable
        Parameters:
        delimiter - The delimiter to use between records
        nullString - A special string for encoding NULL values.
        Returns:
        The formatted result
      • formatCSV

        public final java.lang.String formatCSV​(boolean header,
                                                char delimiter,
                                                java.lang.String nullString)
        Description copied from interface: Formattable
        Get a simple formatted representation of this result as CSV.
        Specified by:
        formatCSV in interface Formattable
        Parameters:
        header - Whether to emit a CSV header line
        delimiter - The delimiter to use between records
        nullString - A special string for encoding NULL values.
        Returns:
        The formatted result
      • formatCSV

        public final java.lang.String formatCSV​(CSVFormat format)
        Description copied from interface: Formattable
        Get a simple formatted representation of this result as CSV.
        Specified by:
        formatCSV in interface Formattable
        Returns:
        The formatted result
      • formatJSON

        public final java.lang.String formatJSON()
        Description copied from interface: Formattable
        Get a simple formatted representation of this result as a JSON array of array.

        The format is the following:

         {"fields":[{"name":"field-1","type":"type-1"},
                    {"name":"field-2","type":"type-2"},
                    ...,
                    {"name":"field-n","type":"type-n"}],
          "records":[[value-1-1,value-1-2,...,value-1-n],
                     [value-2-1,value-2-2,...,value-2-n]]}
         
        Specified by:
        formatJSON in interface Formattable
        Returns:
        The formatted result
      • formatJSON

        public final java.lang.String formatJSON​(JSONFormat format)
        Description copied from interface: Formattable
        Get a simple formatted representation of this result as a JSON data structure, according to the format.
        Specified by:
        formatJSON in interface Formattable
        Returns:
        The formatted result
        See Also:
        JSONFormat
      • formatChart

        public final java.lang.String formatChart()
        Specified by:
        formatChart in interface Formattable
      • formatInsert

        public final java.lang.String formatInsert()
        Description copied from interface: Formattable
        Get this result as a set of INSERT statements.

        This uses the the first record's TableRecord.getTable(), if the first record is a TableRecord. Otherwise, this generates INSERT statements into an "UNKNOWN_TABLE". In both cases, the Result.fields() are used for column names.

        Specified by:
        formatInsert in interface Formattable
      • formatInsert

        public final java.lang.String formatInsert​(Table<?> table,
                                                   Field<?>... f)
        Description copied from interface: Formattable
        Get this result as a set of INSERT statements.

        This explicitly specifies the table (and optionally the fields) to insert into. If the fields argument is left empty, the Result.fields() are used, instead.

        Specified by:
        formatInsert in interface Formattable
      • formatHTML

        public final java.lang.String formatHTML()
        Description copied from interface: Formattable
        Get a simple formatted representation of this result as HTML.

        The HTML code is formatted as follows:

         <table>
           <thead>
             <tr>
               <th>field-1</th>
               <th>field-2</th>
               ...
               <th>field-n</th>
             </tr>
           </thead>
           <tbody>
             <tr>
               <th>value-1-1</th>
               <th>value-1-2</th>
               ...
               <th>value-1-n</th>
             </tr>
             <tr>
               <th>value-2-1</th>
               <th>value-2-2</th>
               ...
               <th>value-2-n</th>
             </tr>
             ...
           </tbody>
         </table>
         
        Specified by:
        formatHTML in interface Formattable
        Returns:
        The formatted result
      • intoXML

        public final <H extends org.xml.sax.ContentHandler> H intoXML​(H handler)
                                                               throws org.xml.sax.SAXException
        Description copied from interface: Formattable
        Get this result as XML using a SAX ContentHandler.
        Specified by:
        intoXML in interface Formattable
        Parameters:
        handler - The custom content handler.
        Returns:
        The argument content handler is returned for convenience.
        Throws:
        org.xml.sax.SAXException
        See Also:
        Formattable.formatXML(), http://www.jooq.org/xsd/jooq-export-3.10.0.xsd