org.apache.calcite.avatica

## Class Meta.CursorFactory

- java.lang.Object
- - org.apache.calcite.avatica.Meta.CursorFactory

Enclosing interface:
  Meta

    public static final class Meta.CursorFactory
    extends Object

Information necessary to convert an `Iterable` into a `Cursor`.

### Field Summary

Fields
`static Meta.CursorFactory` `ARRAY`
`Class` `clazz`
`List<String>` `fieldNames`
`List<Field>` `fields`
`static Meta.CursorFactory` `LIST`
`static Meta.CursorFactory` `OBJECT`
`Meta.Style` `style`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
`static Meta.CursorFactory` `create(Meta.Style style, Class clazz, List<String> fieldNames)`
`static Meta.CursorFactory` `deduce(List<ColumnMetaData> columns, Class resultClazz)` Deduces the appropriate `CursorFactory` for accessing the underlying result set.
`boolean` `equals(Object o)`
`static Meta.CursorFactory` `fromProto(org.apache.calcite.avatica.proto.Common.CursorFactory proto)`
`int` `hashCode()`
`static Meta.CursorFactory` `map(List<String> fieldNames)`
`static Meta.CursorFactory` `record(Class resultClazz)` Deprecated. Use `record(Class, List, List)`
`static Meta.CursorFactory` `record(Class resultClass, List<Field> fields, List<String> fieldNames)`
`org.apache.calcite.avatica.proto.Common.CursorFactory` `toProto()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### style

    public final Meta.Style style

#### clazz

    public final Class clazz

#### fields

    public final List<Field> fields

#### fieldNames

    public final List<String> fieldNames

#### OBJECT

    public static final Meta.CursorFactory OBJECT

#### ARRAY

    public static final Meta.CursorFactory ARRAY

#### LIST

    public static final Meta.CursorFactory LIST

### Method Detail

#### create

    public static Meta.CursorFactory create(Meta.Style style,
                                            Class clazz,
                                            List<String> fieldNames)

#### record

    @Deprecated
    public static Meta.CursorFactory record(Class resultClazz)

Deprecated. Use `record(Class, List, List)`

#### record

    public static Meta.CursorFactory record(Class resultClass,
                                            List<Field> fields,
                                            List<String> fieldNames)

#### map

    public static Meta.CursorFactory map(List<String> fieldNames)

#### deduce

    public static Meta.CursorFactory deduce(List<ColumnMetaData> columns,
                                            Class resultClazz)

Deduces the appropriate `CursorFactory` for accessing the underlying result set. For result sets composed by records, `resultClazz` must be not null, and each field name in `columns` must match one of its public fields.

Parameters:
  `columns` - The columns metadata for the result set
  `resultClazz` - The class representing the records, if any
Returns:
  the appropriate `CursorFactory` for the underlying result set
Throws:
  `RuntimeException` - if the field name validation fails

#### toProto

    public org.apache.calcite.avatica.proto.Common.CursorFactory toProto()

#### fromProto

    public static Meta.CursorFactory fromProto(org.apache.calcite.avatica.proto.Common.CursorFactory proto)

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`