package org.pp.modules.dev.model;

import org.pp.modules.dev.base.BaseChart;
import org.pp.modules.dev.service.DatasetService;
import org.pp.modules.sys.model.Category;
import org.pp.modules.sys.service.CategoryService;

import com.jfinal.aop.Aop;

/**
 * Generated by JFinal.
 */
@SuppressWarnings("serial")
public class Chart extends BaseChart<Chart> {
	private Dataset ds;
	private Category cate;

	public Category getCate() {
		if(cate == null && getCateId() != null) {
			cate = Aop.get(CategoryService.class).findCache(getCateId());
		}
		return cate;
	}

	public void setCate(Category cate) {
		this.cate = cate;
	}
	public Dataset getDs() {
		if(ds == null && getDsId() != null) {
			ds = DatasetService.dao.findById(getDsId());
		}
		return ds;
	}

	public void setDs(Dataset ds) {
		this.ds = ds;
	}
}
