package cn.ibizlab.r7.runtime.core.r7rt_base.filter;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import cn.ibizlab.r7.runtime.util.ISearchFilter;
import cn.ibizlab.r7.runtime.util.domain.DataObj;
import com.fasterxml.jackson.annotation.JsonFormat;
import cn.ibizlab.r7.runtime.util.SearchContext;
import cn.ibizlab.r7.runtime.util.SearchFieldFilter;
import cn.ibizlab.r7.runtime.util.enums.SearchFieldType;
import cn.ibizlab.r7.runtime.util.enums.SearchGroupType;
import cn.ibizlab.r7.runtime.util.SearchGroupFilter;
import lombok.Data;

/**
 * 关系型数据实体[UserGroupDetail] 查询条件对象
 */
@Data
public class UserGroupDetailSearchContext extends SearchContext {

	   public String n_usergroupdetailname_like;//[用户对象组明细名称]
       public void setN_usergroupdetailname_like(String n_usergroupdetailname_like) {
            this.n_usergroupdetailname_like=n_usergroupdetailname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("usergroupdetailname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_usergroupdetailname_like);
            this.getCondition().add(searchField);
       }
	   public String n_userobjectname_eq;//[用户对象]
       public void setN_userobjectname_eq(String n_userobjectname_eq) {
            this.n_userobjectname_eq=n_userobjectname_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("userobjectname");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_userobjectname_eq);
            this.getCondition().add(searchField);
       }
	   public String n_userobjectname_like;//[用户对象]
       public void setN_userobjectname_like(String n_userobjectname_like) {
            this.n_userobjectname_like=n_userobjectname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("userobjectname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_userobjectname_like);
            this.getCondition().add(searchField);
       }
	   public String n_usergroupname_eq;//[用户组名称]
       public void setN_usergroupname_eq(String n_usergroupname_eq) {
            this.n_usergroupname_eq=n_usergroupname_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("usergroupname");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_usergroupname_eq);
            this.getCondition().add(searchField);
       }
	   public String n_usergroupname_like;//[用户组名称]
       public void setN_usergroupname_like(String n_usergroupname_like) {
            this.n_usergroupname_like=n_usergroupname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("usergroupname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_usergroupname_like);
            this.getCondition().add(searchField);
       }
	   public String n_usergroupid_eq;//[用户对象组标识]
       public void setN_usergroupid_eq(String n_usergroupid_eq) {
            this.n_usergroupid_eq=n_usergroupid_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("usergroupid");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_usergroupid_eq);
            this.getCondition().add(searchField);
       }
	   public String n_userobjectid_eq;//[用户对象]
       public void setN_userobjectid_eq(String n_userobjectid_eq) {
            this.n_userobjectid_eq=n_userobjectid_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("userobjectid");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_userobjectid_eq);
            this.getCondition().add(searchField);
       }

	/**
	 * 启用快速搜索
	 */
	public void setQuery(String strQuery)
	{
		 this.query=strQuery;
         if(!org.springframework.util.StringUtils.isEmpty(strQuery)){
           SearchGroupFilter searchGroupFilter=new SearchGroupFilter();
           searchGroupFilter.setSearchGroupType(SearchGroupType.OR);

           SearchFieldFilter usergroupdetailname=new SearchFieldFilter();
           usergroupdetailname.setParam("usergroupdetailname");
           usergroupdetailname.setCondition(SearchFieldType.LIKE);
           usergroupdetailname.setValue(strQuery);
           searchGroupFilter.getCondition().add(usergroupdetailname);
        this.getCondition().add(searchGroupFilter);   

           
           
        }
	}
}
