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

	private static final long serialVersionUID = 1L;

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

    @JsonIgnore
    private boolean updateDateDirtyFlag;

    /**
     * 属性 [USERROLEDETAILID]
     *
     */
    @UserRoleDetailUserRoleDetailIdDefault(info = "默认规则")
    private String userRoleDetailId;

    @JsonIgnore
    private boolean userRoleDetailIdDirtyFlag;

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

    @JsonIgnore
    private boolean updateManDirtyFlag;

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

    @JsonIgnore
    private boolean createDateDirtyFlag;

    /**
     * 属性 [USERROLEDETAILNAME]
     *
     */
    @UserRoleDetailUserRoleDetailNameDefault(info = "默认规则")
    private String userRoleDetailName;

    @JsonIgnore
    private boolean userRoleDetailNameDirtyFlag;

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

    @JsonIgnore
    private boolean createManDirtyFlag;

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

    @JsonIgnore
    private boolean enableDirtyFlag;

    /**
     * 属性 [USEROBJECTNAME]
     *
     */
    @UserRoleDetailUserObjectNameDefault(info = "默认规则")
    private String userObjectName;

    @JsonIgnore
    private boolean userObjectNameDirtyFlag;

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

    @JsonIgnore
    private boolean userRoleNameDirtyFlag;

    /**
     * 属性 [USEROBJECTID]
     *
     */
    @UserRoleDetailUserObjectIdDefault(info = "默认规则")
    private String userObjectId;

    @JsonIgnore
    private boolean userObjectIdDirtyFlag;

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

    @JsonIgnore
    private boolean userRoleIdDirtyFlag;


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

    /**
     * 获取 [USERROLEDETAILID]
     */
    @JsonProperty("userroledetailid")
    public String getUserRoleDetailId(){
        return userRoleDetailId ;
    }

    /**
     * 设置 [USERROLEDETAILID]
     */
    @JsonProperty("userroledetailid")
    public void setUserRoleDetailId(String  userRoleDetailId){
        this.userRoleDetailId = userRoleDetailId ;
        this.userRoleDetailIdDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLEDETAILID]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleDetailIdDirtyFlag(){
        return userRoleDetailIdDirtyFlag ;
    }

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

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

    /**
     * 获取 [USERROLEDETAILNAME]
     */
    @JsonProperty("userroledetailname")
    public String getUserRoleDetailName(){
        return userRoleDetailName ;
    }

    /**
     * 设置 [USERROLEDETAILNAME]
     */
    @JsonProperty("userroledetailname")
    public void setUserRoleDetailName(String  userRoleDetailName){
        this.userRoleDetailName = userRoleDetailName ;
        this.userRoleDetailNameDirtyFlag = true ;
    }

    /**
     * 获取 [USERROLEDETAILNAME]脏标记
     */
    @JsonIgnore
    public boolean getUserRoleDetailNameDirtyFlag(){
        return userRoleDetailNameDirtyFlag ;
    }

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

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

    /**
     * 获取 [USEROBJECTNAME]
     */
    @JsonProperty("userobjectname")
    public String getUserObjectName(){
        return userObjectName ;
    }

    /**
     * 设置 [USEROBJECTNAME]
     */
    @JsonProperty("userobjectname")
    public void setUserObjectName(String  userObjectName){
        this.userObjectName = userObjectName ;
        this.userObjectNameDirtyFlag = true ;
    }

    /**
     * 获取 [USEROBJECTNAME]脏标记
     */
    @JsonIgnore
    public boolean getUserObjectNameDirtyFlag(){
        return userObjectNameDirtyFlag ;
    }

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

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

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

    /**
     * 获取 [USEROBJECTID]
     */
    @JsonProperty("userobjectid")
    public String getUserObjectId(){
        return userObjectId ;
    }

    /**
     * 设置 [USEROBJECTID]
     */
    @JsonProperty("userobjectid")
    public void setUserObjectId(String  userObjectId){
        this.userObjectId = userObjectId ;
        this.userObjectIdDirtyFlag = true ;
    }

    /**
     * 获取 [USEROBJECTID]脏标记
     */
    @JsonIgnore
    public boolean getUserObjectIdDirtyFlag(){
        return userObjectIdDirtyFlag ;
    }

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



    public UserRoleDetail toDO() {
        UserRoleDetail srfdomain = new UserRoleDetail();
        if(getUpdateDateDirtyFlag())
            srfdomain.setUpdateDate(updateDate);
        if(getUserRoleDetailIdDirtyFlag())
            srfdomain.setUserRoleDetailId(userRoleDetailId);
        if(getUpdateManDirtyFlag())
            srfdomain.setUpdateMan(updateMan);
        if(getCreateDateDirtyFlag())
            srfdomain.setCreateDate(createDate);
        if(getUserRoleDetailNameDirtyFlag())
            srfdomain.setUserRoleDetailName(userRoleDetailName);
        if(getCreateManDirtyFlag())
            srfdomain.setCreateMan(createMan);
        if(getEnableDirtyFlag())
            srfdomain.setEnable(enable);
        if(getUserObjectNameDirtyFlag())
            srfdomain.setUserObjectName(userObjectName);
        if(getUserRoleNameDirtyFlag())
            srfdomain.setUserRoleName(userRoleName);
        if(getUserObjectIdDirtyFlag())
            srfdomain.setUserObjectId(userObjectId);
        if(getUserRoleIdDirtyFlag())
            srfdomain.setUserRoleId(userRoleId);

        return srfdomain;
    }

    public void fromDO(UserRoleDetail srfdomain) {
        if(srfdomain == null )
          return ;
        if(srfdomain.getUpdateDateDirtyFlag())
            this.setUpdateDate(srfdomain.getUpdateDate());
        if(srfdomain.getUserRoleDetailIdDirtyFlag())
            this.setUserRoleDetailId(srfdomain.getUserRoleDetailId());
        if(srfdomain.getUpdateManDirtyFlag())
            this.setUpdateMan(srfdomain.getUpdateMan());
        if(srfdomain.getCreateDateDirtyFlag())
            this.setCreateDate(srfdomain.getCreateDate());
        if(srfdomain.getUserRoleDetailNameDirtyFlag())
            this.setUserRoleDetailName(srfdomain.getUserRoleDetailName());
        if(srfdomain.getCreateManDirtyFlag())
            this.setCreateMan(srfdomain.getCreateMan());
        if(srfdomain.getEnableDirtyFlag())
            this.setEnable(srfdomain.getEnable());
        if(srfdomain.getUserObjectNameDirtyFlag())
            this.setUserObjectName(srfdomain.getUserObjectName());
        if(srfdomain.getUserRoleNameDirtyFlag())
            this.setUserRoleName(srfdomain.getUserRoleName());
        if(srfdomain.getUserObjectIdDirtyFlag())
            this.setUserObjectId(srfdomain.getUserObjectId());
        if(srfdomain.getUserRoleIdDirtyFlag())
            this.setUserRoleId(srfdomain.getUserRoleId());

    }

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

