<commit_before>package com.github.ddth.plommon.bo;

import java.util.concurrent.ConcurrentMap;

import org.jboss.netty.util.internal.ConcurrentHashMap;
import org.springframework.jdbc.core.JdbcTemplate;

import play.cache.Cache;
import play.db.DB;

/**
 * Base class for application DAOs.
 * 
 * <p>
 * Note: {@link BaseDao} utilizes Spring's {@link JdbcTemplate} to query data.
 * </p>
 * 
 * @author <NAME> <<EMAIL>>
 * @since 0.3.0
 */
public class BaseDao {

    /*--------------------------------------------------------------------------------*/
    private static ConcurrentMap<String, JdbcTemplate> jdbcTemplates = new ConcurrentHashMap<String, JdbcTemplate>();

    /**
     * Gets {@link JdbcTemplate} instance for the "default" datasource.
     * 
     * @return
     */
    protected static JdbcTemplate jdbcTemplate() {
        return jdbcTemplate("default");<commit_msg>Add method BaseDao.init()<commit_after>package com.github.ddth.plommon.bo;

import java.util.concurrent.ConcurrentMap;

import org.jboss.netty.util.internal.ConcurrentHashMap;
import org.springframework.jdbc.core.JdbcTemplate;

import play.cache.Cache;
import play.db.DB;

/**
 * Base class for application DAOs.
 * 
 * <p>
 * Note: {@link BaseDao} utilizes Spring's {@link JdbcTemplate} to query data.
 * </p>
 * 
 * @author <NAME> <<EMAIL>>
 * @since 0.3.0
 */
public class BaseDao {

    /*--------------------------------------------------------------------------------*/
    private static ConcurrentMap<String, JdbcTemplate> jdbcTemplates = new ConcurrentHashMap<String, JdbcTemplate>();

    /**
     * This method should be called once within
     * {@code Global.onStart(Application)} method.
     */
    public static void init() {
        jdbcTemplates.clear();
    }

    /**
     * Gets {@link JdbcTemplate} instance for the "default" datasource.
     * 
     * @return
     */
    protected static JdbcTemplate jdbcTemplate() {
        return jdbcTemplate("default");
{'fraction_non_alphanumeric': 0.2010178117048346, 'fraction_numerical': 0.0030534351145038168, 'mean_word_length': 2.449122807017544, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3743183', 'n_tokens_mistral': 578, 'n_tokens_neox': 564, 'n_words': 136}