⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 majorkinddaoimpl.java

📁 企业人力资源管理
💻 JAVA
字号:
package com.y2.hr.config.majorkind.dao.impl;

import java.util.List;

import com.y2.hr.base.dao.impl.BaseDaoImpl;
import com.y2.hr.config.majorkind.bean.ConfigMajorKind;
import com.y2.hr.config.majorkind.dao.MajorKindDao;

public class MajorKindDaoImpl extends BaseDaoImpl implements MajorKindDao {

	public List<?> getMajorKind() {
		String hql = "from ConfigMajorKind";
		return this.get(hql);
	}

	public ConfigMajorKind getMajorKind(String mfkId) {
		String hql = "from ConfigMajorKind where mfkId = " + mfkId;
		List<?> list = this.get(hql);
		return list.size() > 0 ? (ConfigMajorKind) list.get(0) : null;
	}

	public ConfigMajorKind getMajorKind(ConfigMajorKind majorKind) {
		String hql = "from ConfigMajorKind where majorKindName = '"
				+ majorKind.getMajorKindName()
				+ "' order by mfkId desc limit 1";
		List<?> list = this.get(hql);
		return list.size() > 0 ? (ConfigMajorKind) list.get(0) : null;
	}

	public List<?> getPage(int curPage) {
		String hql = "from ConfigMajorKind";
		return this.getPage(hql, curPage);
	}

	public int sum() {
		String hql = "select count(mk) from ConfigMajorKind mk";
		return this.sum(hql);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -