package cn.ibizlab.r7.runtime.service.runtimemgr.dto;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import cn.ibizlab.r7.runtime.core.r7rt_base.valuerule.anno.userroledata.*;
import cn.ibizlab.r7.runtime.core.r7rt_base.domain.UserRoleData;
import org.springframework.cglib.beans.BeanCopier;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 服务DTO对象[UserRoleDataDTO]
 */
public class UserRoleDataDTO implements Serializable {

	private static final long serialVersionUID = 1L;

    /**
     * 属性 [USERROLEDATAID]
     *
     */
    @UserRoleDataUserRoleDataIdDefault(info = "默认规则")
    private String userRoleDataId;

    @JsonIgnore
    private boolean userRoleDataIdDirtyFlag;

    /**
     * 属性 [UPDATEMAN]
     *
     */
    @UserRoleDataUpdateManDefault(info = "默认规则")
    private String updateMan;

    @JsonIgnore
    private boolean updateManDirtyFlag;

    /**
     * 属性 [DEPTDR]
     *
     */
    @UserRoleDataDeptDRDefault(info = "默认规则")
    private String deptDR;

    @JsonIgnore
    private boolean deptDRDirtyFlag;

    /**
     * 属性 [CREATEDATE]
     *
     */
    @UserRoleDataCreateDateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    private Timestamp createDate;

    @JsonIgnore
    private boolean createDateDirtyFlag;

    /**
     * 属性 [USERROLEDATANAME]
     *
     */
    @UserRoleDataUserRoleDataNameDefault(info = "默认规则")
    private String userRoleDataName;

    @JsonIgnore
    private boolean userRoleDataNameDirtyFlag;

    /**
     * 属性 [ORGDR]
     *
     */
    @UserRoleDataOrgDRDefault(info = "默认规则")
    private String orgDR;

    @JsonIgnore
    private boolean orgDRDirtyFlag;

    /**
     * 属性 [CONDCONTENT]
     *
     */
    @UserRoleDataCondcontentDefault(info = "默认规则")
    private String condcontent;

    @JsonIgnore
    private boolean condcontentDirtyFlag;

    /**
     * 属性 [UPDATEDATE]
     *
     */
    @UserRoleDataUpdateDateDefault(info = "默认规则")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    private Timestamp updateDate;

    @JsonIgnore
    private boolean updateDateDirtyFlag;

    /**
     * 属性 [USERDR]
     *
     */
    @UserRoleDataUserDRDefault(info = "默认规则")
    private String userDR;

    @JsonIgnore
    private boolean userDRDirtyFlag;

    /**
     * 属性 [ISALLDATA]
     *
     */
    @UserRoleDataIsAllDataDefault(info = "默认规则")
    private Integer isAllData;

    @JsonIgnore
    private boolean isAllDataDirtyFlag;

    /**
     * 属性 [CREATEMAN]
     *
     */
    @UserRoleDataCreateManDefault(info = "默认规则")
    private String createMan;

    @JsonIgnore
    private boolean createManDirtyFlag;

    /**
     * 属性 [SYSPRESETQUERY]
     *
     */
    @UserRoleDataSysPresetQueryDefault(info = "默认规则")
    private String sysPresetQuery;

    @JsonIgnore
    private boolean sysPresetQueryDirtyFlag;

    /**
     * 属性 [ENABLE]
     *
     */
    @UserRoleDataEnableDefault(info = "默认规则")
    private Integer enable;

    @JsonIgnore
    private boolean enableDirtyFlag;

    /**
     * 属性 [DATAENTITYNAME]
     *
     */
    @UserRoleDataDataEntityNameDefault(info = "默认规则")
    private String dataEntityName;

    @JsonIgnore
    private boolean dataEntityNameDirtyFlag;

    /**
     * 属性 [DATAENTITYID]
     *
     */
    @UserRoleDataDataEntityIdDefault(info = "默认规则")
    private String dataEntityId;

    @JsonIgnore
    private boolean dataEntityIdDirtyFlag;


    /**
     * 获取 [USERROLEDATAID]
     */
    @JsonProperty("userroledataid")
    public String getUserRoleDataId(){
        return userRoleDataId ;
    }

    /**
     * 设置 [USERROLEDATAID]
     */
    @JsonProperty("userroledataid")
    public void setUserRoleDataId(String  userRoleDataId){
        this.userRoleDataId = userRoleDataId ;
        this.userRoleDataIdDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLEDATAID]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleDataIdDirtyFlag(){
        return userRoleDataIdDirtyFlag ;
    }

    /**
     * 获取 [UPDATEMAN]
     */
    @JsonProperty("updateman")
    public String getUpdateMan(){
        return updateMan ;
    }

    /**
     * 设置 [UPDATEMAN]
     */
    @JsonProperty("updateman")
    public void setUpdateMan(String  updateMan){
        this.updateMan = updateMan ;
        this.updateManDirtyFlag = true ;
    }

    /**
     * 获取 [UPDATEMAN]脏标记
     */
    @JsonIgnore
    public boolean getUpdateManDirtyFlag(){
        return updateManDirtyFlag ;
    }

    /**
     * 获取 [DEPTDR]
     */
    @JsonProperty("deptdr")
    public String getDeptDR(){
        return deptDR ;
    }

    /**
     * 设置 [DEPTDR]
     */
    @JsonProperty("deptdr")
    public void setDeptDR(String  deptDR){
        this.deptDR = deptDR ;
        this.deptDRDirtyFlag = true ;
    }

    /**
     * 获取 [DEPTDR]脏标记
     */
    @JsonIgnore
    public boolean getDeptDRDirtyFlag(){
        return deptDRDirtyFlag ;
    }

    /**
     * 获取 [CREATEDATE]
     */
    @JsonProperty("createdate")
    public Timestamp getCreateDate(){
        return createDate ;
    }

    /**
     * 设置 [CREATEDATE]
     */
    @JsonProperty("createdate")
    public void setCreateDate(Timestamp  createDate){
        this.createDate = createDate ;
        this.createDateDirtyFlag = true ;
    }

    /**
     * 获取 [CREATEDATE]脏标记
     */
    @JsonIgnore
    public boolean getCreateDateDirtyFlag(){
        return createDateDirtyFlag ;
    }

    /**
     * 获取 [USERROLEDATANAME]
     */
    @JsonProperty("userroledataname")
    public String getUserRoleDataName(){
        return userRoleDataName ;
    }

    /**
     * 设置 [USERROLEDATANAME]
     */
    @JsonProperty("userroledataname")
    public void setUserRoleDataName(String  userRoleDataName){
        this.userRoleDataName = userRoleDataName ;
        this.userRoleDataNameDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLEDATANAME]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleDataNameDirtyFlag(){
        return userRoleDataNameDirtyFlag ;
    }

    /**
     * 获取 [ORGDR]
     */
    @JsonProperty("orgdr")
    public String getOrgDR(){
        return orgDR ;
    }

    /**
     * 设置 [ORGDR]
     */
    @JsonProperty("orgdr")
    public void setOrgDR(String  orgDR){
        this.orgDR = orgDR ;
        this.orgDRDirtyFlag = true ;
    }

    /**
     * 获取 [ORGDR]脏标记
     */
    @JsonIgnore
    public boolean getOrgDRDirtyFlag(){
        return orgDRDirtyFlag ;
    }

    /**
     * 获取 [CONDCONTENT]
     */
    @JsonProperty("condcontent")
    public String getCondcontent(){
        return condcontent ;
    }

    /**
     * 设置 [CONDCONTENT]
     */
    @JsonProperty("condcontent")
    public void setCondcontent(String  condcontent){
        this.condcontent = condcontent ;
        this.condcontentDirtyFlag = true ;
    }

    /**
     * 获取 [CONDCONTENT]脏标记
     */
    @JsonIgnore
    public boolean getCondcontentDirtyFlag(){
        return condcontentDirtyFlag ;
    }

    /**
     * 获取 [UPDATEDATE]
     */
    @JsonProperty("updatedate")
    public Timestamp getUpdateDate(){
        return updateDate ;
    }

    /**
     * 设置 [UPDATEDATE]
     */
    @JsonProperty("updatedate")
    public void setUpdateDate(Timestamp  updateDate){
        this.updateDate = updateDate ;
        this.updateDateDirtyFlag = true ;
    }

    /**
     * 获取 [UPDATEDATE]脏标记
     */
    @JsonIgnore
    public boolean getUpdateDateDirtyFlag(){
        return updateDateDirtyFlag ;
    }

    /**
     * 获取 [USERDR]
     */
    @JsonProperty("userdr")
    public String getUserDR(){
        return userDR ;
    }

    /**
     * 设置 [USERDR]
     */
    @JsonProperty("userdr")
    public void setUserDR(String  userDR){
        this.userDR = userDR ;
        this.userDRDirtyFlag = true ;
    }

    /**
     * 获取 [USERDR]脏标记
     */
    @JsonIgnore
    public boolean getUserDRDirtyFlag(){
        return userDRDirtyFlag ;
    }

    /**
     * 获取 [ISALLDATA]
     */
    @JsonProperty("isalldata")
    public Integer getIsAllData(){
        return isAllData ;
    }

    /**
     * 设置 [ISALLDATA]
     */
    @JsonProperty("isalldata")
    public void setIsAllData(Integer  isAllData){
        this.isAllData = isAllData ;
        this.isAllDataDirtyFlag = true ;
    }

    /**
     * 获取 [ISALLDATA]脏标记
     */
    @JsonIgnore
    public boolean getIsAllDataDirtyFlag(){
        return isAllDataDirtyFlag ;
    }

    /**
     * 获取 [CREATEMAN]
     */
    @JsonProperty("createman")
    public String getCreateMan(){
        return createMan ;
    }

    /**
     * 设置 [CREATEMAN]
     */
    @JsonProperty("createman")
    public void setCreateMan(String  createMan){
        this.createMan = createMan ;
        this.createManDirtyFlag = true ;
    }

    /**
     * 获取 [CREATEMAN]脏标记
     */
    @JsonIgnore
    public boolean getCreateManDirtyFlag(){
        return createManDirtyFlag ;
    }

    /**
     * 获取 [SYSPRESETQUERY]
     */
    @JsonProperty("syspresetquery")
    public String getSysPresetQuery(){
        return sysPresetQuery ;
    }

    /**
     * 设置 [SYSPRESETQUERY]
     */
    @JsonProperty("syspresetquery")
    public void setSysPresetQuery(String  sysPresetQuery){
        this.sysPresetQuery = sysPresetQuery ;
        this.sysPresetQueryDirtyFlag = true ;
    }

    /**
     * 获取 [SYSPRESETQUERY]脏标记
     */
    @JsonIgnore
    public boolean getSysPresetQueryDirtyFlag(){
        return sysPresetQueryDirtyFlag ;
    }

    /**
     * 获取 [ENABLE]
     */
    @JsonProperty("enable")
    public Integer getEnable(){
        return enable ;
    }

    /**
     * 设置 [ENABLE]
     */
    @JsonProperty("enable")
    public void setEnable(Integer  enable){
        this.enable = enable ;
        this.enableDirtyFlag = true ;
    }

    /**
     * 获取 [ENABLE]脏标记
     */
    @JsonIgnore
    public boolean getEnableDirtyFlag(){
        return enableDirtyFlag ;
    }

    /**
     * 获取 [DATAENTITYNAME]
     */
    @JsonProperty("dataentityname")
    public String getDataEntityName(){
        return dataEntityName ;
    }

    /**
     * 设置 [DATAENTITYNAME]
     */
    @JsonProperty("dataentityname")
    public void setDataEntityName(String  dataEntityName){
        this.dataEntityName = dataEntityName ;
        this.dataEntityNameDirtyFlag = true ;
    }

    /**
     * 获取 [DATAENTITYNAME]脏标记
     */
    @JsonIgnore
    public boolean getDataEntityNameDirtyFlag(){
        return dataEntityNameDirtyFlag ;
    }

    /**
     * 获取 [DATAENTITYID]
     */
    @JsonProperty("dataentityid")
    public String getDataEntityId(){
        return dataEntityId ;
    }

    /**
     * 设置 [DATAENTITYID]
     */
    @JsonProperty("dataentityid")
    public void setDataEntityId(String  dataEntityId){
        this.dataEntityId = dataEntityId ;
        this.dataEntityIdDirtyFlag = true ;
    }

