Hibernate根據(jù)數(shù)據(jù)庫表生成持久化類和映射資料_第1頁
Hibernate根據(jù)數(shù)據(jù)庫表生成持久化類和映射資料_第2頁
Hibernate根據(jù)數(shù)據(jù)庫表生成持久化類和映射資料_第3頁
已閱讀5頁,還剩6頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、先在數(shù)據(jù)庫創(chuàng)建好您的表對象I文件ISQL 丄輸出 統(tǒng)計(jì)表1 Iselect t.也 t. rowid from PERSON t用由Al objectsQ憊衰宜檔口 Triggers-Jwi EOtir ces> Jwa亡1盤占呂電占> -l I DBMS_Jobs- l!J dueines:-'LJ Qu啟口總 tables :匚Libraries> -LJ Direces 疋巳Tables陽 FERSON> ”_| Indexe's步驟:1首先sNm * FH)PNANE|PSEX|eowii)1B小白呵呵-AAASLvAAEAAAATHAAS-11

2、| 同 |豔數(shù)據(jù)庫卄2新建數(shù)據(jù)庫模版冒 r?h 國InJava 5511® 零工 JavaScriptMyEelipse AJAXMyEclipse Datab曰se ExplorerMyEclip se HibernateMyEclipse Image EditorMyEclipse Java Ent&rpriseMyE 匚 lipsE MyEclipse MyEclipse MyEclip se 調(diào)試貝他(6Java PersistenceReport DesigrtSwing/MatisseUMLQ- MjCdipse Erseir se Worldsndn礬舊課掙N1

3、 E«arrK 弱(W MyEdipw 甌陽 3U(W)取岡H”: -. GS* 號 J * jj * u? * ®* fl1 T 出廠¥ * 3”咋八.心*-不 DB Bfwur X口fl lrEdips? Derby3配置數(shù)據(jù)庫信息Q My£clip&e Database Explorer - MyEclipe Ente 中用皀 Work be inchWQ(E) MS(NJ Seardi 廈目冋 MyEdipse 運(yùn)奩勸 J* T J?Iq DB Browser £30 MyEclipse Derby回 SQL R«&#

4、171;ulBO;Uf«rSave pa-sswardlDriv-e-r clas-stTfrSl: Drlv*_1 O&rtri>e<t (O d0t-ab-Bi«e O-H MyEulUip、。«!-a>rtupSave-d pas-swords are- storc-d on your computer in n file- that'- difficult; but n<Qitiltbldk-.Ari intruto tf 日.jfcaEtF)然后 < 默認(rèn)完成4.把項(xiàng)目變成 Hibernate項(xiàng)目文件問 巒旬

5、iB堀 童陽I渕恿W Search壩目田Pweject CapabilitiesEihAive WTP PmL_Upgrade Prcyjfclls far MyEcEp&e 9 & dhov#.;Examples Oft-D&marid.u MfEclipse Configuration Center Sub£rip4ia-A IrrhAtioh.-a Fhrelerencfri.Install戢ien Suimnary-.點(diǎn)擊Utililie%*Support>Add HFbfrrrlal.e CapdbilFti-&i-Add Portle

6、t Cdpabilitits 則MSf F曲亡鼻I電f曽bi lilies. AddPA> CapabilFtirfi.-Add JSF gpabililie.Add Repcrt Capabilities.Add REST Wtb Service CapabilFlies.Add Epn啊 CjipahilEti?5.-.Add Struts CapaihilitiH.Add Javasenpt CpdhilitieE.-Add J§TL Libraries-.Add Wtb Pgject 4日問1還Add CCEfiKe% CjipbilrticsAdd CEf«

7、c;t Fieritts Capsbtlrtie?,kbfA died H i Lfe-rnat <Z.aipabi>ill i-tic-sI.HSuipport for iMy Ecl IpseEnalble- projert for H i lb e rn ate- cdI op me-ri tHi b e-mat'e Sp-e-cilFi cati o nz:Hi be-mate 2 Mi Item ate 3 Hi b-e-rnate- 3-1IHii be-rnna±eO- Hlilbernat-ie1 3-3EnaiibOe Hibernate Ann

8、oLaitiom Suppoiirth.Sho¥Vt|? MyEcIlFpse LibrarFesT O導(dǎo)入Hilhm門小e所鴿的包.如果你有T 可以不迭此項(xiàng)I" | Mii b E-rnae*- 3.3 An n at a'ti crn s 3£ Entity IhwdanaqE-r - -< IMy E cl i p-s e- Li hi ra ry >IS HSbOrnate 3-S Cor e LEt>r- -t MyEclipie-lLibraryMib-ernaiite 3B3 Advanced Support iLibrar

9、ies - *MyEelipse LibraryX/uw 岀111曰 匕日缶 I ifcjA riup JA.R LFkbra ry In st-a 11 9 ti o-n o Add checkedl Lit>ranes to project Build-pathCopy che-cke-cJ Li ksra iry Jars to projud folcde-r ancJ a cd cd to IhuilcJ-pat-hLiLjf £i ry rcjl'dr i = 什0口旦 iiti 芻u I 匕匚liltfir aarie-ABirn¥ier±

10、;"Y L (BDT bflASS&iF)取摘5在myeclisp中引入數(shù)據(jù)庫Q MlyiE匚lipse DatabaK Ejcploner - AutoMapping/src/hibiH'r-ate-.crg.KniJ - Mydip» Ent-erpnw Workbench文旳 F:別椒Ml Seardi 頊目 I:円 MyEclips, gftRj Design $D(W) *RiJl:MlIj Mytdip-5* Ovrby0 MyOratliDpem anotherNew., jEdrL-匚呦一Q hib*m#t*-cfg-Knnl 遼論 chlb

11、erme riraxj-也3l3Lrnpaft.ExipOrlm右擊旳O&d選播它 <praper匚”IBp rope rcy.Ejr.e "'h-hoJ-dd-L - dii to ">口"日上上弋 f 口=口 匚"工丫,r.arT«-""dial±et:'orghibrrnji匚上.draleer .CradleSDia 1 ear t." f?t* B > 沖 anw wcoiHK*c-t ion, 口 rl J dfc: qhcI* ?百til 圧;:;

12、1SS1 rOFCL'C/rroFr: Ty> 門36 we0fln*i?ti on ">KyHib*rnaEe</trejiei! c.uejif DDEiK-cti on pajwsrd ">12 3</praperty>zleltt.s "coziK2cti on. drzv=r_ Lass "3 口 racle - j *±bcOracleDriv«T<-'FT 口匚=:!:¥> r.aiTf ""mye-ci ipjre. c-sn

13、zi-s-cti on-pr 口 rl x eITJHj|,Oz,acle<./pTOFerz:y></a*831OB-facM£y>Configipraljan 1ft計(jì) 39代環(huán)囲 SQjL gfai 曲、書 SQL 料1歸OB Cb-Mcfcmi T 詡 Tbh両wl IMq 刪音文徉舊概Sfi 間 Search 項(xiàng)目P) MyEclips« 商(R) Design fiDW) W«(H)肛 IDB Bfower 匯0 hibrnatC'.dg.xHiil 胃V s PPiibp A * irH 3 J jL_f J “土丄7

14、 JA.!iTo1 <hJ2>eTtiace-nrnjuraclon>I) Myt?lipjc Drby* 0 MOrad#J Connrctrd to MyOrHulh> HS JMONVMOUS -APEX.D3MOO禎 aPEx_PueLic -r:- APPQOSSVS> ftp CTXSYS -礦 DBSNMP a 陰 DIP-折 EASYBUr7 國呂 EXF&YS-拆 FUOWS.F1LES圭(NFOI&&UANC祺 MDDATAE- MD5V> 吏 MGMTVIEW 斧 MYBOOKD& r:- MVHEBER

15、hIATtsession-factary>昌r4-H4New TableNew Foreign KeyNew IndexEdit Data<prc-F«-i;y preperry preseri:/ pz匚 pztr prEperry prcrcFi;ir prcEerT:7najr.- a vto *>update</p,rcip fr rty>叮苗rw R,dialect',>'org HAbema 匸色 dl a lecu 0ra.ale9Dlalec,c.</r;Tcr:-erT;sr> .ajr.-e=ISJc

16、DnnecitionB urlozacle: tiiLn s glacalhoac 115211 ORCL< /£ rec: e y匚tonnecSiiflift uj;ffrndJEs">My5iit«rn.aEe</p rape rt y>陽日 iTf CQ-H-ncct.pa rjvpr'lS-C / p rep 二 rt y>niMTe" Rconjiectien - drivflr_ gLss T> q raaie - 3 eLt百-OraGleDTiverc /prQpertsr> r.iaj

17、r.e= Hisyecl ipse m pr-ofi leB,?MyQrac;le</prapercy-口rep* Ta bleDelete AJI RewsRefreshGefieratece-coKricRiratioii>J PA Rerse Engineering.EJB3 Rewse Engineering.呼 Hibernate R«ver«iE En粹;0.用旳,Lzj Copy Object Namea凸mport.-亡訃圧 出Ewe:-1 目 PERSONEj VIEW與 SEQUENCE:| SQL History J DB Connecti

18、on Info 芯 Table/Obj«t info 口 拄制臺*選擇Hibematei向功能Q Hibernate Reverse EngineeringHibernate Mapping and Application GenerationGunerate Hibernate mapping and Java classes from dtabae explorer tables的 hibernateMS ava src fo der: pAutoMapping/srcBrowse».Java packpge: cnjbitdomainBrowse,J持久化類弓映射玄件

19、的位置 /. Create POJO< >DB Table nnapping informationQ Create a Hibernate mapping file (hbm.KiriI) for each database tableAdd Hibernate mapping annotations to POO (Hibernate 3.2 and ove)V Update Hibernate configuration with mapping resource locationV Java Data Object (POJO < > DB Table) 匚re

20、ate abstractBase persistent class:BrowseM.| Java Data Access Object (DAO) (Hibernate 3 only) Generate precise fincIBy methodsDAO type: Bjsic DAO Spring DAO JND1 DAOB ase class: <Default Base DAO> (recommended) New“Use custom templatesTemplate directory:Browe.< 上一步(B:T£(N amfi£(F下一

21、步完成Q a-ai r:liDM ntflrpriw- - My teips e EnteqxiM WcrkberrhSttiyi MIE:-用淒團(tuán)聞 Search 攻日I片 Myfclpse 15tTl:Rl BDlWl 母肉網(wǎng)n:鹿翳詢口口曲 ACCPWeb0 Ptfson.jArii I hitMrHJM-.d'guni| 1 <?nal veiaian- 'IQ* en-sodxng-ByiT-Ba32 f!DOCT¥PE h.ib«x-n*t4-=Eaiflij|u.FH.Ll-±d PLSLI亡S"/BiberrLa-e

22、/HjLbeiiiate CcaflcruTBrian DID3"&cp i i /bitoeEDBre»saucce ferine riiec/hJ.bemaice-GM3応3 cnjhitdomjin rrwn.j*wv Jh ftwsor.hbflumlM JHE m斡E啟亦E-L6】i Hibernate jJ Annciarticos & Entity i HilparnjL$ 巧hf鼻 q剛"t <!- QeDEra.Le<i 上即 <ttibema!i:e-Gotnf lgurfl.rlaD>HibtrnjiC

23、t I&ala.O BijnChpngLJ CmiGjo iQ Darra 白 EaBvyQ EmphyMni 口 HorseLJ IrfoLfuijnceW Re知g歸9* ltt 11臼 12 1鼻 H0 15 1百驢ZO12126£&2Tcry>cpiap-rcy aaire. aistcupdiaice/pEcjiciT-irj-<pr0perty hbjm- "cliffIfsct&E0. bibifcEE>*T.« 山1岀工.Of*el*SDi*l«cE c/pziDfieiTyj <propE

24、rty nanse "cranectiqh-: Qrl">jdbes-axuL* 2 Ebla: flLaet-Lhja»E 11S211.OBCK <?PEiDfieET /Ji-<prapercj' oanje- n!MQneG-tian-!G!FerziflnffT>M1ifeernHterCt:2 1- s-xL,- vu<" riE!drMAtEiart- paxsiid"? 12 cpiopertj' DEuifi- "cannectioK:- drzmeiolasj*> deacIe jdbu *clr:l.雪 e:e rOr-BCleDflvez Cfpu甲三吧廬 cpioperEj' liULe" "lye-cZipse a ;ojiaerj-on, prsfile",>1 |?wit1 Teraxcn-J i 0" eEiGadiDn-"iiJ 'BOCTVPE hiba EiMt.H -swpf:! nip PLSLie -/ItaixsiH.La/Illba rna!:3 "htrp

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論