SSH2代码生成工具 PowerBy 清如许Unicode
超值只卖2000元的SSH代码生成工具,快来购买啊
此工具使用MyEclipse开发,可以生成Spring3.0 Hiberante3.2 Struts2.0 代码。
具有以下特点:
1,适用于多种数据库,原理是采用MyEclipse生成的xxx.hbm.xml数据库实体类,映射配置文件生成类。此软件不用在去连接数据库。
2,纯Java web项目,作者提供源代码,用户可以自己修改。使用tomcat直接发布即可使用。
3,可以生成注释,源代码配有注释,以增加代码的可阅读性。
4,可以灵活配置,生成包名。生成到的路径。
5,无需任何修改,直接复制生成目录到项目即可使用。
6,提供免费升级服务,可享受一年内免费升级到最新版本。
以下是生成的代码部分:
package com.pe.org.daccessImpl;
import com.pe.org.blogic.IWeightsettingBL;
import com.pe.org.daccess.IWeightsetting;
import com.pe.org.model.Weightsetting;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.log4j.Logger;
import org.hibernate.HibernateException;
import java.sql.SQLException;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.orm.hibernate3.HibernateCallback;
import org.springframework.orm.hibernate3.HibernateTemplate;
import com.pe.commonality.tools.Page;
import java.lang.String;
import java.lang.Short;
public class WeightsettingDA implements IWeightsetting {
//实例化 HiberanteTemplate
private HibernateTemplate hibernateTemplate;
//实例化 HiberanteTemplate
private final static Logger log =Logger.getLogger(WeightsettingDA.class.getName());
public void setHibernateTemplate(HibernateTemplate hibernateTemplate){
this.hibernateTemplate = hibernateTemplate;
}
/**
*添加Weightsetting
*@param Weightsetting
*@return boolean
*/
public boolean doAddWeightsetting(Weightsetting weightsetting){
try {
hibernateTemplate.save(weightsetting);
return true;
} catch (Exception e) {
log.error(e.getMessage());
}
return false;
}
/**
*删除Weightsetting根据ID
*@param id
*@return boolean
*/
public boolean doDelWeightsetting(final String id){
try {
return hibernateTemplate.execute(new HibernateCallback<Boolean>() {
public Boolean doInHibernate(Session session) throws HibernateException, SQLException {
Query query=session.createQuery("DELETE Weightsetting WHERE relativeid=? ");
query.setString(0,id);
return 0<query.executeUpdate(); }
});}
catch (Exception e) {
log.error(e.getMessage());
}
return false;
}
/**
*编辑Weightsetting
*@param Weightsetting
*@return boolean
*/
public boolean doEditWeightsetting(Weightsetting weightsetting){
try {
hibernateTemplate.update(weightsetting);
return true;
} catch (Exception e) {
log.error(e.getMessage());
}
return false;
}
/**
*查询Weightsetting根据ID
*@param id
*@return Weightsetting
*/
public Weightsetting getWeightsetting(String id){
try {
return hibernateTemplate.get(Weightsetting.class,id);
} catch (Exception e) {
log.error(e.getMessage());
}
return null;
}
/**
*查询全部Weightsetting
*@return List<Weightsetting>
*/
public List<Weightsetting> getWeightsettingAll(){
try {
return hibernateTemplate.find("FROM Weightsetting ");
} catch (Exception e) {
log.error(e.getMessage());
}
return null;
}
/**
*查询Weightsetting全部记录数
*@return int
*/
public int getWeightsettingCount(){
try {
List all = hibernateTemplate.find("SELECT COUNT(weightsetting) FROM Weightsetting AS weightsetting");
if(null!=all && 0<all.size()){
return ((Long)all.get(0)).intValue();
}
} catch (Exception e) {
log.error(e.getMessage());
}
return 0;
}
/**
*分页Weightsetting
*@return List<Weightsetting>
*/
public List<Weightsetting> pageWeightsetting(final Page p){
List all;
try {
all = hibernateTemplate.execute(new HibernateCallback<List>() {
public List doInHibernate(Session session) throws HibernateException, SQLException {
Query query=session.createQuery("FROM Weightsetting");
query.setFirstResult((p.getNowPage()-1)*p.getPageSize());
query.setMaxResults(p.getPageSize());
return query.list(); }
});
if(null!=all&&0<all.size()){
return all;
};
}
catch (Exception e) {
log.error(e.getMessage());
}
return null;
}
}
单价:¥2000元 有需要者发邮件联系:waphack@126.com
- 上一篇:Java-AcegiX509证书-Java外包网
- 下一篇:JSP自动定时备份数据库