<commit_before>/*
 * SIGHBaseController.java
 */

package py.una.med.base.controller;

import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity;
import javax.faces.model.SelectItem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import py.una.med.base.breadcrumb.BreadcrumbController;
import py.una.med.base.breadcrumb.BreadcrumbItem;
import py.una.med.base.business.ISIGHBaseLogic;
import py.una.med.base.business.reports.SIGHBaseReportSimple;
import py.una.med.base.dao.restrictions.Where;
import py.una.med.base.dao.search.ISearchParam;
import py.una.med.base.exception.KarakuRuntimeException;
import py.una.med.base.exception.ReportException;
import py.una.med.base.reports.Column;
import py.una.med.base.security.HasRole;
import py.una.med.base.security.SIGHSecurity;
import py.una.med.base.util.ControllerHelper;
import py.una.med.base.util.EntitySerializer;
import py.una.med.base.util.I18nHelper;
import py.una.med.base.util.PagingHelper;
import py.una.med.base.util.PagingHelper.ChangeListener;
import py.una.med.base.util.SelectHelper;
import py.una.med.base.util.StringUtils;

/**
 * Controlador base para todos los controladores del sistema, implementa las
 * funcionalidades definidas en {@link ISIGHBaseController}.
 *
 * @author <NAME>
 * @since 1.0
 * @version 1.5 Aug 1, 2013
 * @see ISIGHBaseController
 *
 */
public abstract class SIGHBaseController<T, K extends Serializable> implements
		ISIGHBaseController<T, K> {

	/**
	 * Vector que contiene las columnas por las que se intentará ordenar.
	 */
	private static String[] DEFAULT_SORT_COLUMNS = { "descripcion2", "id2" };
	@Autowired
	private BreadcrumbController breadcrumController;

	private static final int ROWS_FOR_PAGE = 10;

	private Mode mode = Mode.VIEW;

	private String filterValue;

	private String filterOption;

	private T bean;
<commit_msg>Ordenacion por defecto en SIGHBaseController<commit_after>/*
 * SIGHBaseController.java
 */

package py.una.med.base.controller;

import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity;
import javax.faces.model.SelectItem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import py.una.med.base.breadcrumb.BreadcrumbController;
import py.una.med.base.breadcrumb.BreadcrumbItem;
import py.una.med.base.business.ISIGHBaseLogic;
import py.una.med.base.business.reports.SIGHBaseReportSimple;
import py.una.med.base.dao.restrictions.Where;
import py.una.med.base.dao.search.ISearchParam;
import py.una.med.base.exception.KarakuRuntimeException;
import py.una.med.base.exception.ReportException;
import py.una.med.base.reports.Column;
import py.una.med.base.security.HasRole;
import py.una.med.base.security.SIGHSecurity;
import py.una.med.base.util.ControllerHelper;
import py.una.med.base.util.EntitySerializer;
import py.una.med.base.util.I18nHelper;
import py.una.med.base.util.PagingHelper;
import py.una.med.base.util.PagingHelper.ChangeListener;
import py.una.med.base.util.SelectHelper;
import py.una.med.base.util.StringUtils;

/**
 * Controlador base para todos los controladores del sistema, implementa las
 * funcionalidades definidas en {@link ISIGHBaseController}.
 *
 * @author <NAME>
 * @since 1.0
 * @version 1.5 Aug 1, 2013
 * @see ISIGHBaseController
 *
 */
public abstract class SIGHBaseController<T, K extends Serializable> implements
		ISIGHBaseController<T, K> {

	/**
	 * Vector que contiene las columnas por las que se intentará ordenar.
	 */
	private static String[] DEFAULT_SORT_COLUMNS = { "descripcion", "id" };
	@Autowired
	private BreadcrumbController breadcrumController;

	private static final int ROWS_FOR_PAGE = 10;

	private Mode mode = Mode.VIEW;

	private String filterValue;

	private String filterOption;

	private T bean;

{'fraction_non_alphanumeric': 0.10953639202498199, 'fraction_numerical': 0.007686764352630314, 'mean_word_length': 5.205663189269747, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2369527', 'n_tokens_mistral': 1393, 'n_tokens_neox': 1364, 'n_words': 280}