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

org.milyn.javabean.decoders.SqlTimestampDecoder Maven / Gradle / Ivy

The newest version!
package org.milyn.javabean.decoders;

import java.util.Date;

import org.milyn.javabean.DataDecodeException;
import org.milyn.javabean.DecodeType;

/**
* {@link java.sql.Timestamp} data decoder.
*
* Extends {@link org.milyn.javabean.decoders.DateDecoder} and returns
* a java.sql.Timestamp instance.
*
*
* @author [email protected]
*/
@DecodeType(java.sql.Timestamp.class)
public class SqlTimestampDecoder extends DateDecoder
{
	@Override
	public Object decode(String data) throws DataDecodeException {
		Date date = (Date)super.decode(data);
	    return new java.sql.Timestamp(date.getTime());
	}
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy