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.userroledatas.*;
import cn.ibizlab.r7.runtime.core.r7rt_base.domain.UserRoleDatas;
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对象[UserRoleDatasDTO]
 */
public class UserRoleDatasDTO implements Serializable {

	private static final long serialVersionUID = 1L;

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

    @JsonIgnore
    private boolean updateDateDirtyFlag;

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

    @JsonIgnore
    private boolean createManDirtyFlag;

    /**
     * 属性 [USERROLEDATASNAME]
     *
     */
    @UserRoleDatasUserRoleDatasNameDefault(info = "默认规则")
    private String userRoleDatasName;

    @JsonIgnore
    private boolean userRoleDatasNameDirtyFlag;

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

    @JsonIgnore
    private boolean updateManDirtyFlag;

    /**
     * 属性 [USERROLEDATASID]
     *
     */
    @UserRoleDatasUserRoleDatasIdDefault(info = "默认规则")
    private String userRoleDatasId;

    @JsonIgnore
    private boolean userRoleDatasIdDirtyFlag;

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

    @JsonIgnore
    private boolean enableDirtyFlag;

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

    @JsonIgnore
    private boolean createDateDirtyFlag;

    /**
     * 属性 [USERROLENANE]
     *
     */
    @UserRoleDatasUserRoleNameDefault(info = "默认规则")
    private String userRoleName;

    @JsonIgnore
    private boolean userRoleNameDirtyFlag;

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

    @JsonIgnore
    private boolean userRoleDataNameDirtyFlag;

    /**
     * 属性 [USERROLEID]
     *
     */
    @UserRoleDatasUserRoleIdDefault(info = "默认规则")
    private String userRoleId;

    @JsonIgnore
    private boolean userRoleIdDirtyFlag;

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

    @JsonIgnore
    private boolean userRoleDataIdDirtyFlag;


    /**
     * 获取 [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 ;
    }

    /**
     * 获取 [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 ;
    }

    /**
     * 获取 [USERROLEDATASNAME]
     */
    @JsonProperty("userroledatasname")
    public String getUserRoleDatasName(){
        return userRoleDatasName ;
    }

    /**
     * 设置 [USERROLEDATASNAME]
     */
    @JsonProperty("userroledatasname")
    public void setUserRoleDatasName(String  userRoleDatasName){
        this.userRoleDatasName = userRoleDatasName ;
        this.userRoleDatasNameDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLEDATASNAME]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleDatasNameDirtyFlag(){
        return userRoleDatasNameDirtyFlag ;
    }

    /**
     * 获取 [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 ;
    }

    /**
     * 获取 [USERROLEDATASID]
     */
    @JsonProperty("userroledatasid")
    public String getUserRoleDatasId(){
        return userRoleDatasId ;
    }

    /**
     * 设置 [USERROLEDATASID]
     */
    @JsonProperty("userroledatasid")
    public void setUserRoleDatasId(String  userRoleDatasId){
        this.userRoleDatasId = userRoleDatasId ;
        this.userRoleDatasIdDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLEDATASID]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleDatasIdDirtyFlag(){
        return userRoleDatasIdDirtyFlag ;
    }

    /**
     * 获取 [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 ;
    }

    /**
     * 获取 [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 ;
    }

    /**
     * 获取 [USERROLENANE]
     */
    @JsonProperty("userrolename")
    public String getUserRoleName(){
        return userRoleName ;
    }

    /**
     * 设置 [USERROLENANE]
     */
    @JsonProperty("userrolename")
    public void setUserRoleName(String  userRoleName){
        this.userRoleName = userRoleName ;
        this.userRoleNameDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLENANE]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleNameDirtyFlag(){
        return userRoleNameDirtyFlag ;
    }

    /**
     * 获取 [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 ;
    }

    /**
     * 获取 [USERROLEID]
     */
    @JsonProperty("userroleid")
    public String getUserRoleId(){
        return userRoleId ;
    }

    /**
     * 设置 [USERROLEID]
     */
    @JsonProperty("userroleid")
    public void setUserRoleId(String  userRoleId){
        this.userRoleId = userRoleId ;
        this.userRoleIdDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLEID]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleIdDirtyFlag(){
        return userRoleIdDirtyFlag ;
    }

    /**
     * 获取 [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 ;
    }



    public UserRoleDatas toDO() {
        UserRoleDatas srfdomain = new UserRoleDatas();
        if(getUpdateDateDirtyFlag())
            srfdomain.setUpdateDate(updateDate);
        if(getCreateManDirtyFlag())
            srfdomain.setCreateMan(createMan);
        if(getUserRoleDatasNameDirtyFlag())
            srfdomain.setUserRoleDatasName(userRoleDatasName);
        if(getUpdateManDirtyFlag())
            srfdomain.setUpdateMan(updateMan);
        if(getUserRoleDatasIdDirtyFlag())
            srfdomain.setUserRoleDatasId(userRoleDatasId);
        if(getEnableDirtyFlag())
            srfdomain.setEnable(enable);
        if(getCreateDateDirtyFlag())
            srfdomain.setCreateDate(createDate);
        if(getUserRoleNameDirtyFlag())
            srfdomain.setUserRoleName(userRoleName);
        if(getUserRoleDataNameDirtyFlag())
            srfdomain.setUserRoleDataName(userRoleDataName);
        if(getUserRoleIdDirtyFlag())
            srfdomain.setUserRoleId(userRoleId);
        if(getUserRoleDataIdDirtyFlag())
            srfdomain.setUserRoleDataId(userRoleDataId);

        return srfdomain;
    }

    public void fromDO(UserRoleDatas srfdomain) {
        if(srfdomain == null )
          return ;
        if(srfdomain.getUpdateDateDirtyFlag())
            this.setUpdateDate(srfdomain.getUpdateDate());
        if(srfdomain.getCreateManDirtyFlag())
            this.setCreateMan(srfdomain.getCreateMan());
        if(srfdomain.getUserRoleDatasNameDirtyFlag())
            this.setUserRoleDatasName(srfdomain.getUserRoleDatasName());
        if(srfdomain.getUpdateManDirtyFlag())
            this.setUpdateMan(srfdomain.getUpdateMan());
        if(srfdomain.getUserRoleDatasIdDirtyFlag())
            this.setUserRoleDatasId(srfdomain.getUserRoleDatasId());
        if(srfdomain.getEnableDirtyFlag())
            this.setEnable(srfdomain.getEnable());
        if(srfdomain.getCreateDateDirtyFlag())
            this.setCreateDate(srfdomain.getCreateDate());
        if(srfdomain.getUserRoleNameDirtyFlag())
            this.setUserRoleName(srfdomain.getUserRoleName());
        if(srfdomain.getUserRoleDataNameDirtyFlag())
            this.setUserRoleDataName(srfdomain.getUserRoleDataName());
        if(srfdomain.getUserRoleIdDirtyFlag())
            this.setUserRoleId(srfdomain.getUserRoleId());
        if(srfdomain.getUserRoleDataIdDirtyFlag())
            this.setUserRoleDataId(srfdomain.getUserRoleDataId());

    }

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

