org.apache.calcite.avatica

## Class AvaticaSite

- java.lang.Object
- - org.apache.calcite.avatica.AvaticaSite

    public class AvaticaSite
    extends Object

A location that a value can be written to or read from.

### Nested Class Summary

Nested Classes
`private static class` `AvaticaSite.Dummy` Singleton value to denote parameters that have been set to null (as opposed to not set).

### Field Summary

Fields
`(package private) Calendar` `calendar` Calendar is not thread-safe.
`static Object` `DUMMY_VALUE` Value that means the parameter has been set to null.
`private int` `index`
`(package private) AvaticaParameter` `parameter`
`(package private) TypedValue[]` `slots`

### Constructor Summary

Constructors
Constructor and Description
`AvaticaSite(AvaticaParameter parameter, Calendar calendar, int index, TypedValue[] slots)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static Object` `get(Cursor.Accessor accessor, int targetSqlType, Calendar localCalendar)` Similar logic to `setObject(java.lang.Object, int)`.
`boolean` `isSet(int index)`
`private static RuntimeException` `notImplemented()`
`void` `setArray(Array x)`
`void` `setAsciiStream(InputStream x)`
`void` `setAsciiStream(InputStream x, long length)`
`void` `setBigDecimal(BigDecimal x)`
`void` `setBinaryStream(InputStream x)`
`void` `setBinaryStream(InputStream x, long length)`
`void` `setBlob(Blob x)`
`void` `setBlob(InputStream inputStream)`
`void` `setBlob(InputStream inputStream, long length)`
`void` `setBoolean(boolean o)`
`void` `setByte(byte o)`
`void` `setBytes(byte[] x)`
`void` `setChar(char o)`
`void` `setCharacterStream(Reader reader)`
`void` `setCharacterStream(Reader reader, long length)`
`void` `setClob(Clob x)`
`void` `setClob(Reader reader)`
`void` `setClob(Reader reader, long length)`
`void` `setDate(Date x, Calendar calendar)`
`void` `setDouble(double x)`
`void` `setFloat(float x)`
`void` `setInt(int o)`
`void` `setLong(long o)`
`void` `setNCharacterStream(Reader value)`
`void` `setNCharacterStream(Reader value, long length)`
`void` `setNClob(NClob value)`
`void` `setNClob(Reader reader)`
`void` `setNClob(Reader reader, long length)`
`void` `setNString(String o)`
`void` `setNull(int sqlType)`
`void` `setNull(int sqlType, String typeName)`
`void` `setObject(Object x)`
`void` `setObject(Object x, int targetSqlType)`
`void` `setObject(Object x, int targetSqlType, int scaleOrLength)`
`void` `setRef(Ref x)`
`void` `setRowId(RowId x)`
`void` `setShort(short o)`
`void` `setSQLXML(SQLXML xmlObject)`
`void` `setString(String x)`
`void` `setTime(Time x, Calendar calendar)`
`void` `setTimestamp(Timestamp x, Calendar calendar)`
`void` `setUnicodeStream(InputStream x, int length)`
`void` `setURL(URL x)`
`private static Array` `toArray(Object x)`
`static BigDecimal` `toBigDecimal(Object x)`
`private static boolean` `toBoolean(Object x)`
`private static byte` `toByte(Object x)`
`private static byte[]` `toBytes(Object x)`
`private static Date` `toDate(Object x)`
`private static double` `toDouble(Object x)`
`private static float` `toFloat(Object x)`
`private static int` `toInt(Object x)`
`private static long` `toLong(Object x)`
`private static short` `toShort(Object x)`
`private static String` `toString(Object x)`
`private static Time` `toTime(Object x)`
`private static Timestamp` `toTimestamp(Object x)`
`private static RuntimeException` `unsupportedCast(Class<?> from, Class<?> to)`
`private TypedValue` `wrap(ColumnMetaData.Rep rep, Object o)`
`private TypedValue` `wrap(ColumnMetaData.Rep rep, Object o, Calendar calendar)`

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

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

### Field Detail

#### parameter

    final AvaticaParameter parameter

#### calendar

    final Calendar calendar

Calendar is not thread-safe. But calendar is only used from within one thread, and we have to trust that clients are not modifying calendars that they pass to us in a method such as `PreparedStatement.setTime(int, Time, Calendar)`, so we do not need to synchronize access.

#### index

    private final int index

#### slots

    final TypedValue[] slots

#### DUMMY_VALUE

    public static final Object DUMMY_VALUE

Value that means the parameter has been set to null. If value is null, parameter has not been set.

### Constructor Detail

#### AvaticaSite

    public AvaticaSite(AvaticaParameter parameter,
                       Calendar calendar,
                       int index,
                       TypedValue[] slots)

### Method Detail

#### wrap

    private TypedValue wrap(ColumnMetaData.Rep rep,
                            Object o,
                            Calendar calendar)

#### wrap

    private TypedValue wrap(ColumnMetaData.Rep rep,
                            Object o)

#### isSet

    public boolean isSet(int index)

#### setByte

    public void setByte(byte o)

#### setChar

    public void setChar(char o)

#### setShort

    public void setShort(short o)

#### setInt

    public void setInt(int o)

#### setLong

    public void setLong(long o)

#### setBoolean

    public void setBoolean(boolean o)

#### setRowId

    public void setRowId(RowId x)

#### setNString

    public void setNString(String o)

#### setNCharacterStream

    public void setNCharacterStream(Reader value,
                                    long length)

#### setNClob

    public void setNClob(NClob value)

#### setClob

    public void setClob(Reader reader,
                        long length)

#### setBlob

    public void setBlob(InputStream inputStream,
                        long length)

#### setNClob

    public void setNClob(Reader reader,
                         long length)

#### setSQLXML

    public void setSQLXML(SQLXML xmlObject)

#### setAsciiStream

    public void setAsciiStream(InputStream x,
                               long length)

#### setBinaryStream

    public void setBinaryStream(InputStream x,
                                long length)

#### setCharacterStream

    public void setCharacterStream(Reader reader,
                                   long length)

#### setAsciiStream

    public void setAsciiStream(InputStream x)

#### setBinaryStream

    public void setBinaryStream(InputStream x)

#### setCharacterStream

    public void setCharacterStream(Reader reader)

#### setNCharacterStream

    public void setNCharacterStream(Reader value)

#### setClob

    public void setClob(Reader reader)

#### setBlob

    public void setBlob(InputStream inputStream)

#### setNClob

    public void setNClob(Reader reader)

#### setUnicodeStream

    public void setUnicodeStream(InputStream x,
                                 int length)

#### setFloat

    public void setFloat(float x)

#### setDouble

    public void setDouble(double x)

#### setBigDecimal

    public void setBigDecimal(BigDecimal x)

#### setString

    public void setString(String x)

#### setBytes

    public void setBytes(byte[] x)

#### setTimestamp

    public void setTimestamp(Timestamp x,
                             Calendar calendar)

#### setTime

    public void setTime(Time x,
                        Calendar calendar)

#### setDate

    public void setDate(Date x,
                        Calendar calendar)

#### setObject

    public void setObject(Object x,
                          int targetSqlType)

#### get

    public static Object get(Cursor.Accessor accessor,
                             int targetSqlType,
                             Calendar localCalendar)
                      throws SQLException

Similar logic to `setObject(java.lang.Object, int)`.

Throws:
  `SQLException`

#### setObject

    public void setObject(Object x)

#### setNull

    public void setNull(int sqlType)

#### setRef

    public void setRef(Ref x)

#### setBlob

    public void setBlob(Blob x)

#### setClob

    public void setClob(Clob x)

#### setArray

    public void setArray(Array x)

#### setNull

    public void setNull(int sqlType,
                        String typeName)

#### setURL

    public void setURL(URL x)

#### setObject

    public void setObject(Object x,
                          int targetSqlType,
                          int scaleOrLength)

#### unsupportedCast

    private static RuntimeException unsupportedCast(Class<?> from,
                                                    Class<?> to)

#### notImplemented

    private static RuntimeException notImplemented()

#### toArray

    private static Array toArray(Object x)

#### toBigDecimal

    public static BigDecimal toBigDecimal(Object x)

#### toBoolean

    private static boolean toBoolean(Object x)

#### toByte

    private static byte toByte(Object x)

#### toBytes

    private static byte[] toBytes(Object x)

#### toDate

    private static Date toDate(Object x)

#### toTime

    private static Time toTime(Object x)

#### toTimestamp

    private static Timestamp toTimestamp(Object x)

#### toDouble

    private static double toDouble(Object x)

#### toFloat

    private static float toFloat(Object x)

#### toInt

    private static int toInt(Object x)

#### toLong

    private static long toLong(Object x)

#### toShort

    private static short toShort(Object x)

#### toString

    private static String toString(Object x)