基于JavaEE的电信CRM数据持久层的实现

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

41JavaEECRM(213001)JavaEEJavaEEVODAOSpringJDBCSpringImplementationofTelecomCRMDataPersistentLayerBasedonJavaEEZHANGLi(CollegeofComputerScience&Engineering,JiangsuTeachersCollegeofTechnology,Changzhou213001)AbstractCombinedwiththepracticalrequirementintheinformatizationprocessoftheChinaTelecomCommission,JavaEEarchitectureisintroduced,andamethodfordevelopinglargescaletelecomCustomRelationshipManagement(CRM)datapersistentlayerontheplatformofJavaEE.Thispaperalsoanalyzestheapplicationoffaçadepattern,VOpatternandDAOpatternintheSpringJDBCframework,whichimplementstheloosecouplinginpersistentlayer.Thewholesystemhasbetterperformanceofstability,flexibilityandextension.KeywordstelecomCRMsystem;Springframework;designmodeComputerEngineering356Vol.35No.620093March2009··10003428(2009)06004103ATP393.021(CustomerRelationshipManagement,CRM)SpringJDBCJavaEE[1]3(1)(2)(3)JDBCBatchPreapredStatementBatchSizeFetchSizecacheviewstoreprocedure()22.1(1)SFA(2)(3)SFA2.2(1)(2)(3)(4)(5)(6)2.3(1)168h(08KJD520005)(1977)JavaEE2008-09-10E-mailzhangli_3913@yahoo.com.cn42(2)2.42.5CRM1CRM133.1FacadeVODAO3.2SpringSpringAOP()SpringIoC/DI3.3[2]FacadeVODAOSpringJDBCJavaEE2FacadeDao1FacadeDao3FacadeDao2Dao5Dao4Dao3Dao2Dao1Dao6Dao1implDao2implDao4implDao5implDao6implDao3implServices3Services2Services1DataSourceSpringConfigBeanFactoryDAOJDBCDriverRDBMSJdbcTemplateusersusersusersFacadeBusinessServices2JavaEE2(1)FacadeBusinessServiceServiceFaçadeFacadeDaoFacadeDaoFacadeServiceServiceBusinessService(2)FacadeFacadeBusinessService(3)Facade4CRM4.1(1)Facade(2)(3)DAO(4)Façade4.2SpringJDBCCRM[3-4]CRM233t_usercompact()t_usertrace()t_userremind()t_userrelation()t_userinfo()t_userloss()t_userdata()4.2.1SpringJDBCSpringJDBCValueObjects(VO)DataAccessObjects(DAO)VODAOVO7VOVO43VOJavaBeangetter/setterDAOVOVODAOUserRelationDAO,UserInfoDAO,UserRemindDAO,UserDataDAO7DAODataAccess0bject(DataAccess0biectinsert(UserRelationvo),update(UserRelationvo),delete(UserRelationvo))SpringJDBCSpringJDBCApplicationContext.xmlbeanbeanid=dataSourceclass=org.apache.commons.dbcp.BasicDataSourcedestroy-method=close!--MySQL--propertyname=driverClassNamevalue=com.mysql.jdbc.Driver/!--URL--propertyname=urlvalue=jdbc:mysql:///localhost:3306/CRM/!----propertyname=usernamevalue=root/!----propertyname=passwordvalue=root//bean4.2.2SpringApplicationContext.xmltransactionManagerAOPbeanid=transactionManagerclass=org.springframework.jdbc.datasource.DataSourceTransactionManagerpropertyname=dataSourcereflocal=dataSource//property/bean4.2.3SpringIoCDAOSpringsetterapplicationContext.xmlUserRemindDAObeanid=UserRemindDAOclass=com.crm.dao.UserRemindDAOpropertyname=dataSourcereflocal=dataSource//property/bean4.2.4isExist()JdbcTemplatequeryForInt()SQL0truefalsepublicbooleanisExist(StringassetName){JdbcTemplatejdbcTemplate=newJdbcTemplate(dateSource);Stringsql=SELECTcount(*)FROMuserremindWHEREusername=+username;Intcount=jdbcTemplate.queryForInt(sql);if(count0){returntrue;}else{returnfalse;}}SpringJDBC4.2.5SpringFacadebeanid=UserFacadeclass=com.crm.facade.UserFacade!-DAOFacade-propertyname=UserRemindDAOref=UserRemindDAO/…/property/beanServicepublicclassuserFacade{privateUserRemindDAOuserRemindDao;…publicvoidsetUserRemindDao(UserRemindDaodao){this.UserRemindDao=dao;}…}5FacadeVODAOSpring(1)(2)DAO(3)[1].J2EE[J].,2007,33(5):272-274.[2],,.AOPComposite[J].,2008,34(10):73-74,77.[3],,.J2EE[J].,2008,34(6):266-267.[4],,.Web[J].,2006,32(22):274-276.

1 / 3
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功