All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quhaodian.activiti.data.entity.ActivityCatalog Maven / Gradle / Ivy

There is a newer version: 1.8.1
Show newest version
package com.quhaodian.activiti.data.entity;

import com.quhaodian.data.entity.CatalogEntity;

import javax.persistence.*;
import java.util.List;


/**
 * 活动分类
 * 
 * @author 年高
 *
 */

@Entity
@Table(name = "activity_catalog")
public class ActivityCatalog extends CatalogEntity {
	
	/**
	 * 父分类
	 */
	@JoinColumn(name = "pid")
	@ManyToOne
	private ActivityCatalog parent;
	
	
	/**
	 * 子分类
	 */
	@OneToMany(mappedBy = "parent", fetch = FetchType.LAZY)
	private List childrens;


	@Override
	public Integer getParentId() {
		if (parent != null) {
			return parent.getId();
		}
		return null;
	}


	public ActivityCatalog getParent() {
		return parent;
	}


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


	public List getChildrens() {
		return childrens;
	}


	public void setChildrens(List childrens) {
		this.childrens = childrens;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy