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;

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

	   public String n_loginaccountpwdname_like;//[登录账号密码名称]
       public void setN_loginaccountpwdname_like(String n_loginaccountpwdname_like) {
            this.n_loginaccountpwdname_like=n_loginaccountpwdname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("loginaccountpwdname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_loginaccountpwdname_like);
            this.getCondition().add(searchField);
       }
	   public String n_loginaccountid_eq;//[登录账号标识]
       public void setN_loginaccountid_eq(String n_loginaccountid_eq) {
            this.n_loginaccountid_eq=n_loginaccountid_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("loginaccountid");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_loginaccountid_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 loginaccountpwdname=new SearchFieldFilter();
           loginaccountpwdname.setParam("loginaccountpwdname");
           loginaccountpwdname.setCondition(SearchFieldType.LIKE);
           loginaccountpwdname.setValue(strQuery);
           searchGroupFilter.getCondition().add(loginaccountpwdname);
        this.getCondition().add(searchGroupFilter);   

           
           
        }
	}
}
