com.dolphindb.jdbc

## Class TypeCast

- java.lang.Object
- - com.dolphindb.jdbc.TypeCast

    public class TypeCast
    extends Object

### Field Summary

Fields
`static String` `BASIC_BOOLEAN`
`static String` `BASIC_BOOLEAN_VECTOR`
`static String` `BASIC_BYTE`
`static String` `BASIC_BYTE_VECTOR`
`static String` `BASIC_DATE`
`static String` `BASIC_DATE_VECTOR`
`static String` `BASIC_DATETIME`
`static String` `BASIC_DATETIME_VECTOR`
`static String` `BASIC_DOUBLE`
`static String` `BASIC_DOUBLE_VECTOR`
`static String` `BASIC_FLOAT`
`static String` `BASIC_FLOAT_VECTOR`
`static String` `BASIC_INT`
`static String` `BASIC_INT_VECTOR`
`static String` `BASIC_LONG`
`static String` `BASIC_LONG_VECTOR`
`static String` `BASIC_MINUTE`
`static String` `BASIC_MINUTE_VECTOR`
`static String` `BASIC_MONTH`
`static String` `BASIC_MONTH_VECTOR`
`static String` `BASIC_NANOTIME`
`static String` `BASIC_NANOTIME_VECTOR`
`static String` `BASIC_NANOTIMESTAMP`
`static String` `BASIC_NANOTIMESTAMP_VECTOR`
`static String` `BASIC_SECOND`
`static String` `BASIC_SECOND_VECTOR`
`static String` `BASIC_SHORT`
`static String` `BASIC_SHORT_VECTOR`
`static String` `BASIC_STRING`
`static String` `BASIC_STRING_VECTOR`
`static String` `BASIC_TIME`
`static String` `BASIC_TIME_VECTOR`
`static String` `BASIC_TIMESTAMP`
`static String` `BASIC_TIMESTAMP_VECTOR`
`static String` `BASIC_VOID`
`static String` `BOOLEAN`
`static String` `BOOLEANARR`
`static String` `BYTE`
`static String` `BYTEARR`
`static String` `CHAR`
`static String` `CHARARR`
`static String` `DATE`
`static int` `DAY`
`static String` `DOUBLE`
`static String` `DOUBLEARR`
`static String` `FLOAT`
`static String` `FLOATARR`
`static int` `HOUR`
`static String` `INT`
`static String` `INTARR`
`static String` `LOCAL_DATE`
`static String` `LOCAL_DATETIME`
`static String` `LOCAL_TIME`
`static LocalDate` `LOCALDATE`
`static LocalDateTime` `LOCALDATETIME`
`static LocalTime` `LOCALTIME`
`static String` `LONG`
`static String` `LONGARR`
`static int` `MINUTE`
`static int` `MONTH`
`static int` `NANO`
`static com.xxdb.data.Scalar[]` `NULL`
`static int` `SECOND`
`static String` `SHORT`
`static String` `SHORTARR`
`static String` `STRING`
`static String` `TIME`
`static String` `TIMESTAMP`
`static HashMap<Integer,String>` `TYPEINT2STRING`
`static int` `YEAR`
`static String` `YEAR_MONTH`
`static YearMonth` `YEARMONTH`

### Constructor Summary

Constructors
Constructor and Description
`TypeCast()`

### Method Summary

All Methods Static Methods Concrete Methods
`static com.xxdb.data.Entity` `basicType_db2db(com.xxdb.data.Entity srcEntity, String targetEntityClassName)`
`static com.xxdb.data.Entity` `basicType_java2db(Object srcValue, String targetEntityClassName)`
`static com.xxdb.data.Entity` `basicTypeArr2Vector(Object[] srcValue, String targetEntityClassName)`
`static com.xxdb.data.Entity` `basicTypeCast(Object srcValue, String targetEntityClassName)`
`static String` `castDbString(Object o)`
`static Temporal` `castTemporal(Object srcValue, String targetTemporalClassName)`
`static boolean` `CheckedBasicType(String srcEntityClassName, String targetEntityClassName)`
`static boolean` `CheckedDateTime(String srcEntityClassName, String targetEntityClassName)`
`static com.xxdb.data.Entity` `dataTime_java2db(Object srcValue, String targetEntityClassName)`
`static com.xxdb.data.Entity` `dateTime_db2db(com.xxdb.data.Entity srcEntity, String targetEntityClassName)`
`static com.xxdb.data.Entity` `dateTimeArr2Vector(Object[] srcValue, String targetEntityClassName)`
`static com.xxdb.data.Entity` `dateTimeCast(Object srcValue, String targetEntityClassName)`
`static Temporal` `getTemporal(Object value)`
`static com.xxdb.data.Entity` `java2db(Object srcValue, String targetEntityClassName)`
`static Object` `nullScalar(int type)`
`static com.xxdb.data.Entity` `Temporal2dateTime(Temporal srcTemporal, String srcEntityClassName, String targetEntityClassName)`
`static com.xxdb.data.Entity` `Tempos2dateTime(Object[] srcTempos, String srcEntityClassName, String targetEntityClassName)`

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

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

### Field Detail

#### BASIC_MONTH

    public static final String BASIC_MONTH

See Also:
  Constant Field Values

#### BASIC_DATE

    public static final String BASIC_DATE

See Also:
  Constant Field Values

#### BASIC_TIME

    public static final String BASIC_TIME

See Also:
  Constant Field Values

#### BASIC_MINUTE

    public static final String BASIC_MINUTE

See Also:
  Constant Field Values

#### BASIC_SECOND

    public static final String BASIC_SECOND

See Also:
  Constant Field Values

#### BASIC_NANOTIME

    public static final String BASIC_NANOTIME

See Also:
  Constant Field Values

#### BASIC_TIMESTAMP

    public static final String BASIC_TIMESTAMP

See Also:
  Constant Field Values

#### BASIC_DATETIME

    public static final String BASIC_DATETIME

See Also:
  Constant Field Values

#### BASIC_NANOTIMESTAMP

    public static final String BASIC_NANOTIMESTAMP

See Also:
  Constant Field Values

#### BASIC_MONTH_VECTOR

    public static final String BASIC_MONTH_VECTOR

See Also:
  Constant Field Values

#### BASIC_DATE_VECTOR

    public static final String BASIC_DATE_VECTOR

See Also:
  Constant Field Values

#### BASIC_TIME_VECTOR

    public static final String BASIC_TIME_VECTOR

See Also:
  Constant Field Values

#### BASIC_MINUTE_VECTOR

    public static final String BASIC_MINUTE_VECTOR

See Also:
  Constant Field Values

#### BASIC_SECOND_VECTOR

    public static final String BASIC_SECOND_VECTOR

See Also:
  Constant Field Values

#### BASIC_NANOTIME_VECTOR

    public static final String BASIC_NANOTIME_VECTOR

See Also:
  Constant Field Values

#### BASIC_TIMESTAMP_VECTOR

    public static final String BASIC_TIMESTAMP_VECTOR

See Also:
  Constant Field Values

#### BASIC_DATETIME_VECTOR

    public static final String BASIC_DATETIME_VECTOR

See Also:
  Constant Field Values

#### BASIC_NANOTIMESTAMP_VECTOR

    public static final String BASIC_NANOTIMESTAMP_VECTOR

See Also:
  Constant Field Values

#### DATE

    public static final String DATE

See Also:
  Constant Field Values

#### TIME

    public static final String TIME

See Also:
  Constant Field Values

#### TIMESTAMP

    public static final String TIMESTAMP

See Also:
  Constant Field Values

#### LOCAL_DATE

    public static final String LOCAL_DATE

See Also:
  Constant Field Values

#### LOCAL_TIME

    public static final String LOCAL_TIME

See Also:
  Constant Field Values

#### LOCAL_DATETIME

    public static final String LOCAL_DATETIME

See Also:
  Constant Field Values

#### YEAR_MONTH

    public static final String YEAR_MONTH

See Also:
  Constant Field Values

#### YEAR

    public static final int YEAR

See Also:
  Constant Field Values

#### MONTH

    public static final int MONTH

See Also:
  Constant Field Values

#### DAY

    public static final int DAY

See Also:
  Constant Field Values

#### HOUR

    public static final int HOUR

See Also:
  Constant Field Values

#### MINUTE

    public static final int MINUTE

See Also:
  Constant Field Values

#### SECOND

    public static final int SECOND

See Also:
  Constant Field Values

#### NANO

    public static final int NANO

See Also:
  Constant Field Values

#### YEARMONTH

    public static final YearMonth YEARMONTH

#### LOCALTIME

    public static final LocalTime LOCALTIME

#### LOCALDATE

    public static final LocalDate LOCALDATE

#### LOCALDATETIME

    public static final LocalDateTime LOCALDATETIME

#### BASIC_VOID

    public static final String BASIC_VOID

See Also:
  Constant Field Values

#### BASIC_BOOLEAN

    public static final String BASIC_BOOLEAN

See Also:
  Constant Field Values

#### BASIC_BYTE

    public static final String BASIC_BYTE

See Also:
  Constant Field Values

#### BASIC_SHORT

    public static final String BASIC_SHORT

See Also:
  Constant Field Values

#### BASIC_INT

    public static final String BASIC_INT

See Also:
  Constant Field Values

#### BASIC_LONG

    public static final String BASIC_LONG

See Also:
  Constant Field Values

#### BASIC_FLOAT

    public static final String BASIC_FLOAT

See Also:
  Constant Field Values

#### BASIC_DOUBLE

    public static final String BASIC_DOUBLE

See Also:
  Constant Field Values

#### BASIC_STRING

    public static final String BASIC_STRING

See Also:
  Constant Field Values

#### BASIC_BOOLEAN_VECTOR

    public static final String BASIC_BOOLEAN_VECTOR

See Also:
  Constant Field Values

#### BASIC_BYTE_VECTOR

    public static final String BASIC_BYTE_VECTOR

See Also:
  Constant Field Values

#### BASIC_SHORT_VECTOR

    public static final String BASIC_SHORT_VECTOR

See Also:
  Constant Field Values

#### BASIC_INT_VECTOR

    public static final String BASIC_INT_VECTOR

See Also:
  Constant Field Values

#### BASIC_LONG_VECTOR

    public static final String BASIC_LONG_VECTOR

See Also:
  Constant Field Values

#### BASIC_FLOAT_VECTOR

    public static final String BASIC_FLOAT_VECTOR

See Also:
  Constant Field Values

#### BASIC_DOUBLE_VECTOR

    public static final String BASIC_DOUBLE_VECTOR

See Also:
  Constant Field Values

#### BASIC_STRING_VECTOR

    public static final String BASIC_STRING_VECTOR

See Also:
  Constant Field Values

#### BOOLEAN

    public static final String BOOLEAN

See Also:
  Constant Field Values

#### BYTE

    public static final String BYTE

See Also:
  Constant Field Values

#### CHAR

    public static final String CHAR

See Also:
  Constant Field Values

#### SHORT

    public static final String SHORT

See Also:
  Constant Field Values

#### INT

    public static final String INT

See Also:
  Constant Field Values

#### LONG

    public static final String LONG

See Also:
  Constant Field Values

#### FLOAT

    public static final String FLOAT

See Also:
  Constant Field Values

#### DOUBLE

    public static final String DOUBLE

See Also:
  Constant Field Values

#### STRING

    public static final String STRING

See Also:
  Constant Field Values

#### BOOLEANARR

    public static final String BOOLEANARR

See Also:
  Constant Field Values

#### BYTEARR

    public static final String BYTEARR

See Also:
  Constant Field Values

#### CHARARR

    public static final String CHARARR

See Also:
  Constant Field Values

#### SHORTARR

    public static final String SHORTARR

See Also:
  Constant Field Values

#### INTARR

    public static final String INTARR

See Also:
  Constant Field Values

#### LONGARR

    public static final String LONGARR

See Also:
  Constant Field Values

#### FLOATARR

    public static final String FLOATARR

See Also:
  Constant Field Values

#### DOUBLEARR

    public static final String DOUBLEARR

See Also:
  Constant Field Values

#### TYPEINT2STRING

    public static final HashMap<Integer,String> TYPEINT2STRING

#### NULL

    public static com.xxdb.data.Scalar[] NULL

### Constructor Detail

#### TypeCast

    public TypeCast()

### Method Detail

#### nullScalar

    public static Object nullScalar(int type)
                             throws SQLException

Throws:
  `SQLException`

#### castDbString

    public static String castDbString(Object o)

#### java2db

    public static com.xxdb.data.Entity java2db(Object srcValue,
                                               String targetEntityClassName)
                                        throws IOException

Throws:
  `IOException`

#### dateTimeCast

    public static com.xxdb.data.Entity dateTimeCast(Object srcValue,
                                                    String targetEntityClassName)
                                             throws Exception

Throws:
  `Exception`

#### basicTypeCast

    public static com.xxdb.data.Entity basicTypeCast(Object srcValue,
                                                     String targetEntityClassName)
                                              throws IOException

Throws:
  `IOException`

#### dataTime_java2db

    public static com.xxdb.data.Entity dataTime_java2db(Object srcValue,
                                                        String targetEntityClassName)
                                                 throws IOException

Throws:
  `IOException`

#### CheckedDateTime

    public static boolean CheckedDateTime(String srcEntityClassName,
                                          String targetEntityClassName)
                                   throws IOException

Throws:
  `IOException`

#### Tempos2dateTime

    public static com.xxdb.data.Entity Tempos2dateTime(Object[] srcTempos,
                                                       String srcEntityClassName,
                                                       String targetEntityClassName)
                                                throws IOException

Throws:
  `IOException`

#### Temporal2dateTime

    public static com.xxdb.data.Entity Temporal2dateTime(Temporal srcTemporal,
                                                         String srcEntityClassName,
                                                         String targetEntityClassName)
                                                  throws IOException

Throws:
  `IOException`

#### dateTime_db2db

    public static com.xxdb.data.Entity dateTime_db2db(com.xxdb.data.Entity srcEntity,
                                                      String targetEntityClassName)
                                               throws Exception

Throws:
  `Exception`

#### dateTimeArr2Vector

    public static com.xxdb.data.Entity dateTimeArr2Vector(Object[] srcValue,
                                                          String targetEntityClassName)
                                                   throws IOException

Throws:
  `IOException`

#### CheckedBasicType

    public static boolean CheckedBasicType(String srcEntityClassName,
                                           String targetEntityClassName)
                                    throws IOException

Throws:
  `IOException`

#### basicTypeArr2Vector

    public static com.xxdb.data.Entity basicTypeArr2Vector(Object[] srcValue,
                                                           String targetEntityClassName)
                                                    throws IOException

Throws:
  `IOException`

#### basicType_db2db

    public static com.xxdb.data.Entity basicType_db2db(com.xxdb.data.Entity srcEntity,
                                                       String targetEntityClassName)
                                                throws IOException

Throws:
  `IOException`

#### basicType_java2db

    public static com.xxdb.data.Entity basicType_java2db(Object srcValue,
                                                         String targetEntityClassName)
                                                  throws IOException

Throws:
  `IOException`

#### getTemporal

    public static Temporal getTemporal(Object value)
                                throws Exception

Throws:
  `Exception`

#### castTemporal

    public static Temporal castTemporal(Object srcValue,
                                        String targetTemporalClassName)