工 BATIS CHAPTER3 -DAO IMPLEMENTATION Byo461118 Group:o46100604610840461097,04611180461124
IBATIS CHAPTER3 --DAO IMPLEMENTATION By 0461118 Group: 0461006, 0461084, 0461097, 0461118, 0461124
Core j2EE Pattern Operation on Data Source: Public APl Interface Define All transaction Methods Independent class Implement logical data storage procedure
Core J2EE Pattern ▪ Operation on Data Source:Public API ▪ Interface Define All Transaction Methods ▪ Independent Class Implement Logical Data Storage Procedure
EXample: SQL Maps=>iBatis DAO Struts Application Insert Delete Update select Operation SQL Maps as Persistence Framework Task: Relation Table Re| ationa|DB=>ⅩML Operation Select" by hibernate Others by SQL Map
Example: SQL Maps=>iBatis DAO ▪ Struts Application Insert, Delete, Update, Select Operation SQL Maps as Persistence Framework ▪ Task: Relation Table: Relational DB => XML Operation: “Select” by Hibernate Others by SQL Map
Implementation Interface: ContactDAO o Insert a Delete Update a Select Class For SQL Map n For XMl
Implementation ▪ Interface: ContactDAO Insert Delete Update Select ▪ Class For SQL Map For XML
Implementation (Cont) 《] va classy》 《] ava class. C Contact OJDBCContactDAO a contactId: int sE》 ● addcontact o firstName: String e update Contact() lastName: String e deleteContact e selectContact() <use>> 《] va interface》 《] ava class》 IContactDAO ⊙ XMLContactDAI0 Client uSE》 contact e addcontact ( e update Contact() e update Contact( ● deleteContact( deleteContact() ● selectcontact() selectcontact() ava classy C SQLMapContactDAO ● addcon e update Contact () e deleteContact
Implementation(Cont.)