    /**
     * 获取 [DATAENTITYID]脏标记
     */
    @JsonIgnore
    public boolean getDataEntityIdDirtyFlag(){
        return dataEntityIdDirtyFlag ;
    }



    public UserRoleData toDO() {
        UserRoleData srfdomain = new UserRoleData();
        if(getUserRoleDataIdDirtyFlag())
            srfdomain.setUserRoleDataId(userRoleDataId);
        if(getUpdateManDirtyFlag())
            srfdomain.setUpdateMan(updateMan);
        if(getDeptDRDirtyFlag())
            srfdomain.setDeptDR(deptDR);
        if(getCreateDateDirtyFlag())
            srfdomain.setCreateDate(createDate);
        if(getUserRoleDataNameDirtyFlag())
            srfdomain.setUserRoleDataName(userRoleDataName);
        if(getOrgDRDirtyFlag())
            srfdomain.setOrgDR(orgDR);
        if(getCondcontentDirtyFlag())
            srfdomain.setCondcontent(condcontent);
        if(getUpdateDateDirtyFlag())
            srfdomain.setUpdateDate(updateDate);
        if(getUserDRDirtyFlag())
            srfdomain.setUserDR(userDR);
        if(getIsAllDataDirtyFlag())
            srfdomain.setIsAllData(isAllData);
        if(getCreateManDirtyFlag())
            srfdomain.setCreateMan(createMan);
        if(getSysPresetQueryDirtyFlag())
            srfdomain.setSysPresetQuery(sysPresetQuery);
        if(getEnableDirtyFlag())
            srfdomain.setEnable(enable);
        if(getDataEntityNameDirtyFlag())
            srfdomain.setDataEntityName(dataEntityName);
        if(getDataEntityIdDirtyFlag())
            srfdomain.setDataEntityId(dataEntityId);

        return srfdomain;
    }

    public void fromDO(UserRoleData srfdomain) {
        if(srfdomain == null )
          return ;
        if(srfdomain.getUserRoleDataIdDirtyFlag())
            this.setUserRoleDataId(srfdomain.getUserRoleDataId());
        if(srfdomain.getUpdateManDirtyFlag())
            this.setUpdateMan(srfdomain.getUpdateMan());
        if(srfdomain.getDeptDRDirtyFlag())
            this.setDeptDR(srfdomain.getDeptDR());
        if(srfdomain.getCreateDateDirtyFlag())
            this.setCreateDate(srfdomain.getCreateDate());
        if(srfdomain.getUserRoleDataNameDirtyFlag())
            this.setUserRoleDataName(srfdomain.getUserRoleDataName());
        if(srfdomain.getOrgDRDirtyFlag())
            this.setOrgDR(srfdomain.getOrgDR());
        if(srfdomain.getCondcontentDirtyFlag())
            this.setCondcontent(srfdomain.getCondcontent());
        if(srfdomain.getUpdateDateDirtyFlag())
            this.setUpdateDate(srfdomain.getUpdateDate());
        if(srfdomain.getUserDRDirtyFlag())
            this.setUserDR(srfdomain.getUserDR());
        if(srfdomain.getIsAllDataDirtyFlag())
            this.setIsAllData(srfdomain.getIsAllData());
        if(srfdomain.getCreateManDirtyFlag())
            this.setCreateMan(srfdomain.getCreateMan());
        if(srfdomain.getSysPresetQueryDirtyFlag())
            this.setSysPresetQuery(srfdomain.getSysPresetQuery());
        if(srfdomain.getEnableDirtyFlag())
            this.setEnable(srfdomain.getEnable());
        if(srfdomain.getDataEntityNameDirtyFlag())
            this.setDataEntityName(srfdomain.getDataEntityName());
        if(srfdomain.getDataEntityIdDirtyFlag())
            this.setDataEntityId(srfdomain.getDataEntityId());

    }

    public List<UserRoleDataDTO> fromDOPage(List<UserRoleData> poPage)   {
        if(poPage == null)
            return null;
        List<UserRoleDataDTO> dtos=new ArrayList<UserRoleDataDTO>();
        for(UserRoleData domain : poPage) {
            UserRoleDataDTO dto = new UserRoleDataDTO();
            dto.fromDO(domain);
            dtos.add(dto);
        }
        return dtos;
    }
}

