package it.mice.voila.runtime.hibernate.type;

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

import org.hibernate.type.TimestampType;

public class DateType extends TimestampType {

	@Override
	public Object get(ResultSet rs, String name) throws SQLException {
		Timestamp result = rs.getTimestamp(name);
		if (result == null) {
			return null;
		}
		return new Date(result.getTime());
	}
}
