📄 cpmcpdao.java
字号:
package com.fisci.hibernate;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
/**
* A data access object (DAO) providing persistence and search support for CpmCp
* entities. Transaction control of the save(), update() and delete() operations
* can directly support Spring container-managed transactions or they can be
* augmented to handle user-managed Spring transactions. Each of these methods
* provides additional information for how to configure it for the desired type
* of transaction control.
*
* @see com.fisci.hibernate.CpmCp
* @author MyEclipse Persistence Tools
*/
public class CpmCpDAO extends HibernateDaoSupport {
private static final Log log = LogFactory.getLog(CpmCpDAO.class);
// property constants
public static final String CONTACT_ID = "contactId";
public static final String COUNTERPARTY_STAT = "counterpartyStat";
public static final String COUNTERPARTY_NM = "counterpartyNm";
public static final String COUNTERPARTY_SHORT_NM = "counterpartyShortNm";
public static final String CPM_INTERNAL_EXTERNAL_IND = "cpmInternalExternalInd";
public static final String FUNDING_ENTITY_FLG = "fundingEntityFlg";
public static final String LEGAL_ENTITY_FLG = "legalEntityFlg";
public static final String BUSINESS_UNIT_FLG = "businessUnitFlg";
public static final String COUNTERPARTY_TYPE_CD = "counterpartyTypeCd";
public static final String RESTRICTIONS = "restrictions";
public static final String CURRENCY_CD = "currencyCd";
public static final String LOCATION_CD = "locationCd";
public static final String COUNTERPARTY_NOTES = "counterpartyNotes";
public static final String RATING_AGENCY_CD1 = "ratingAgencyCd1";
public static final String RATING_AGENCY_CD2 = "ratingAgencyCd2";
public static final String RATING_AGENCY_CD3 = "ratingAgencyCd3";
public static final String RATING_AGENCY_CD4 = "ratingAgencyCd4";
public static final String RATING_AGENCY_CD5 = "ratingAgencyCd5";
public static final String SHORTTERM_RATING_CD1 = "shorttermRatingCd1";
public static final String SHORTTERM_RATING_CD2 = "shorttermRatingCd2";
public static final String SHORTTERM_RATING_CD3 = "shorttermRatingCd3";
public static final String SHORTTERM_RATING_CD4 = "shorttermRatingCd4";
public static final String SHORTTERM_RATING_CD5 = "shorttermRatingCd5";
public static final String LONGTERM_RATING_CD1 = "longtermRatingCd1";
public static final String LONGTERM_RATING_CD2 = "longtermRatingCd2";
public static final String LONGTERM_RATING_CD3 = "longtermRatingCd3";
public static final String LONGTERM_RATING_CD4 = "longtermRatingCd4";
public static final String LONGTERM_RATING_CD5 = "longtermRatingCd5";
public static final String RATING_NOTES = "ratingNotes";
public static final String REGULATED_FLG = "regulatedFlg";
public static final String REGULATOR_CD = "regulatorCd";
public static final String PARENT_CD = "parentCd";
public static final String PARENT_FLG = "parentFlg";
public static final String PARENT_OWNED_PCT = "parentOwnedPct";
public static final String PARENT_TYPE_CD = "parentTypeCd";
public static final String PARENT_NOTE = "parentNote";
public static final String TAX_ID = "taxId";
public static final String TAX_WITHHOLDING_PCT = "taxWithholdingPct";
public static final String TAX_COUNTRY_CD = "taxCountryCd";
public static final String TAX_AUTHORITY = "taxAuthority";
public static final String TAX_CODE = "taxCode";
public static final String BUSINESS_UNITS = "businessUnits";
public static final String CORPORATION = "corporation";
public static final String CREATED_USER_CD = "createdUserCd";
public static final String UPDATED_USER_CD = "updatedUserCd";
public static final String ALIAS1 = "alias1";
public static final String ALIAS2 = "alias2";
public static final String ALIAS3 = "alias3";
public static final String ALIAS4 = "alias4";
public static final String ALIAS5 = "alias5";
public static final String ALIAS_NOTES1 = "aliasNotes1";
public static final String ALIAS_NOTES2 = "aliasNotes2";
public static final String ALIAS_NOTES3 = "aliasNotes3";
public static final String ALIAS_NOTES4 = "aliasNotes4";
public static final String ALIAS_NOTES5 = "aliasNotes5";
protected void initDao() {
// do nothing
}
public void save(CpmCp transientInstance) {
log.debug("saving CpmCp instance");
try {
getHibernateTemplate().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(CpmCp persistentInstance) {
log.debug("deleting CpmCp instance");
try {
getHibernateTemplate().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public CpmCp findById(java.lang.String id) {
log.debug("getting CpmCp instance with id: " + id);
try {
CpmCp instance = (CpmCp) getHibernateTemplate().get(
"com.fisci.hibernate.CpmCp", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(CpmCp instance) {
log.debug("finding CpmCp 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 CpmCp instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from CpmCp 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 findByContactId(Object contactId) {
return findByProperty(CONTACT_ID, contactId);
}
public List findByCounterpartyStat(Object counterpartyStat) {
return findByProperty(COUNTERPARTY_STAT, counterpartyStat);
}
public List findByCounterpartyNm(Object counterpartyNm) {
return findByProperty(COUNTERPARTY_NM, counterpartyNm);
}
public List findByCounterpartyShortNm(Object counterpartyShortNm) {
return findByProperty(COUNTERPARTY_SHORT_NM, counterpartyShortNm);
}
public List findByCpmInternalExternalInd(Object cpmInternalExternalInd) {
return findByProperty(CPM_INTERNAL_EXTERNAL_IND, cpmInternalExternalInd);
}
public List findByFundingEntityFlg(Object fundingEntityFlg) {
return findByProperty(FUNDING_ENTITY_FLG, fundingEntityFlg);
}
public List findByLegalEntityFlg(Object legalEntityFlg) {
return findByProperty(LEGAL_ENTITY_FLG, legalEntityFlg);
}
public List findByBusinessUnitFlg(Object businessUnitFlg) {
return findByProperty(BUSINESS_UNIT_FLG, businessUnitFlg);
}
public List findByCounterpartyTypeCd(Object counterpartyTypeCd) {
return findByProperty(COUNTERPARTY_TYPE_CD, counterpartyTypeCd);
}
public List findByRestrictions(Object restrictions) {
return findByProperty(RESTRICTIONS, restrictions);
}
public List findByCurrencyCd(Object currencyCd) {
return findByProperty(CURRENCY_CD, currencyCd);
}
public List findByLocationCd(Object locationCd) {
return findByProperty(LOCATION_CD, locationCd);
}
public List findByCounterpartyNotes(Object counterpartyNotes) {
return findByProperty(COUNTERPARTY_NOTES, counterpartyNotes);
}
public List findByRatingAgencyCd1(Object ratingAgencyCd1) {
return findByProperty(RATING_AGENCY_CD1, ratingAgencyCd1);
}
public List findByRatingAgencyCd2(Object ratingAgencyCd2) {
return findByProperty(RATING_AGENCY_CD2, ratingAgencyCd2);
}
public List findByRatingAgencyCd3(Object ratingAgencyCd3) {
return findByProperty(RATING_AGENCY_CD3, ratingAgencyCd3);
}
public List findByRatingAgencyCd4(Object ratingAgencyCd4) {
return findByProperty(RATING_AGENCY_CD4, ratingAgencyCd4);
}
public List findByRatingAgencyCd5(Object ratingAgencyCd5) {
return findByProperty(RATING_AGENCY_CD5, ratingAgencyCd5);
}
public List findByShorttermRatingCd1(Object shorttermRatingCd1) {
return findByProperty(SHORTTERM_RATING_CD1, shorttermRatingCd1);
}
public List findByShorttermRatingCd2(Object shorttermRatingCd2) {
return findByProperty(SHORTTERM_RATING_CD2, shorttermRatingCd2);
}
public List findByShorttermRatingCd3(Object shorttermRatingCd3) {
return findByProperty(SHORTTERM_RATING_CD3, shorttermRatingCd3);
}
public List findByShorttermRatingCd4(Object shorttermRatingCd4) {
return findByProperty(SHORTTERM_RATING_CD4, shorttermRatingCd4);
}
public List findByShorttermRatingCd5(Object shorttermRatingCd5) {
return findByProperty(SHORTTERM_RATING_CD5, shorttermRatingCd5);
}
public List findByLongtermRatingCd1(Object longtermRatingCd1) {
return findByProperty(LONGTERM_RATING_CD1, longtermRatingCd1);
}
public List findByLongtermRatingCd2(Object longtermRatingCd2) {
return findByProperty(LONGTERM_RATING_CD2, longtermRatingCd2);
}
public List findByLongtermRatingCd3(Object longtermRatingCd3) {
return findByProperty(LONGTERM_RATING_CD3, longtermRatingCd3);
}
public List findByLongtermRatingCd4(Object longtermRatingCd4) {
return findByProperty(LONGTERM_RATING_CD4, longtermRatingCd4);
}
public List findByLongtermRatingCd5(Object longtermRatingCd5) {
return findByProperty(LONGTERM_RATING_CD5, longtermRatingCd5);
}
public List findByRatingNotes(Object ratingNotes) {
return findByProperty(RATING_NOTES, ratingNotes);
}
public List findByRegulatedFlg(Object regulatedFlg) {
return findByProperty(REGULATED_FLG, regulatedFlg);
}
public List findByRegulatorCd(Object regulatorCd) {
return findByProperty(REGULATOR_CD, regulatorCd);
}
public List findByParentCd(Object parentCd) {
return findByProperty(PARENT_CD, parentCd);
}
public List findByParentFlg(Object parentFlg) {
return findByProperty(PARENT_FLG, parentFlg);
}
public List findByParentOwnedPct(Object parentOwnedPct) {
return findByProperty(PARENT_OWNED_PCT, parentOwnedPct);
}
public List findByParentTypeCd(Object parentTypeCd) {
return findByProperty(PARENT_TYPE_CD, parentTypeCd);
}
public List findByParentNote(Object parentNote) {
return findByProperty(PARENT_NOTE, parentNote);
}
public List findByTaxId(Object taxId) {
return findByProperty(TAX_ID, taxId);
}
public List findByTaxWithholdingPct(Object taxWithholdingPct) {
return findByProperty(TAX_WITHHOLDING_PCT, taxWithholdingPct);
}
public List findByTaxCountryCd(Object taxCountryCd) {
return findByProperty(TAX_COUNTRY_CD, taxCountryCd);
}
public List findByTaxAuthority(Object taxAuthority) {
return findByProperty(TAX_AUTHORITY, taxAuthority);
}
public List findByTaxCode(Object taxCode) {
return findByProperty(TAX_CODE, taxCode);
}
public List findByBusinessUnits(Object businessUnits) {
return findByProperty(BUSINESS_UNITS, businessUnits);
}
public List findByCorporation(Object corporation) {
return findByProperty(CORPORATION, corporation);
}
public List findByCreatedUserCd(Object createdUserCd) {
return findByProperty(CREATED_USER_CD, createdUserCd);
}
public List findByUpdatedUserCd(Object updatedUserCd) {
return findByProperty(UPDATED_USER_CD, updatedUserCd);
}
public List findByAlias1(Object alias1) {
return findByProperty(ALIAS1, alias1);
}
public List findByAlias2(Object alias2) {
return findByProperty(ALIAS2, alias2);
}
public List findByAlias3(Object alias3) {
return findByProperty(ALIAS3, alias3);
}
public List findByAlias4(Object alias4) {
return findByProperty(ALIAS4, alias4);
}
public List findByAlias5(Object alias5) {
return findByProperty(ALIAS5, alias5);
}
public List findByAliasNotes1(Object aliasNotes1) {
return findByProperty(ALIAS_NOTES1, aliasNotes1);
}
public List findByAliasNotes2(Object aliasNotes2) {
return findByProperty(ALIAS_NOTES2, aliasNotes2);
}
public List findByAliasNotes3(Object aliasNotes3) {
return findByProperty(ALIAS_NOTES3, aliasNotes3);
}
public List findByAliasNotes4(Object aliasNotes4) {
return findByProperty(ALIAS_NOTES4, aliasNotes4);
}
public List findByAliasNotes5(Object aliasNotes5) {
return findByProperty(ALIAS_NOTES5, aliasNotes5);
}
public List findAll() {
log.debug("finding all CpmCp instances");
try {
String queryString = "from CpmCp";
return getHibernateTemplate().find(queryString);
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public CpmCp merge(CpmCp detachedInstance) {
log.debug("merging CpmCp instance");
try {
CpmCp result = (CpmCp) getHibernateTemplate().merge(
detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(CpmCp instance) {
log.debug("attaching dirty CpmCp instance");
try {
getHibernateTemplate().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(CpmCp instance) {
log.debug("attaching clean CpmCp instance");
try {
getHibernateTemplate().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public static CpmCpDAO getFromApplicationContext(ApplicationContext ctx) {
return (CpmCpDAO) ctx.getBean("CpmCpDAO");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -