hibernatestaticmapping.java

来自「java实现的可配置的工作流引擎,采用jsp+javabean实现」· Java 代码 · 共 36 行

JAVA
36
字号
/*
 * Created on 2004-10-18
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.hongsoft.agile.worklist;

import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;

import com.hongsoft.agile.pojo.StaticMappingTable;

/**
 * @author hongsoft.com
 *
 * TODO update的功能
 */
public class HibernateStaticMapping {
	public void insert(Session session,StaticMappingTable sm) throws HibernateException
	{
		session.save(sm);
	}
	public List getListByParticipantId(Session session,String participantId) throws HibernateException
	{
		String sql="SELECT a.staticMapping.activityDefId FROM StaticMappingTable as a WHERE a.staticMapping.participantId=:participantId";
		Query q=session.createQuery(sql);
		q.setString("participantId",participantId);
		return q.list();
	}

}

⌨️ 快捷键说明

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