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

com.jpattern.orm.generator.wrapper.UtilDateToSqlTimestampWrapper Maven / Gradle / Ivy

There is a newer version: 3.5.1
Show newest version
package com.jpattern.orm.generator.wrapper;

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

/**
 * 
 * @author Francesco Cina'
 *
 * Mar 27, 2012
 */
public class UtilDateToSqlTimestampWrapper implements IWrapper {

	@Override
	public Class resultSetTypeToUse() {
		return Timestamp.class;
	}

	@Override
	public Date wrap(Timestamp value) {
		return value;
	}

	@Override
	public Timestamp unWrap(Date value) {
		return new Timestamp(value.getTime());
	}

	public static Date staticWrap(Timestamp value) {
		return value;
	}

	public static Timestamp staticUnWrap(Date value) {
		return new Timestamp(value.getTime());
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy