📄 noallowedcharimpl.java
字号:
/*
* Created on 2006-2-25
* Last modified on 2007-1-21
* Powered by YeQiangWei.com
*/
package com.yeqiangwei.club.dao.hibernate.impl;
import java.util.List;
import com.yeqiangwei.club.dao.NoAllowedCharDAO;
import com.yeqiangwei.club.dao.hibernate.support.HibernateFacade;
import com.yeqiangwei.club.dao.model.NoAllowedChar;
import com.yeqiangwei.club.param.BaseParameter;
public class NoAllowedCharImpl implements NoAllowedCharDAO{
private static final String FIND_ALL = "from NoAllowedChar ";
//private static final String FIND_NOALLOWEDID = "from NoAllowedChar where noAllowedId=?";
private static final String DELETE_NOALLOWEDID = "DELETE FROM NoAllowedChar where noAllowedId=?";
private static final String DELETES_NOALLOWEDID = "DELETE FROM NoAllowedChar where noAllowedId in (:ids)";
public NoAllowedChar create(NoAllowedChar item) {
HibernateFacade<NoAllowedChar> facade = new HibernateFacade<NoAllowedChar>();
item = facade.save(item);
return item;
}
public NoAllowedChar update(NoAllowedChar item) {
HibernateFacade<NoAllowedChar> facade = new HibernateFacade<NoAllowedChar>();
item = facade.update(item);
return item;
}
public int delete(NoAllowedChar item) {
HibernateFacade<NoAllowedChar> facade = new HibernateFacade<NoAllowedChar>();
facade.createQuery(DELETE_NOALLOWEDID);
facade.setInt(0, item.getNoAllowedId());
int c = facade.executeUpdate();
return c;
}
public int delete(List ids) {
HibernateFacade<NoAllowedChar> facade = new HibernateFacade<NoAllowedChar>();
facade.createQuery(DELETES_NOALLOWEDID);
facade.setParameterList("ids", ids);
int c = facade.executeUpdate();
return c;
}
public NoAllowedChar findById(int id) {
NoAllowedChar item = null;
return item;
}
public List<NoAllowedChar> findByParameter(BaseParameter param) {
List<NoAllowedChar> list = null;
return list;
}
public long countByParameter(BaseParameter param) {
return 0;
}
public List findAll(BaseParameter param) {
List list = null;
HibernateFacade<NoAllowedChar> facade = new HibernateFacade<NoAllowedChar>();
facade.createQuery(FIND_ALL);
list = facade.executeQuery();
return list;
}
public long countAll(BaseParameter param) {
return 0;
}
public NoAllowedChar findOnly() {
NoAllowedChar item = null;
HibernateFacade<NoAllowedChar> facade = new HibernateFacade<NoAllowedChar>();
facade.createQuery(FIND_ALL);
facade.setMaxResults(1);
item = (NoAllowedChar) facade.uniqueResult();
return item;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -