diff --git a/jOOQ/src/main/java/org/jooq/DataType.java b/jOOQ/src/main/java/org/jooq/DataType.java index 8f37aae299..aa7d698eca 100644 --- a/jOOQ/src/main/java/org/jooq/DataType.java +++ b/jOOQ/src/main/java/org/jooq/DataType.java @@ -461,18 +461,27 @@ public interface DataType extends Serializable { boolean isDateTime(); /** - * Whether this data type is any date or time type. + * Whether this data type is any date type. *

* This applies to any of these types. *

- *

- * This is a combination of {@link #isDateTime()} or {@link #isInterval()} */ boolean isDate(); + /** + * Whether this data type is any time type. + *

+ * This applies to any of these types. + *

+ */ + boolean isTime(); + /** * Whether this data type is any date or time type. *

diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java index 51fd140fd7..b51bbd1951 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java +++ b/jOOQ/src/main/java/org/jooq/impl/DefaultDataType.java @@ -919,6 +919,15 @@ public class DefaultDataType implements DataType { ; } + @Override + public final boolean isTime() { + return java.sql.Time.class.isAssignableFrom(tType) + + || java.time.LocalTime.class.isAssignableFrom(tType) + + ; + } + @Override public final boolean isTemporal() { return isDateTime() || isInterval();