/** * Register the given javaType for the given table and column * * @param table * @param column * @param javaType */ public void register(String table, String column, Class<?> javaType) { register(table, column, javaTypeMapping.getType(javaType)); }
@Override @Before public void setUp() throws ClassNotFoundException, SQLException{ super.setUp(); // create schema statement.execute("drop table person if exists"); statement.execute("create table person(" + "id INT, " + "firstname VARCHAR(50), " + "gender VARCHAR(50), " + "securedId VARCHAR(50), " + "CONSTRAINT PK_person PRIMARY KEY (id) " + ")"); // create configuration configuration = new Configuration(new HSQLDBTemplates()); // configuration.setJavaType(Types.DATE, java.util.Date.class); configuration.register(new UtilDateType()); configuration.register("PERSON", "SECUREDID", new EncryptedString()); configuration.register("PERSON", "GENDER", new EnumByNameType<Gender>(Gender.class)); configuration.register(new StringType()); }