// Path: src/main/java/org/mentabean/DBType.java
// public interface DBType<E> {
// 
// 	/**
// 	 * Do what you have to do to get and return this database type from a result set.
// 	 * 
// 	 * @param rset
// 	 *            The result set
// 	 * @param index
// 	 *            The index in the result set
// 	 * @return The value from the result set
// 	 * @throws SQLException
// 	 */
// 	public E getFromResultSet(ResultSet rset, int index) throws SQLException;
// 
// 	/**
// 	 * Do what you have to do to bind a value to a prepared statement.
// 	 * 
// 	 * @param stmt
// 	 *            The prepared statement
// 	 * @param index
// 	 *            The index in the prepared statement
// 	 * @param value
// 	 *            The value to be bound to the prepared statement
// 	 * @throws SQLException
// 	 */
// 	public void bindToStmt(PreparedStatement stmt, int index, E value) throws SQLException;
// 
// 	/**
// 	 * Do what you have to do to get and return this database type from a result set.
// 	 * 
// 	 * @param rset
// 	 *            The result set
// 	 * @param field
// 	 *            The name of the field in the result set
// 	 * @return The value from the result set
// 	 * @throws SQLException
// 	 */
// 	public E getFromResultSet(ResultSet rset, String field) throws SQLException;
// 
// 	/**
// 	 * Return the java type representing this database type.
// 	 * 
// 	 * @return The java type of this database type.
// 	 */
// 	public Class<? extends Object> getTypeClass();
// 
// 	/**
// 	 * Returns whether this type can be NULL in the database. This is used by the session.createTable() method.
// 	 * 
// 	 * @return true if field can be NULL in the database.
// 	 */
// 	public boolean canBeNull();
// 
// 	/**
// 	 * Return the best ANSI type for this database type. This is used by the session.createTable() method.
// 	 * 
// 	 * @return the ANSI type for this database type.
// 	 */
// 	public String getAnsiType();
// 
// }


import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.mentabean.DBType;

		return this.getClass().getSimpleName();
	}

	@Override
	public java.util.Date getFromResultSet(final ResultSet rset, final int index) throws SQLException {

		return rset.getDate(index);
	}

	@Override
	public java.util.Date getFromResultSet(final ResultSet rset, final String field) throws SQLException {

		return rset.getDate(field);
	}

	@Override
	public Class<? extends Object> getTypeClass() {

		return java.util.Date.class;
	}

	@Override
	public void bindToStmt(final PreparedStatement stmt, final int index, final java.util.Date value) throws SQLException {

		if (value == null) {

			stmt.setDate(index, null);

		} else if (value instanceof java.sql.Date) {


// Path: src/main/java/org/mentabean/DBType.java
// public interface DBType<E> {
// 
// 	/**
// 	 * Do what you have to do to get and return this database type from a result set.
// 	 * 
// 	 * @param rset
// 	 *            The result set
// 	 * @param index
// 	 *            The index in the result set
// 	 * @return The value from the result set
// 	 * @throws SQLException
// 	 */
// 	public E getFromResultSet(ResultSet rset, int index) throws SQLException;
// 
// 	/**
// 	 * Do what you have to do to bind a value to a prepared statement.
// 	 * 
// 	 * @param stmt
// 	 *            The prepared statement
// 	 * @param index
// 	 *            The index in the prepared statement
// 	 * @param value
// 	 *            The value to be bound to the prepared statement
// 	 * @throws SQLException
// 	 */
// 	public void bindToStmt(PreparedStatement stmt, int index, E value) throws SQLException;
// 
// 	/**
// 	 * Do what you have to do to get and return this database type from a result set.
// 	 * 
// 	 * @param rset
// 	 *            The result set
// 	 * @param field
// 	 *            The name of the field in the result set
// 	 * @return The value from the result set
// 	 * @throws SQLException
// 	 */
// 	public E getFromResultSet(ResultSet rset, String field) throws SQLException;
// 
// 	/**
// 	 * Return the java type representing this database type.
// 	 * 
// 	 * @return The java type of this database type.
// 	 */
// 	public Class<? extends Object> getTypeClass();
// 
// 	/**
// 	 * Returns whether this type can be NULL in the database. This is used by the session.createTable() method.
// 	 * 
// 	 * @return true if field can be NULL in the database.
// 	 */
// 	public boolean canBeNull();
// 
// 	/**
// 	 * Return the best ANSI type for this database type. This is used by the session.createTable() method.
// 	 * 
// 	 * @return the ANSI type for this database type.
// 	 */
// 	public String getAnsiType();
// 
// }


// Path: src/main/java/org/mentabean/type/DateType.java
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.mentabean.DBType;

		return this.getClass().getSimpleName();
	}

	@Override
	public java.util.Date getFromResultSet(final ResultSet rset, final int index) throws SQLException {

		return rset.getDate(index);
	}

	@Override
	public java.util.Date getFromResultSet(final ResultSet rset, final String field) throws SQLException {

		return rset.getDate(field);
	}

	@Override
	public Class<? extends Object> getTypeClass() {

		return java.util.Date.class;
	}

	@Override
	public void bindToStmt(final PreparedStatement stmt, final int index, final java.util.Date value) throws SQLException {

		if (value == null) {

			stmt.setDate(index, null);

		} else if (value instanceof java.sql.Date) {


			final java.sql.Date d = (java.sql.Date) value;
