All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.simpleflatmapper.jdbc.converter.UtilDateToTimestampConverter Maven / Gradle / Ivy

package org.simpleflatmapper.jdbc.converter;

import org.simpleflatmapper.converter.Context;
import org.simpleflatmapper.converter.ContextualConverter;

import java.sql.Timestamp;
import java.util.Date;

public class UtilDateToTimestampConverter implements ContextualConverter {
    @Override
    public Timestamp convert(Date in, Context context) throws Exception {
        if (in != null) {
            return new Timestamp(in.getTime());
        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy