src/com/allde/wo/peitaohg/dao/impl/PeitaohgDaoHibernateImpl.java
(完整代码) 1KBpackage com.allde.wo.peitaohg.dao.impl;
import org.hibernate.Query;
import com.allde.framework.dao.impl.AbstractDAOHibernateImpl;
import com.allde.wo.chuanzhi.dao.dao.ChuanzhiDao;
import com.allde.wo.chuanzhi.model.ChuanzhiModel;
import com.allde.wo.chuanzhi.model.ChuanzhiQueryModel;
import com.allde.wo.peitaohg.dao.dao.PeitaohgDao;
import com.allde.wo.peitaohg.model.PeitaohgModel;
import com.allde.wo.peitaohg.model.PeitaohgQueryModel;
public class PeitaohgDaoHibernateImpl extends
AbstractDAOHibernateImpl<PeitaohgModel, PeitaohgQueryModel> implements PeitaohgDao {
protected PeitaohgDaoHibernateImpl() {
super(PeitaohgModel.class);
// TODO Auto-generated constructor stub
}
@Override
protected String generateHQLWhere(PeitaohgQueryModel qm) {
StringBuilder sb = new StringBuilder();
if(qm.getId()!=0){
sb.append(" and id=:id");
}
return sb.toString();
}
@Override
protected void prepareQuery(Query query, PeitaohgQueryModel qm) {
if (qm.getId() != 0) {
query.setString("id", qm.getId()+"");
}
System.out.println(query);
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。