@@ -0,0 +1,2196 @@
+package com.angkorteam.mbaas.server.wicket;%0A%0Aimport com.angkorteam.mbaas.configuration.Constants;%0Aimport org.apache.commons.configuration.XMLPropertiesConfiguration;%0Aimport org.apache.commons.dbcp2.BasicDataSource;%0Aimport org.flywaydb.core.internal.dbsupport.DbSupport;%0Aimport org.flywaydb.core.internal.dbsupport.DbSupportFactory;%0Aimport org.flywaydb.core.internal.dbsupport.Table;%0Aimport org.jooq.DSLContext;%0Aimport org.jooq.SQLDialect;%0Aimport org.jooq.conf.RenderMapping;%0Aimport org.jooq.conf.Settings;%0Aimport org.jooq.impl.DSL;%0Aimport org.jooq.impl.DefaultConfiguration;%0A%0A/**%0A * Created by socheat on 4/10/16.%0A */%0Apublic class JooqDb %7B%0A%0A    public static void main(String args%5B%5D) throws Exception %7B%0A        XMLPropertiesConfiguration xml = Constants.getXmlPropertiesConfiguration();%0A        BasicDataSource dataSource = new BasicDataSource();%0A        dataSource.setDriverClassName(xml.getString(Constants.TEMP_JDBC_DRIVER));%0A        dataSource.setUrl(xml.getString(Constants.TEMP_JDBC_URL));%0A        dataSource.setUsername(xml.getString(Constants.TEMP_JDBC_USERNAME));%0A        dataSource.setPassword(xml.getString(Constants.TEMP_JDBC_PASSWORD));%0A%0A        RenderMapping renderMapping = new RenderMapping();%0A%0A        Settings settings = new Settings();%0A        settings.withRenderMapping(renderMapping);%0A        settings.withExecuteWithOptimisticLocking(true);%0A        settings.setUpdatablePrimaryKeys(false);%0A%0A        DefaultConfiguration configuration = new DefaultConfiguration();%0A        configuration.setSettings(settings);%0A        configuration.setDataSource(dataSource);%0A%0A        if (%22com.mysql.cj.jdbc.Driver%22.equals(dataSource.getDriverClassName())) %7B%0A            configuration.set(SQLDialect.MYSQL);%0A        %7D else if (%22com.mysql.jdbc.Driver%22.equals(dataSource.getDriverClassName())) %7B%0A            configuration.set(SQLDialect.MYSQL);%0A        %7D else if (%22org.hsqldb.jdbcDriver%22.equals(dataSource.getDriverClassName())) %7B%0A            configuration.set(SQLDialect.HSQLDB);%0A        %7D else if (%22org.mariadb.jdbc.Driver%22.equals(dataSource.getDriverClassName())) %7B%0A            configuration.set(SQLDialect.MARIADB);%0A        %7D%0A%0A        DSLContext context = DSL.using(configuration);%0A    %7D%0A%7D%0A

add test code jooq