Java Utililty Methods SQL Date Check

List of utility methods to do SQL Date Check

Description

The list of methods to do SQL Date Check are organized into topic(s).

Method

booleanisDateType(Class targetType)
is Date Type
if (targetType == null)
    return false;
return targetType == java.util.Date.class || targetType == java.sql.Timestamp.class
        || targetType == java.sql.Date.class || targetType == java.sql.Time.class;
booleanisDateValue(Class inValueType)
Check whether the given value is a java.util.Date (but not one of the JDBC-specific subclasses).
return (java.util.Date.class.isAssignableFrom(inValueType)
        && !(java.sql.Date.class.isAssignableFrom(inValueType)
                || java.sql.Time.class.isAssignableFrom(inValueType)
                || java.sql.Timestamp.class.isAssignableFrom(inValueType)));
booleanisDateValue(Object inValue)
Check whether the given value is a java.util.Date (but not one of the JDBC-specific subclasses).
return (inValue instanceof java.util.Date && !(inValue instanceof java.sql.Date
        || inValue instanceof java.sql.Time || inValue instanceof java.sql.Timestamp));