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

import java.util.Map;

import com.engine.kq.wfset.attendance.framework.BaseManager;
import com.engine.kq.wfset.attendance.dao.WorkflowBaseDao;
import com.engine.kq.wfset.attendance.domain.WorkflowBase;

/**
 * WorkflowBaseManager
 * <p>Generated from 长东设计 www.mfstyle.cn</p> 
 * 
 * @author wcd
 * @version 1.0 2015-09-10
 */
public class WorkflowBaseManager extends BaseManager<WorkflowBase> {

	private WorkflowBaseDao dao = null;

	public WorkflowBaseManager() {
		dao = new WorkflowBaseDao();
		this.setDao(dao);
	}

	public Long save(WorkflowBase 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);
	}

	public int count(String params) {
		return dao.count(this.getMapParam(params));
	}

	public void delete(Map<String, Comparable> map) {
		dao.delete(map);
	}

}
