class TimeType extends LiquibaseDataType {

    protected static final int MSSQL_TYPE_TIME_DEFAULT_PRECISION = 7;
    private static final String PARENTHESIS_REGEX = "(\\(\\d+\\))";
    public static final Pattern PARENTHESIS_PATTERN = Pattern.compile(PARENTHESIS_REGEX);

    @Override
    public DatabaseDataType toDatabaseDataType(Database database) {<FILL_FUNCTION_BODY>}

    Object[] getValidatedParameters() {
        Object[] parameters = getParameters();
        return (parameters.length > 0 && (Integer.parseInt(getParameters()[0].toString()) <= 6)) ? parameters : new Object[0];
    }

    @Override
    public String objectToSql(Object value, Database database) {
        if ((value == null) || "null".equals(value.toString().toLowerCase(Locale.US))) {
            return null;
        } else if (value instanceof DatabaseFunction) {
            return database.generateDatabaseFunctionValue((DatabaseFunction) value);
        } else if (value instanceof java.sql.Time) {
            return database.getTimeLiteral(((java.sql.Time) value));
        } else {
            return "'" + ((String) value).replaceAll("'", "''") + "'";
        }
    }

    @Override
    public Object sqlToObject(String value, Database database) {
        if (zeroTime(value)) {
            return value;
        }

        if (database instanceof AbstractDb2Database) {
            return value.replaceFirst("^\"SYSIBM\".\"TIME\"\\('", "").replaceFirst("'\\)", "");
        }
        if (database instanceof DerbyDatabase) {
            return value.replaceFirst("^TIME\\('", "").replaceFirst("'\\)", "");
        }

        try {
            DateFormat timeFormat = getTimeFormat(database);

            if ((database instanceof OracleDatabase) && value.matches("to_date\\('\\d+:\\d+:\\d+', 'HH24:MI:SS'\\)")) {
                timeFormat = new SimpleDateFormat("HH:mm:s");
                value = value.replaceFirst(".*?'", "").replaceFirst("',.*", "");
            }

            return new java.sql.Time(timeFormat.parse(value).getTime());
        } catch (ParseException e) {
            return new DatabaseFunction(value);
        }
    }

    @Override
    public LoadDataChange.LOAD_DATA_TYPE getLoadTypeName() {
        return LoadDataChange.LOAD_DATA_TYPE.DATE;
    }

    private boolean zeroTime(String stringVal) {
        return "".equals(stringVal.replace("-", "").replace(":", "").replace(" ", "").replace("0", ""));
    }

    protected DateFormat getTimeFormat(Database database) {
        if (database instanceof AbstractDb2Database) {
            return new SimpleDateFormat("HH.mm.ss");
        }
        return new SimpleDateFormat("HH:mm:ss");
    }


}

        String originalDefinition = StringUtil.trimToEmpty(getRawDefinition());
        if (database instanceof InformixDatabase) {
            return new DatabaseDataType("DATETIME HOUR TO FRACTION", 5);
        }
        if (database instanceof MSSQLDatabase) {
            Object[] parameters = getParameters();

            // If the scale for time is the database default anyway, omit it.
            if ((parameters.length >= 1) &&
                    (Integer.parseInt(parameters[0].toString()) == (database.getDefaultScaleForNativeDataType("time")))) {
                parameters = new Object[0];
            }
            return new DatabaseDataType(database.escapeDataTypeName("time"), parameters);
        }

        if (database instanceof MySQLDatabase) {
            boolean supportsParameters = true;
            try {
                supportsParameters = (database.getDatabaseMajorVersion() >= 5) && (database.getDatabaseMinorVersion()
                        >= 6) && (((MySQLDatabase) database).getDatabasePatchVersion() >= 4);
            } catch (Exception ignore) {
                //assume supports parameters
            }
            if (supportsParameters && (getParameters().length > 0) && (Integer.parseInt(getParameters()[0].toString()
            ) <= 6)) {
                return new DatabaseDataType(getName(), getParameters());
            } else {
                return new DatabaseDataType(getName());
            }
        }
        if (database instanceof OracleDatabase) {
            return new DatabaseDataType("DATE");
        }

        if (database instanceof PostgresDatabase) {
            DatabaseDataType datatype = new DatabaseDataType(getName(), getValidatedParameters());
            String rawDefinition = originalDefinition.toLowerCase(Locale.US);

            final Object[] parameters = getParameters();
            if (parameters == null || parameters.length == 0) {
                final Matcher precisionMatcher = PARENTHESIS_PATTERN.matcher(rawDefinition);
                if (precisionMatcher.find()) {
                    datatype = new DatabaseDataType(datatype.getType() + precisionMatcher.group(1));
                }
            } else if (getValidatedParameters().length == 0 && getParameters().length >= 2) {
                datatype = new DatabaseDataType(datatype.getType(), getParameters()[1]);

            }

            if (rawDefinition.contains("tz") || rawDefinition.contains("with time zone")) {
                datatype.addAdditionalInformation("WITH TIME ZONE");
            } else {
                datatype.addAdditionalInformation("WITHOUT TIME ZONE");
            }
            return datatype;
        }

        return new DatabaseDataType(getName());
    
<methods>public void <init>() ,public void addParameter(java.lang.Object) ,public boolean equals(java.lang.Object) ,public void finishInitialization(java.lang.String) ,public java.lang.String getAdditionalInformation() ,public java.lang.String[] getAliases() ,public abstract liquibase.change.core.LoadDataChange.LOAD_DATA_TYPE getLoadTypeName() ,public int getMaxParameters(liquibase.database.Database) ,public int getMinParameters(liquibase.database.Database) ,public java.lang.String getName() ,public java.lang.Object[] getParameters() ,public int getPriority() ,public java.lang.String getRawDefinition() ,public int hashCode() ,public boolean isAutoIncrement() ,public java.lang.String objectToSql(java.lang.Object, liquibase.database.Database) ,public void setAdditionalInformation(java.lang.String) ,public java.lang.Object sqlToObject(java.lang.String, liquibase.database.Database) ,public boolean supports(liquibase.database.Database) ,public liquibase.datatype.DatabaseDataType toDatabaseDataType(liquibase.database.Database) ,public java.lang.String toString() ,public boolean validate(liquibase.database.Database) <variables>private java.lang.String additionalInformation,private final non-sealed java.lang.String[] aliases,private final non-sealed int maxParameters,private final non-sealed int minParameters,private final non-sealed java.lang.String name,private final List<java.lang.Object> parameters,private final non-sealed int priority,private java.lang.String rawDefinition