SingleTreeDemo.java

@Entity
@DynamicInsert
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@DodoMenu(name = "Demo系统", level = DodoMenuLevel.LEVEL1, sortSeq = 7)
@DodoMenu(name = "基础演示", level = DodoMenuLevel.LEVEL2, sortSeq = 1)
@DodoMenu(name = "单表树演示", level = DodoMenuLevel.LEVEL3, sortSeq = 11)
@DodoRight(name = "单表树")
@DodoCodeGenerator(daoGenerator = @DodoDaoGenerator, srvGenerator = @DodoSrvGenerator, actGenerator = @DodoActionGenerator(actions = { DodoAction.ALL }))
@DodoTreeRef(mapParentField = "parentDemo")
public class SingleTreeDemo extends BaseEntity {

    private static final long serialVersionUID = 5030052771143415896L;

    @DodoField(sortSeq = 0, name = "上级")
    private SingleTreeDemo    parentDemo;

    @DodoShowColumn(sortSeq = 1)
    @DodoField(sortSeq = 1, name = "名称", isnullable = false)
    private String            name;

    @OneToOne
    public SingleTreeDemo getParentDemo() {
        return parentDemo;
    }

    public void setParentDemo(SingleTreeDemo parentDemo) {
        this.parentDemo = parentDemo;
    }

    @Column(length = 16)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
Copyright © Dodo Framework 2019 all right reservedModify At: 2019-12-23 14:56:46