Jeesiteフレームワーク分析の理解


前述の「jeesiteコードジェネレータの使用(例:清算表)」アドレス:http://blog.csdn.net/m0_38021128/article/details/68490920
前述のjeesiteフレームワークを用いたコード生成機能は小さな例を実現したが,実際にはjeesiteフレームワークに対する理解はまだ十分ではない.本稿では,フレームワークソースコードの観点から解析的に理解する.
トップページのソースコードはどこですか?
パス:jeesiteルートディレクトリsrcmainwebappWEB-INFviewsmodulessyssysindex.jspをeclipseで開くとトップページのソースコードが表示されます.
コード生成
エンティティクラスentity
生成されたエンティティークラス:com.thinkgem.jeesite.modules.sys.entity.Expenseclaimrecords
/**
 * Copyright © 2012-2016 JeeSite All rights reserved.
 */
package com.thinkgem.jeesite.modules.sys.entity;

import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.google.common.collect.Lists;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 *     Entity
 * @author seven
 * @version 2017-04-07
 */
public class Expenseclaimrecords extends DataEntity<Expenseclaimrecords> {

    private static final long serialVersionUID = 1L;
    private String name;        //     
    private List expenseclaimdetailsList = Lists.newArrayList();       //     

    public Expenseclaimrecords() {
        super();
    }

    public Expenseclaimrecords(String id){
        super(id);
    }

    @Length(min=1, max=30, message="           1   30   ")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List getExpenseclaimdetailsList() {
        return expenseclaimdetailsList;
    }

    public void setExpenseclaimdetailsList(List expenseclaimdetailsList) {
        this.expenseclaimdetailsList = expenseclaimdetailsList;
    }
}

インポートに基づいて、親を見つけます:com.thinkgem.jeesite.common.persistence.DataEntityでは、データテーブルにインポートするために必要なコメントなどのクラスが書かれていますが、idクラスがまだ不足しており、DataEntityの親を見つけ続けます.
/**
 * Copyright © 2012-2016 JeeSite All rights reserved.
 */
package com.thinkgem.jeesite.common.persistence;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.thinkgem.jeesite.common.utils.IdGen;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.sys.utils.UserUtils;

/**
 *   Entity 
 * @author ThinkGem
 * @version 2014-05-16
 */
public abstract class DataEntity<T> extends BaseEntity<T> {

    private static final long serialVersionUID = 1L;

    protected String remarks;   //   
    protected User createBy;    //    
    protected Date createDate;  //     
    protected User updateBy;    //    
    protected Date updateDate;  //     
    protected String delFlag;   //     (0:  ;1:  ;2:  )

    public DataEntity() {
        super();
        this.delFlag = DEL_FLAG_NORMAL;
    }

    public DataEntity(String id) {
        super(id);
    }

    /**
     *         ,      
     */
    @Override
    public void preInsert(){
        //    ID UUID,  setIsNewRecord()     ID
        if (!this.isNewRecord){
            setId(IdGen.uuid());
        }
        User user = UserUtils.getUser();
        if (StringUtils.isNotBlank(user.getId())){
            this.updateBy = user;
            this.createBy = user;
        }
        this.updateDate = new Date();
        this.createDate = this.updateDate;
    }

    /**
     *         ,      
     */
    @Override
    public void preUpdate(){
        User user = UserUtils.getUser();
        if (StringUtils.isNotBlank(user.getId())){
            this.updateBy = user;
        }
        this.updateDate = new Date();
    }

    @Length(min=0, max=255)
    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @JsonIgnore
    public User getCreateBy() {
        return createBy;
    }

    public void setCreateBy(User createBy) {
        this.createBy = createBy;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @JsonIgnore
    public User getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(User updateBy) {
        this.updateBy = updateBy;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @JsonIgnore
    @Length(min=1, max=1)
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

}

com.thinkgem.jeesite.common.persistence.BaseEntityはついにidクラスを見つけ、データテーブルをインポートする必要があることを理解しました.
/**
 * Copyright © 2012-2016 JeeSite All rights reserved.
 */
package com.thinkgem.jeesite.common.persistence;

import java.io.Serializable;
import java.util.Map;

import javax.xml.bind.annotation.XmlTransient;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Maps;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.supcan.annotation.treelist.SupTreeList;
import com.thinkgem.jeesite.common.supcan.annotation.treelist.cols.SupCol;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.sys.utils.UserUtils;

/**
 * Entity   
 * @author ThinkGem
 * @version 2014-05-16
 */
@SupTreeList
public abstract class BaseEntity<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     *     (    )
     */
    protected String id;

    /**
     *     
     */
    protected User currentUser;

    /**
     *         
     */
    protected Page page;

    /**
     *    SQL(SQL  ,SQL  )
     */
    protected Map sqlMap;

    /**
     *       (  :false),  setIsNewRecord()     ,     ID。
     *    true         ,ID      ,      。
     */
    protected boolean isNewRecord = false;

    public BaseEntity() {

    }

    public BaseEntity(String id) {
        this();
        this.id = id;
    }

    @SupCol(isUnique="true", isHide="true")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @JsonIgnore
    @XmlTransient
    public User getCurrentUser() {
        if(currentUser == null){
            currentUser = UserUtils.getUser();
        }
        return currentUser;
    }

    public void setCurrentUser(User currentUser) {
        this.currentUser = currentUser;
    }

    @JsonIgnore
    @XmlTransient
    public Page getPage() {
        if (page == null){
            page = new Page();
        }
        return page;
    }

    public Page setPage(Page page) {
        this.page = page;
        return page;
    }

    @JsonIgnore
    @XmlTransient
    public Map getSqlMap() {
        if (sqlMap == null){
            sqlMap = Maps.newHashMap();
        }
        return sqlMap;
    }

    public void setSqlMap(Map sqlMap) {
        this.sqlMap = sqlMap;
    }

    /**
     *         ,    
     */
    public abstract void preInsert();

    /**
     *         ,    
     */
    public abstract void preUpdate();

    /**
     *       (  :false),  setIsNewRecord()     ,     ID。
     *    true         ,ID      ,      。
     * @return
     */
    public boolean getIsNewRecord() {
        return isNewRecord || StringUtils.isBlank(getId());
    }

    /**
     *       (  :false),  setIsNewRecord()     ,     ID。
     *    true         ,ID      ,      。
     */
    public void setIsNewRecord(boolean isNewRecord) {
        this.isNewRecord = isNewRecord;
    }

    /**
     *       
     */
    @JsonIgnore
    public Global getGlobal() {
        return Global.getInstance();
    }

    /**
     *        
     */
    @JsonIgnore
    public String getDbName(){
        return Global.getConfig("jdbc.type");
    }

    @Override
    public boolean equals(Object obj) {
        if (null == obj) {
            return false;
        }
        if (this == obj) {
            return true;
        }
        if (!getClass().equals(obj.getClass())) {
            return false;
        }
        BaseEntity> that = (BaseEntity>) obj;
        return null == this.getId() ? false : this.getId().equals(that.getId());
    }

    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this);
    }

    /**
     *     (0:  ;1:  ;2:  ;)
     */
    public static final String DEL_FLAG_NORMAL = "0";
    public static final String DEL_FLAG_DELETE = "1";
    public static final String DEL_FLAG_AUDIT = "2";

}

関連ドキュメントの表示
私はjspを習ったことがないので、無理にドキュメントを見るしかありません.
jeesite框架分析理解_第1张图片
上図はjspファイルに対応しています.
"text/html;charset=UTF-8" %>
"/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>      title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function() {

        });
        function page(n,s){
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    script>
head>
<body>
    <ul class="nav nav-tabs">
        <li class="active"><a href="${ctx}/sys/expenseclaimrecords/">      a>li>
        <shiro:hasPermission name="sys:expenseclaimrecords:edit"><li><a href="${ctx}/sys/expenseclaimrecords/form">      a>li>shiro:hasPermission>
    ul>
    <form:form id="searchForm" modelAttribute="expenseclaimrecords" action="${ctx}/sys/expenseclaimrecords/" method="post" class="breadcrumb form-search">
        <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
        <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
        <ul class="ul-form">
            <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="  "/>li>
            <li class="clearfix">li>
        ul>
    form:form>
    <sys:message content="${message}"/>
    <table id="contentTable" class="table table-striped table-bordered table-condensed">
        <thead>
            <tr>
                <th>    th>
                <th>   th>
                <th>    th>
                <th>  th>
                <shiro:hasPermission name="sys:expenseclaimrecords:edit"><th>  th>shiro:hasPermission>
            tr>
        thead>
        <tbody>
        <c:forEach items="${page.list}" var="expenseclaimrecords">
            <tr>
                <td><a href="${ctx}/sys/expenseclaimrecords/form?id=${expenseclaimrecords.id}">
                    ${expenseclaimrecords.name}
                a>td>
                <td>
                    ${expenseclaimrecords.createBy.id}
                td>
                <td>
                    <fmt:formatDate value="${expenseclaimrecords.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
                td>
                <td>
                    ${expenseclaimrecords.remarks}
                td>
                <shiro:hasPermission name="sys:expenseclaimrecords:edit"><td>
                    <a href="${ctx}/sys/expenseclaimrecords/form?id=${expenseclaimrecords.id}">  a>
                    <a href="${ctx}/sys/expenseclaimrecords/delete?id=${expenseclaimrecords.id}" onclick="return confirmx('           ?', this.href)">  a>
                td>shiro:hasPermission>
            tr>
        c:forEach>
        tbody>
    table>
    <div class="pagination">${page}div>
body>
html>

jeesite框架分析理解_第2张图片
上図はjspファイルに対応しています.
"text/html;charset=UTF-8" %>
"/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>      title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function() {
            //$("#name").focus();
            $("#inputForm").validate({
                submitHandler: function(form){
                    loading('    ,   ...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("    ,    。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
        function addRow(list, idx, tpl, row){
            $(list).append(Mustache.render(tpl, {
                idx: idx, delBtn: true, row: row
            }));
            $(list+idx).find("select").each(function(){
                $(this).val($(this).attr("data-value"));
            });
            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
                var ss = $(this).attr("data-value").split(',');
                for (var i=0; iif($(this).val() == ss[i]){
                        $(this).attr("checked","checked");
                    }
                }
            });
        }
        function delRow(obj, prefix){
            var id = $(prefix+"_id");
            var delFlag = $(prefix+"_delFlag");
            if (id.val() == ""){
                $(obj).parent().parent().remove();
            }else if(delFlag.val() == "0"){
                delFlag.val("1");
                $(obj).html("÷").attr("title", "    ");
                $(obj).parent().parent().addClass("error");
            }else if(delFlag.val() == "1"){
                delFlag.val("0");
                $(obj).html("×").attr("title", "  ");
                $(obj).parent().parent().removeClass("error");
            }
        }
    script>
head>
<body>
    <ul class="nav nav-tabs">
        <li><a href="${ctx}/sys/expenseclaimrecords/">      a>li>
        <li class="active"><a href="${ctx}/sys/expenseclaimrecords/form?id=${expenseclaimrecords.id}">    <shiro:hasPermission name="sys:expenseclaimrecords:edit">${not empty expenseclaimrecords.id?'  ':'  '}shiro:hasPermission><shiro:lacksPermission name="sys:expenseclaimrecords:edit">  shiro:lacksPermission>a>li>
    ul><br/>
    <form:form id="inputForm" modelAttribute="expenseclaimrecords" action="${ctx}/sys/expenseclaimrecords/save" method="post" class="form-horizontal">
        <form:hidden path="id"/>
        <sys:message content="${message}"/>        
        <div class="control-group">
            <label class="control-label">label>
            <div class="controls">
                <form:input path="name" htmlEscape="false" maxlength="30" class="input-xlarge required"/>
                <span class="help-inline"><font color="red">*font> span>
            div>
        div>
        <div class="control-group">
            <label class="control-label">label>
            <div class="controls">
                <form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge "/>
            div>
        div>
            <div class="control-group">
                <label class="control-label">label>
                <div class="controls">
                    <table id="contentTable" class="table table-striped table-bordered table-condensed">
                        <thead>
                            <tr>
                                <th class="hide">th>
                                <th>   th>
                                <th>    th>
                                <th>  th>
                                <shiro:hasPermission name="sys:expenseclaimrecords:edit"><th width="10"> th>shiro:hasPermission>
                            tr>
                        thead>
                        <tbody id="expenseclaimdetailsList">
                        tbody>
                        <shiro:hasPermission name="sys:expenseclaimrecords:edit"><tfoot>
                            <tr><td colspan="5"><a href="javascript:" onclick="addRow('#expenseclaimdetailsList', expenseclaimdetailsRowIdx, expenseclaimdetailsTpl);expenseclaimdetailsRowIdx = expenseclaimdetailsRowIdx + 1;" class="btn">  a>td>tr>
                        tfoot>shiro:hasPermission>
                    table>
                    <script type="text/template" id="expenseclaimdetailsTpl">//
                    script>
                    <script type="text/javascript">
                        var expenseclaimdetailsRowIdx = 0, expenseclaimdetailsTpl = $("#expenseclaimdetailsTpl").html().replace(/(\/\/\)/g,"");
                        $(document).ready(function() {
                            var data = ${fns:toJson(expenseclaimrecords.expenseclaimdetailsList)};
                            for (var i=0; i'#expenseclaimdetailsList', expenseclaimdetailsRowIdx, expenseclaimdetailsTpl, data[i]);
                                expenseclaimdetailsRowIdx = expenseclaimdetailsRowIdx + 1;
                            }
                        });
                    script>
                div>
            div>
        <div class="form-actions">
            <shiro:hasPermission name="sys:expenseclaimrecords:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="   "/> shiro:hasPermission>
            <input id="btnCancel" class="btn" type="button" value="   " onclick="history.go(-1)"/>
        div>
    form:form>
body>
html>

コード生成
jspによってサービス層コードが見つかりました.プロセスは省略します.
/**
 * Copyright © 2012-2016 JeeSite All rights reserved.
 */
package com.thinkgem.jeesite.modules.gen.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.BaseService;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.gen.dao.GenSchemeDao;
import com.thinkgem.jeesite.modules.gen.dao.GenTableColumnDao;
import com.thinkgem.jeesite.modules.gen.dao.GenTableDao;
import com.thinkgem.jeesite.modules.gen.entity.GenConfig;
import com.thinkgem.jeesite.modules.gen.entity.GenScheme;
import com.thinkgem.jeesite.modules.gen.entity.GenTable;
import com.thinkgem.jeesite.modules.gen.entity.GenTableColumn;
import com.thinkgem.jeesite.modules.gen.entity.GenTemplate;
import com.thinkgem.jeesite.modules.gen.util.GenUtils;

/**
 *     Service
 * @author ThinkGem
 * @version 2013-10-15
 */
@Service
@Transactional(readOnly = true)
public class GenSchemeService extends BaseService {

    @Autowired
    private GenSchemeDao genSchemeDao;
//  @Autowired
//  private GenTemplateDao genTemplateDao;
    @Autowired
    private GenTableDao genTableDao;
    @Autowired
    private GenTableColumnDao genTableColumnDao;

    public GenScheme get(String id) {
        return genSchemeDao.get(id);
    }

    public Page find(Page page, GenScheme genScheme) {
        GenUtils.getTemplatePath();
        genScheme.setPage(page);
        page.setList(genSchemeDao.findList(genScheme));
        return page;
    }

    @Transactional(readOnly = false)
    public String save(GenScheme genScheme) {
        if (StringUtils.isBlank(genScheme.getId())){
            genScheme.preInsert();
            genSchemeDao.insert(genScheme);
        }else{
            genScheme.preUpdate();
            genSchemeDao.update(genScheme);
        }
        //     
        if ("1".equals(genScheme.getFlag())){
            return generateCode(genScheme);
        }
        return "";
    }

    @Transactional(readOnly = false)
    public void delete(GenScheme genScheme) {
        genSchemeDao.delete(genScheme);
    }

    private String generateCode(GenScheme genScheme){

        StringBuilder result = new StringBuilder();

        //         
        GenTable genTable = genTableDao.get(genScheme.getGenTable().getId());
        genTable.setColumnList(genTableColumnDao.findList(new GenTableColumn(new GenTable(genTable.getId()))));

        //         
        GenConfig config = GenUtils.getConfig();

        //       
        List templateList = GenUtils.getTemplateList(config, genScheme.getCategory(), false);
        List childTableTemplateList = GenUtils.getTemplateList(config, genScheme.getCategory(), true);

        //        ,         
        if (childTableTemplateList.size() > 0){
            GenTable parentTable = new GenTable();
            parentTable.setParentTable(genTable.getName());
            genTable.setChildList(genTableDao.findList(parentTable));
        }

        //         
        for (GenTable childTable : genTable.getChildList()){
            childTable.setParent(genTable);
            childTable.setColumnList(genTableColumnDao.findList(new GenTableColumn(new GenTable(childTable.getId()))));
            genScheme.setGenTable(childTable);
            Map childTableModel = GenUtils.getDataModel(genScheme);
            for (GenTemplate tpl : childTableTemplateList){
                result.append(GenUtils.generateToFile(tpl, childTableModel, genScheme.getReplaceFile()));
            }
        }

        //         
        genScheme.setGenTable(genTable);
        Map model = GenUtils.getDataModel(genScheme);
        for (GenTemplate tpl : templateList){
            result.append(GenUtils.generateToFile(tpl, model, genScheme.getReplaceFile()));
        }
        return result.toString();
    }
}

テーブルのクラスを生成します.コメントなどの情報を検証しました.依存文字列のインポートに重点を置きます.
/**
 * Copyright © 2012-2016 JeeSite All rights reserved.
 */
package com.thinkgem.jeesite.modules.gen.entity;

import java.util.List;

import org.hibernate.validator.constraints.Length;

import com.google.common.collect.Lists;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.StringUtils;

/**
 *    Entity
 * @author ThinkGem
 * @version 2013-10-15
 */
public class GenTable extends DataEntity {

    private static final long serialVersionUID = 1L;
    private String name;    //   
    private String comments;        //   
    private String className;       //      
    private String parentTable;     //     
    private String parentTableFk;       //       

    private List columnList = Lists.newArrayList(); //   

    private String nameLike;    //        

    private List pkList; //        

    private GenTable parent;    //     
    private List childList = Lists.newArrayList();    //     

    public GenTable() {
        super();
    }

    public GenTable(String id){
        super(id);
    }

    @Length(min=1, max=200)
    public String getName() {
        return StringUtils.lowerCase(name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getParentTable() {
        return StringUtils.lowerCase(parentTable);
    }

    public void setParentTable(String parentTable) {
        this.parentTable = parentTable;
    }

    public String getParentTableFk() {
        return StringUtils.lowerCase(parentTableFk);
    }

    public void setParentTableFk(String parentTableFk) {
        this.parentTableFk = parentTableFk;
    }

    public List getPkList() {
        return pkList;
    }

    public void setPkList(List pkList) {
        this.pkList = pkList;
    }

    public String getNameLike() {
        return nameLike;
    }

    public void setNameLike(String nameLike) {
        this.nameLike = nameLike;
    }

    public GenTable getParent() {
        return parent;
    }

    public void setParent(GenTable parent) {
        this.parent = parent;
    }

    public List getColumnList() {
        return columnList;
    }

    public void setColumnList(List columnList) {
        this.columnList = columnList;
    }

    public List getChildList() {
        return childList;
    }

    public void setChildList(List childList) {
        this.childList = childList;
    }

    /**
     *        
     * @return
     */
    public String getNameAndComments() {
        return getName() + (comments == null ? "" : "  :  " + comments);
    }

    /**
     *           
     * @return
     */
    public List getImportList(){
        List importList = Lists.newArrayList(); //     
        for (GenTableColumn column : getColumnList()){
            if (column.getIsNotBaseField() || ("1".equals(column.getIsQuery()) && "between".equals(column.getQueryType())
                            && ("createDate".equals(column.getSimpleJavaField()) || "updateDate".equals(column.getSimpleJavaField())))){
                //        ,        “.”,       。
                if (StringUtils.indexOf(column.getJavaType(), ".") != -1 && !importList.contains(column.getJavaType())){
                    importList.add(column.getJavaType());
                }
            }
            if (column.getIsNotBaseField()){
                //   JSR303、Json    
                for (String ann : column.getAnnotationList()){
                    if (!importList.contains(StringUtils.substringBeforeLast(ann, "("))){
                        importList.add(StringUtils.substringBeforeLast(ann, "("));
                    }
                }
            }
        }
        //      ,     List    
        if (getChildList() != null && getChildList().size() > 0){
            if (!importList.contains("java.util.List")){
                importList.add("java.util.List");
            }
            if (!importList.contains("com.google.common.collect.Lists")){
                importList.add("com.google.common.collect.Lists");
            }
        }
        return importList;
    }

    /**
     *       
     * @return
     */
    public Boolean getParentExists(){
        return parent != null && StringUtils.isNotBlank(parentTable) && StringUtils.isNotBlank(parentTableFk);
    }

    /**
     *     create_date 
     * @return
     */
    public Boolean getCreateDateExists(){
        for (GenTableColumn c : columnList){
            if ("create_date".equals(c.getName())){
                return true;
            }
        }
        return false;
    }

    /**
     *     update_date 
     * @return
     */
    public Boolean getUpdateDateExists(){
        for (GenTableColumn c : columnList){
            if ("update_date".equals(c.getName())){
                return true;
            }
        }
        return false;
    }

    /**
     *     del_flag 
     * @return
     */
    public Boolean getDelFlagExists(){
        for (GenTableColumn c : columnList){
            if ("del_flag".equals(c.getName())){
                return true;
            }
        }
        return false;
    }
}