Class DateTime
java.lang.Object
dev.visdb.seesaw.datasources.DateTime
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA style is one or more formats. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandateTimeColumnValidate(String text, RSC comp) Check if the component is a valid date/time.static DateTimeFormattergetDateTimeFormatter(JDBCType jdbcType) Get formatter to produce date/time text for the specified JDBCType.static TemporalgetDateTimeObject(String text, RSC comp) static List<DateTimeFormatter> getDateTimeParsers(JDBCType jdbcType) Get a list of parsers for date/time of the specified JDBCType.static StringgetDateTimeText(RSC comp) Using the formatter for the column's specifiedJDBCType, format the column's specified value.static StringgetDateTimeText(Object jdbcDateTimeObject, RSC comp) Using the formatter for the column's specifiedJDBCType, format the column's specified value.static ObjectgetSQLDateTimeObject(String text, RSC comp) static booleanisHandledDateTimeComp(RSC comp) Check if column is a handled; must be JDBC date/type and text component.static booleanisHandledDateTimeJDBCType(JDBCType jdbcType) Check if jdbcType is handled; must be JDBC date/type.
-
Method Details
-
isHandledDateTimeComp
Check if column is a handled; must be JDBC date/type and text component.- Parameters:
comp-- Returns:
- true is OK
-
isHandledDateTimeJDBCType
Check if jdbcType is handled; must be JDBC date/type.- Parameters:
jdbcType-- Returns:
- true is OK
-
dateTimeColumnValidate
Check if the component is a valid date/time. To avoid exceptions, first useisHandledDateTimeComp(dev.visdb.seesaw.utils.SSComponentInterface).- Parameters:
text- The text to validatecomp- The component that the text is derived from- Returns:
-
getDateTimeParsers
Get a list of parsers for date/time of the specified JDBCType. The first parser are typically used in order, the first success wins.- Parameters:
jdbcType-- Returns:
- list of parser
-
getDateTimeFormatter
Get formatter to produce date/time text for the specified JDBCType.- Parameters:
jdbcType-- Returns:
- text formatter
-
getDateTimeObject
-
getSQLDateTimeObject
-
getDateTimeText
Using the formatter for the column's specifiedJDBCType, format the column's specified value. Return empty string if column is null.- Parameters:
comp- target column- Returns:
- text for column
- Throws:
SQLException
-
getDateTimeText
Using the formatter for the column's specifiedJDBCType, format the column's specified value. Return empty string if column is null.- Parameters:
jdbcDateTimeObject- convert this to textcomp- target column- Returns:
- text for column
-