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

📄 xsinvoicebillmaindao.java

📁 关于网上汽车销售系统的详细编程项目实战实例
💻 JAVA
字号:
package com.company.hib.dao.impl;

import java.util.Date;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts.action.ActionForm;
import org.hibernate.LockMode;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.company.hib.dao.DAOAdapter;
import com.company.struts.form.XsInvoiceBillMain;

/**
 * Data access object (DAO) for domain model class XsInvoiceBillMain.
 * 
 * @see com.company.struts.form.XsInvoiceBillMain
 * @author MyEclipse Persistence Tools
 */

public class XsInvoiceBillMainDAO extends DAOAdapter {
	private static final Log log = LogFactory
			.getLog(XsInvoiceBillMainDAO.class);

	// property constants
	public static final String INVOICE_CODE = "invoiceCode";

	public static final String INVOICE_CODE_ZY = "invoiceCodeZy";

	public static final String INVOICE_TYPE = "invoiceType";

	public static final String RETURN_FLAG = "returnFlag";

	public static final String RETURN_SOURCE = "returnSource";

	public static final String SELL_TYPE_CODE = "sellTypeCode";

	public static final String INVOICE_FLAG = "invoiceFlag";

	public static final String PERSON_CODE = "personCode";

	public static final String DEPT_CODE = "deptCode";

	public static final String KJ_YEAR = "kjYear";

	public static final String PERIOD = "period";

	public static final String CUS_CODE = "cusCode";

	public static final String PAY_CODE = "payCode";

	public static final String FOREIGN_CURR_CODE = "foreignCurrCode";

	public static final String EXCH_RATE = "exchRate";

	public static final String MAKER = "maker";

	public static final String INVALIDE_MAKER = "invalideMaker";

	public static final String ACOUNT_OPT = "acountOpt";

	public static final String CHECKER = "checker";

	public static final String AR_BOOK_FLAG = "arBookFlag";

	public static final String REMARK = "remark";

	public static final String NOW_VALUE = "nowValue";

	public static final String NOW_VALUE_FOR = "nowValueFor";

	public static final String COMING_VALUE = "comingValue";

	public static final String COMING_VALUE_FOR = "comingValueFor";

	public static final String CONVER_FLAG = "converFlag";

	public static final String AR_ACC_CODE = "arAccCode";

	protected void initDao() {
		// do nothing
	}

	public ActionForm findById(java.lang.Integer id) {
		log.debug("getting XsInvoiceBillMain instance with id: " + id);
		try {
			XsInvoiceBillMain instance = (XsInvoiceBillMain) getHibernateTemplate()
					.get("com.company.struts.form.XsInvoiceBillMain", id);
			return instance;
		} catch (RuntimeException re) {
			log.error("get failed", re);
			throw re;
		}
	}

	public List findByExample(ActionForm instance) {
		log.debug("finding XsInvoiceBillMain instance by example");
		try {
			List results = getHibernateTemplate().findByExample(instance);
			log.debug("find by example successful, result size: "
					+ results.size());
			return results;
		} catch (RuntimeException re) {
			log.error("find by example failed", re);
			throw re;
		}
	}

	public List findByProperty(String propertyName, Object value) {
		log.debug("finding XsInvoiceBillMain instance with property: "
				+ propertyName + ", value: " + value);
		try {
			String queryString = "from XsInvoiceBillMain as model where model."
					+ propertyName + "= ?";
			return getHibernateTemplate().find(queryString, value);
		} catch (RuntimeException re) {
			log.error("find by property name failed", re);
			throw re;
		}
	}

	public List findByInvoiceCode(Object invoiceCode) {
		return findByProperty(INVOICE_CODE, invoiceCode);
	}

	public List findByInvoiceCodeZy(Object invoiceCodeZy) {
		return findByProperty(INVOICE_CODE_ZY, invoiceCodeZy);
	}

	public List findByInvoiceType(Object invoiceType) {
		return findByProperty(INVOICE_TYPE, invoiceType);
	}

