com.github.dennisit.vplus.data.criteria.TreeCriteria Maven / Gradle / Ivy
/*--------------------------------------------------------------------------
* Copyright (c) 2010-2020, Elon.su All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the elon developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Elon.su, you can also mail [email protected]
*--------------------------------------------------------------------------
*/
package com.github.dennisit.vplus.data.criteria;
import java.util.List;
/**
* 树形规约
* @author Elon.su
*/
public abstract class TreeCriteria {
/**
* 树形子节点
*/
private List subList;
/**
* 树节点根条件
* @return 是否根节点
*/
public abstract boolean isTreeRoot();
/**
* 当前节点编号
* @return 根节点编号
*/
public abstract String getTreeId();
/**
* 父节点编号
* @return 父节点编号
*/
public abstract String getTreeParentId();
/**
* 树形节点子节点装载
* @param subList 子节点集合
*/
public void setSubList(List subList){
this.subList = subList;
}
/**
* 获取子节点
* @return 子节点集合
*/
public List getSubList(){
return this.subList;
}
}