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

📄 majordaoimpl.java

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

import java.util.List;

import com.y2.hr.base.dao.impl.BaseDaoImpl;
import com.y2.hr.config.major.bean.ConfigMajor;
import com.y2.hr.config.major.dao.MajorDao;

public class MajorDaoImpl extends BaseDaoImpl implements MajorDao {

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

	public boolean isMajorKindId(String majorKindId) {
		String hql = "from ConfigMajor where majorKindId ='" + majorKindId
				+ "'";
		return this.get(hql).size() > 0 ? true : false;
	}

	public ConfigMajor getMajor(ConfigMajor major) {
		String hql = "from ConfigMajor where majorName = '"
				+ major.getMajorName() + "' order by makId desc limit 1";
		List<?> list = this.get(hql);
		return list.size() > 0 ? (ConfigMajor) list.get(0) : null;
	}

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

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

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

⌨️ 快捷键说明

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