类 SqlTimestampValueFactory
- java.lang.Object
-
- com.mysql.cj.result.DefaultValueFactory<T>
-
- com.mysql.cj.result.AbstractDateTimeValueFactory<Timestamp>
-
- com.mysql.cj.result.SqlTimestampValueFactory
-
- 所有已实现的接口:
ValueFactory<Timestamp>
public class SqlTimestampValueFactory extends AbstractDateTimeValueFactory<Timestamp>
Value factory to createTimestampinstances. Timestamp instances are created from fields returned from the db without a timezone. In order to create a point-in-time, a time zone must be provided to interpret the fields.
-
-
字段概要
-
从类继承的字段 com.mysql.cj.result.DefaultValueFactory
jdbcCompliantTruncationForReads, pset
-
-
构造器概要
构造器 构造器 说明 SqlTimestampValueFactory(PropertySet pset, Calendar calendar, TimeZone defaultTimeZone, TimeZone connectionTimeZone)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetTargetTypeName()Get the actual class name of T parameter.TimestamplocalCreateFromDate(InternalDate idate)Create a Timestamp from a DATE value.TimestamplocalCreateFromDatetime(InternalTimestamp its)TimestamplocalCreateFromTime(InternalTime it)Create a Timestamp from a TIME value.TimestamplocalCreateFromTimestamp(InternalTimestamp its)-
从类继承的方法 com.mysql.cj.result.AbstractDateTimeValueFactory
createFromBytes, createFromDate, createFromDatetime, createFromTime, createFromTimestamp, createFromYear
-
从类继承的方法 com.mysql.cj.result.DefaultValueFactory
createFromBigDecimal, createFromBigInteger, createFromBit, createFromDouble, createFromLong, createFromNull, setPropertySet, unsupported
-
-
-
-
构造器详细资料
-
SqlTimestampValueFactory
public SqlTimestampValueFactory(PropertySet pset, Calendar calendar, TimeZone defaultTimeZone, TimeZone connectionTimeZone)
- 参数:
pset-PropertySetcalendar- Calendar used to interpret the fields.defaultTimeZone- The local JVM time zone.connectionTimeZone- The server session time zone as defined by connectionTimeZone property.
-
-
方法详细资料
-
localCreateFromDate
public Timestamp localCreateFromDate(InternalDate idate)
Create a Timestamp from a DATE value.- 返回:
- a timestamp at midnight on the day given by the DATE value
-
localCreateFromTime
public Timestamp localCreateFromTime(InternalTime it)
Create a Timestamp from a TIME value.- 返回:
- a timestamp at the given time on 1970 Jan 1.
-
localCreateFromTimestamp
public Timestamp localCreateFromTimestamp(InternalTimestamp its)
-
localCreateFromDatetime
public Timestamp localCreateFromDatetime(InternalTimestamp its)
-
getTargetTypeName
public String getTargetTypeName()
从接口复制的说明:ValueFactoryGet the actual class name of T parameter.- 返回:
- class name
-
-