public class TimestampStatementParameter extends DatetimeStatementParameter<java.sql.Timestamp>
Timestamp
extension to StatementParameter.
This ignores the query-class configuration, and always attempts to format the string into a java.sql.Timestamp using the
configured date formatter; if convert-null
is true, then empty/blank/whitespace only values will be substituted by
System.currentTimeMillis()
.
In the adapter configuration file this class is aliased as jdbc-timestamp-statement-parameter which is the preferred alternative to the fully qualified classname when building your configuration.
StatementParameterImpl.QueryType
log
Constructor and Description |
---|
TimestampStatementParameter() |
TimestampStatementParameter(java.lang.String query,
StatementParameterImpl.QueryType type,
java.lang.Boolean nullConvert,
java.lang.String name,
java.text.SimpleDateFormat format) |
TimestampStatementParameter(java.lang.String query,
StatementParameterImpl.QueryType type,
java.text.SimpleDateFormat format) |
Modifier and Type | Method and Description |
---|---|
protected java.sql.Timestamp |
convertToType(java.lang.Object value) |
protected java.sql.Timestamp |
defaultValue() |
TimestampStatementParameter |
makeCopy()
Make a copy of the statement parameter.
|
getDateFormat, getFormatter, setDateFormat
apply, convert
convertNull, getConvertNull, getHandler, getParameterLogger, getQueryString, getQueryType, getQueryValue, logger, setConvertNull, setParameterLogger, setQueryString, setQueryType
getName, setName
public TimestampStatementParameter()
public TimestampStatementParameter(java.lang.String query, StatementParameterImpl.QueryType type, java.text.SimpleDateFormat format)
public TimestampStatementParameter(java.lang.String query, StatementParameterImpl.QueryType type, java.lang.Boolean nullConvert, java.lang.String name, java.text.SimpleDateFormat format)
public TimestampStatementParameter makeCopy()
JdbcStatementParameter
protected java.sql.Timestamp defaultValue()
defaultValue
in class TypedStatementParameter
protected java.sql.Timestamp convertToType(java.lang.Object value)
convertToType
in class TypedStatementParameter