package com.engine.kq.wfset.attendance.manager;

import com.engine.kq.wfset.attendance.framework.BaseManager;
import com.engine.kq.wfset.attendance.dao.WorkflowBillfieldDao;
import com.engine.kq.wfset.attendance.domain.WorkflowBillfield;

/**
 * WorkflowBillfieldManager
 * @author wcd
 * @version 1.0 2015-04-24
 */
public class WorkflowBillfieldManager extends BaseManager<WorkflowBillfield> {

	private WorkflowBillfieldDao dao = null;

	public WorkflowBillfieldManager() {
		dao = new WorkflowBillfieldDao();
		this.setDao(dao);
	}

	public Long save(WorkflowBillfield bean) {
		String id = String.valueOf(bean.getId());
		if(id.equals("0") || id.equals("-1")) id = String.valueOf(this.insert(bean));
		else this.update(bean);
		return Long.valueOf(id);
	}

}
