voucherentryservice.java

来自「模拟简单的会计信息录入管理应用」· Java 代码 · 共 63 行

JAVA
63
字号
package org.operamasks.example.ejb.gl.service;import javax.ejb.Stateless;import javax.persistence.EntityManager;import javax.persistence.PersistenceContext;import javax.ejb.TransactionAttribute;import javax.ejb.TransactionAttributeType;import javax.persistence.Query;import java.util.*;import org.operamasks.example.ejb.gl.entity.VoucherEntry;/**  * @generated */@Stateless@SuppressWarnings("unchecked")public class VoucherEntryService implements IVoucherEntryService {	/** 	 * @generated default persist manager	 */	@PersistenceContext	private EntityManager _innerDao;	/** 	 * @generated default persist method 	 */	@TransactionAttribute(value = TransactionAttributeType.REQUIRED)	public void createVoucherEntry(VoucherEntry vo) {		_innerDao.persist(vo);	}	/** 	 * @generated default persist method	 */	@TransactionAttribute(value = TransactionAttributeType.REQUIRED)	public void modifyVoucherEntry(VoucherEntry vo) {		_innerDao.merge(vo);	}	/** 	 * @generated default remove method	 */	@TransactionAttribute(value = TransactionAttributeType.REQUIRED)	public void removeVoucherEntry(VoucherEntry vo) {		VoucherEntry managed = _innerDao.merge(vo);		_innerDao.remove(managed);	}	/** 	 * @generated default query method	 */	@TransactionAttribute(value = TransactionAttributeType.REQUIRED)	public List<VoucherEntry> listVoucherEntry() {		Query q = _innerDao.createQuery("SELECT o FROM VoucherEntry o ");		return q.getResultList();	}	public VoucherEntry getVoucherEntry(String id) {		return _innerDao.find(VoucherEntry.class, id);	}}

⌨️ 快捷键说明

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