⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ormappingdaobean.java

📁 模拟简单的会计信息录入管理应用
💻 JAVA
字号:
 /*$Id: OrmappingDaoBean.java,v 1.1 2008/07/15 03:36:41 liqi Exp $ *-------------------------------------- * Apusic (Kingdee Middleware) *--------------------------------------- * Copyright By Apusic ,All right Reserved * author   date   comment * wanx  2008-4-7  Created*/package org.operamasks.example.ejb.gl.dao;import java.util.List;import javax.ejb.EJB;import org.operamasks.example.ejb.gl.entity.AccountView;import org.operamasks.example.ejb.gl.entity.Currency;import org.operamasks.example.ejb.gl.entity.Period;import org.operamasks.example.ejb.gl.entity.Person;import org.operamasks.example.ejb.gl.entity.Voucher;import org.operamasks.example.ejb.gl.entity.VoucherEntry;import org.operamasks.example.ejb.gl.entity.VoucherType;import org.operamasks.example.ejb.gl.service.IAccountViewService;import org.operamasks.example.ejb.gl.service.ICurrencyService;import org.operamasks.example.ejb.gl.service.IPeriodService;import org.operamasks.example.ejb.gl.service.IPersonService;import org.operamasks.example.ejb.gl.service.IVoucherEntryService;import org.operamasks.example.ejb.gl.service.IVoucherService;import org.operamasks.example.ejb.gl.service.IVoucherTypeService;import org.operamasks.faces.annotation.ManagedBean;import org.operamasks.faces.annotation.ManagedBeanScope;/** *  * 简单示例如何通过EJB标注方式注入EJB引用 * @author simba * */@ManagedBean(name = "ormappingDaoBean", scope = ManagedBeanScope.SESSION)public class OrmappingDaoBean {	@EJB(name = "org.operamasks.example.ejb.gl.service.AccountViewService")	private IAccountViewService accountViewService;	@EJB(name = "org.operamasks.example.ejb.gl.service.CurrencyService")	private ICurrencyService currencyService;	@EJB(name = "org.operamasks.example.ejb.gl.servcie.PeriodService")	private IPeriodService periodService;	@EJB(name = "org.operamasks.example.ejb.gl.service.VoucherService")	private IVoucherService voucherService;	@EJB(name = "org.operamasks.example.ejb.gl.service.VoucherTypeService")	private IVoucherTypeService voucherTypeService;	@EJB(name = "org.operamasks.example.ejb.gl.service.PersonService")	private IPersonService personService;		@EJB(name = "org.operamasks.example.ejb.gl.service.VoucherEntryService")	private IVoucherEntryService voucherEntryService;	/**	 * 创建凭证	 * 	 * @param voucher	 */	public void createVoucher(Voucher voucher) {		voucherService.createVoucher(voucher);	}	/**	 * 创建人员	 * 	 * @param person	 */	public void createPerson(Person person) {		personService.createPerson(person);	}	/**	 * 创建期间	 * 	 * @param period	 */	public void createPeriod(Period period) {		periodService.createPeriod(period);	}	/**	 * 创建凭证类型	 * 	 * @param voucherType	 */	public void createVoucherType(VoucherType voucherType) {		voucherTypeService.createVoucherType(voucherType);	}	/**	 * 创建币别	 * 	 * @param currency	 */	public void createCurrency(Currency currency) {		currencyService.createCurrency(currency);	}	/**	 * 创建科目	 * 	 * @param account	 */	public void createAccount(AccountView account) {		accountViewService.createAccountView(account);	}	/**	 * 删除科目	 * 	 * @param account	 */	public void removeAccount(AccountView account) {		accountViewService.removeAccountView(account);	}	/**	 * 删除凭证	 * 	 * @param voucher	 */	public void removeVoucher(Voucher voucher) {		voucherService.removeVoucher(voucher);	}	/**	 * 删除期间	 * 	 * @param period	 */	public void removePeriod(Period period) {		periodService.removePeriod(period);	}	/**	 * 删除人员	 * 	 * @param person	 */	public void removePerson(Person person) {		personService.removePerson(person);	}	/**	 * 删除币别	 * 	 * @param currency	 */	public void removeCurrency(Currency currency) {		currencyService.removeCurrency(currency);	}	/**	 * 删除凭证类型	 * 	 * @param voucherType	 */	public void removeVoucherType(VoucherType voucherType) {		voucherTypeService.removeVoucherType(voucherType);	}	/**	 * 修改凭证	 * 	 * @param voucher	 */	public void modifyVoucher(Voucher voucher) {		voucherService.modifyVoucher(voucher);	}	/**	 * 修改凭证类型	 * 	 * @param voucherType	 */	public void modifyVoucherType(VoucherType voucherType) {		voucherTypeService.modifyVoucherType(voucherType);	}	/**	 * 修改科目	 * 	 * @param account	 */	public void modifyAccount(AccountView account) {		accountViewService.modifyAccountView(account);	}	/**	 * 修改期间	 * 	 * @param period	 */	public void modifyPeriod(Period period) {		periodService.modifyPeriod(period);	}	/**	 * 修改人员	 * 	 * @param person	 */	public void modifyPerson(Person person) {		personService.modifyPerson(person);	}	/**	 * 修改币别	 * 	 * @param currency	 */	public void modifyCurrency(Currency currency) {		currencyService.modifyCurrency(currency);	}	/**	 * 获取所有凭证	 * 	 * @return	 */	public List<Voucher> getVouchers() {		return voucherService.listVoucher();	}	/**	 * 获取所有凭证类型	 * 	 * @return	 */	public List<VoucherType> getVoucherTypes() {		return voucherTypeService.listVoucherType();	}	/**	 * 获取所有科目	 * 	 * @return	 */	public List<AccountView> getAccounts() {		return accountViewService.listAccountView();	}	/**	 * 获取所有币别	 * 	 * @return	 */	public List<Currency> getCurrencies() {		return currencyService.listCurrency();	}	/**	 * 获取所有期间	 * 	 * @return	 */	public List<Period> getPeriods() {		return periodService.listPeriod();	}	/**	 * 获取所有人员	 * 	 * @return	 */	public List<Person> getPersons() {		return personService.listPerson();	}		/**	 * 根据id寻找凭证	 * @param id	 * @return	 */	public Voucher findVoucher(String id){		return voucherService.getVoucher(id);	}	public Person getPerson(String id) {		return personService.getPerson(id);	}	public Period getPeriod(String id) {		return periodService.getPeriod(id);	}	public Currency getCurrency(String id) {		return currencyService.getCurrency(id);	}	public VoucherType getVoucherType(String id) {		return voucherTypeService.getVoucherType(id);	}	public AccountView getAccountView(String id) {		return accountViewService.getAccountView(id);	}	public Voucher getVoucher(String id) {		return voucherService.getVoucher(id);	}	public VoucherEntry getVoucherEntry(String id) {		return voucherEntryService.getVoucherEntry(id);	}	public void modifyVoucherEntry(VoucherEntry entry) {		voucherEntryService.modifyVoucherEntry(entry);	}	public List<Object[]> getAccountBalanceEnties(int pageSize, int firstResultIndex) {		return accountViewService.getAccountBalanceEntries(pageSize, firstResultIndex);	}	public int getAccountBalanceEntiesCount() {		return accountViewService.getAccountBalanceEntriesCount();	}	public Object getVouchers(int pageSize, int firstResultIndex) {		return voucherService.getVouchers(pageSize,firstResultIndex);	}	public int getVouchersCount() {		return voucherService.getVouchersCount();	}}

⌨️ 快捷键说明

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