<commit_before>package ${host.getPackageName()};

#foreach( $field in ${host.getDaoImports()} )
import ${field};
#end

import com.ctrip.platform.dal.dao.helper.DalDefaultJpaMapper;

public class ${host.getPojoClassName()}Dao {

	private static final String DATA_BASE = "${host.getDbSetName()}";
	
#if($host.getDatabaseCategory().name() == "MySql")
	private static final String ALL_SQL_PATTERN = "SELECT * FROM ${host.getViewName()}";
	private static final String COUNT_SQL_PATTERN = "SELECT count(1) from ${host.getViewName()}";
	private static final String PAGE_MYSQL_PATTERN = "SELECT * FROM ${host.getViewName()} LIMIT %s, %s";
#else
	private static final String ALL_SQL_PATTERN = "SELECT * FROM ${host.getViewName()} WITH (NOLOCK)";
	private static final String COUNT_SQL_PATTERN = "SELECT count(1) from ${host.getViewName()} WITH (NOLOCK)";
	private static final String PAGE_SQL_PATTERN = "select * from ${host.getViewName()} (nolock) order by ${host.getOverColumns()} desc OFFSET %s ROWS FETCH NEXT %s ROWS ONLY";
#end
			
	private DalClient client;
	private DalRowMapper<${host.getPojoClassName()}> mapper;
	private DalRowMapperExtractor<${host.getPojoClassName()}> extractor;
	private DalScalarExtractor scalarExtractor;
	
	/**
	 * Initialize the instance of Hotel2GenDao
	 */
	public ${host.getPojoClassName()}Dao() throws SQLException {
		this.client = DalClientFactory.getClient(DATA_BASE);
		this.mapper = new DalDefaultJpaMapper(${host.getPojoClassName()}.class);
		this.extractor = new DalRowMapperExtractor<${host.getPojoClassName()}>(this.mapper);
		this.scalarExtractor = new DalScalarExtractor();
	}

	/**
	  *Get all ${host.getPojoClassName()} instances
	  *@return 
	  *     ${host.getPojoClassName()} collection
	**/
	public List<${host.getPojoClassName()}> getAll(DalHints hints) throws SQLException {
		StatementParameters parameters = new StatementParameters();
		hints = DalHints.createIfAbsent(hints);
		List<${host.getPojoClassName()}> result = null;
		result = this.client.query(ALL_SQL_PATTERN, parameters, hints, extractor);
		return result;
	}
	
	/**
	  *Get the count of ${host.getPojoClassName()} instances
	  *@return 
	  *     the ${host.getPojoClassName()} records count
	**/<commit_msg>Removed redundant comment.<commit_after>package ${host.getPackageName()};

#foreach( $field in ${host.getDaoImports()} )
import ${field};
#end

import com.ctrip.platform.dal.dao.helper.DalDefaultJpaMapper;

public class ${host.getPojoClassName()}Dao {

	private static final String DATA_BASE = "${host.getDbSetName()}";
	
#if($host.getDatabaseCategory().name() == "MySql")
	private static final String ALL_SQL_PATTERN = "SELECT * FROM ${host.getViewName()}";
	private static final String COUNT_SQL_PATTERN = "SELECT count(1) from ${host.getViewName()}";
	private static final String PAGE_MYSQL_PATTERN = "SELECT * FROM ${host.getViewName()} LIMIT %s, %s";
#else
	private static final String ALL_SQL_PATTERN = "SELECT * FROM ${host.getViewName()} WITH (NOLOCK)";
	private static final String COUNT_SQL_PATTERN = "SELECT count(1) from ${host.getViewName()} WITH (NOLOCK)";
	private static final String PAGE_SQL_PATTERN = "select * from ${host.getViewName()} (nolock) order by ${host.getOverColumns()} desc OFFSET %s ROWS FETCH NEXT %s ROWS ONLY";
#end
			
	private DalClient client;
	private DalRowMapper<${host.getPojoClassName()}> mapper;
	private DalRowMapperExtractor<${host.getPojoClassName()}> extractor;
	private DalScalarExtractor scalarExtractor;

	public ${host.getPojoClassName()}Dao() throws SQLException {
		this.client = DalClientFactory.getClient(DATA_BASE);
		this.mapper = new DalDefaultJpaMapper(${host.getPojoClassName()}.class);
		this.extractor = new DalRowMapperExtractor<${host.getPojoClassName()}>(this.mapper);
		this.scalarExtractor = new DalScalarExtractor();
	}

	/**
	  *Get all ${host.getPojoClassName()} instances
	  *@return 
	  *     ${host.getPojoClassName()} collection
	**/
	public List<${host.getPojoClassName()}> getAll(DalHints hints) throws SQLException {
		StatementParameters parameters = new StatementParameters();
		hints = DalHints.createIfAbsent(hints);
		List<${host.getPojoClassName()}> result = null;
		result = this.client.query(ALL_SQL_PATTERN, parameters, hints, extractor);
		return result;
	}
	
	/**
	  *Get the count of ${host.getPojoClassName()} instances
	  *@return 
	  *     the ${host.getPojoClassName()} records count
	**/
{'fraction_non_alphanumeric': 0.13873751135331516, 'fraction_numerical': 0.0011353315168029065, 'mean_word_length': 5.776923076923077, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3634830', 'n_tokens_mistral': 1444, 'n_tokens_neox': 1413, 'n_words': 329}