	public List findByReturnFlag(Object returnFlag) {
		return findByProperty(RETURN_FLAG, returnFlag);
	}

	public List findByReturnSource(Object returnSource) {
		return findByProperty(RETURN_SOURCE, returnSource);
	}

	public List findBySellTypeCode(Object sellTypeCode) {
		return findByProperty(SELL_TYPE_CODE, sellTypeCode);
	}

	public List findByInvoiceFlag(Object invoiceFlag) {
		return findByProperty(INVOICE_FLAG, invoiceFlag);
	}

	public List findByPersonCode(Object personCode) {
		return findByProperty(PERSON_CODE, personCode);
	}

	public List findByDeptCode(Object deptCode) {
		return findByProperty(DEPT_CODE, deptCode);
	}

	public List findByKjYear(Object kjYear) {
		return findByProperty(KJ_YEAR, kjYear);
	}

	public List findByPeriod(Object period) {
		return findByProperty(PERIOD, period);
	}

	public List findByCusCode(Object cusCode) {
		return findByProperty(CUS_CODE, cusCode);
	}

	public List findByPayCode(Object payCode) {
		return findByProperty(PAY_CODE, payCode);
	}

	public List findByForeignCurrCode(Object foreignCurrCode) {
		return findByProperty(FOREIGN_CURR_CODE, foreignCurrCode);
	}

	public List findByExchRate(Object exchRate) {
		return findByProperty(EXCH_RATE, exchRate);
	}

	public List findByMaker(Object maker) {
		return findByProperty(MAKER, maker);
	}

	public List findByInvalideMaker(Object invalideMaker) {
		return findByProperty(INVALIDE_MAKER, invalideMaker);
	}

	public List findByAcountOpt(Object acountOpt) {
		return findByProperty(ACOUNT_OPT, acountOpt);
	}

	public List findByChecker(Object checker) {
		return findByProperty(CHECKER, checker);
	}

	public List findByArBookFlag(Object arBookFlag) {
		return findByProperty(AR_BOOK_FLAG, arBookFlag);
	}

	public List findByRemark(Object remark) {
		return findByProperty(REMARK, remark);
	}

	public List findByNowValue(Object nowValue) {
		return findByProperty(NOW_VALUE, nowValue);
	}

	public List findByNowValueFor(Object nowValueFor) {
		return findByProperty(NOW_VALUE_FOR, nowValueFor);
	}

	public List findByComingValue(Object comingValue) {
		return findByProperty(COMING_VALUE, comingValue);
	}

	public List findByComingValueFor(Object comingValueFor) {
		return findByProperty(COMING_VALUE_FOR, comingValueFor);
	}

	public List findByConverFlag(Object converFlag) {
		return findByProperty(CONVER_FLAG, converFlag);
	}

	public List findByArAccCode(Object arAccCode) {
		return findByProperty(AR_ACC_CODE, arAccCode);
	}

	public List findAll() {
		log.debug("finding all XsInvoiceBillMain instances");
		try {
			String queryString = "from XsInvoiceBillMain";
			return getHibernateTemplate().find(queryString);
		} catch (RuntimeException re) {
			log.error("find all failed", re);
			throw re;
		}
	}

	public void attachDirty(XsInvoiceBillMain instance) {
		log.debug("attaching dirty XsInvoiceBillMain instance");
		try {
			getHibernateTemplate().saveOrUpdate(instance);
			log.debug("attach successful");
		} catch (RuntimeException re) {
			log.error("attach failed", re);
			throw re;
		}
	}

	public void attachClean(XsInvoiceBillMain instance) {
		log.debug("attaching clean XsInvoiceBillMain instance");
		try {
			getHibernateTemplate().lock(instance, LockMode.NONE);
			log.debug("attach successful");
		} catch (RuntimeException re) {
			log.error("attach failed", re);
			throw re;
		}
	}

	public static XsInvoiceBillMainDAO getFromApplicationContext(
			ApplicationContext ctx) {
		return (XsInvoiceBillMainDAO) ctx.getBean("XsInvoiceBillMainDAO");
	}
}

⌨️ 快捷键说明

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