Professional Documents
Culture Documents
Sekhar Sir Hibernate PDF
Sekhar Sir Hibernate PDF
Sekhar Sir Hibernate PDF
com
tutorial4us.com
www.tutorial4us.com
A Perfect Place for All Tutorials Resources
Hibernate
(Sekhar Sir)
www.tutorial4us.com
f+rsir Kfre : -
&n'L
..' O AFhi ftr
.- O A Dcft.oase
lesS Seorred
@ ftn. o" Ycg
tg dco the dcoE{
r!
---+ u6iog )(rD) ab 6 6o.*6d i olED6l e4{rar ta a pk* Bre 65 o k+end , &rJ the
diPPaence i5 a el6t Brc cat' lrar 6t6re tb dola, oo Xvol Pirc c:.n 6tur tb &fzr
E5- Flot gc
lN Asc 600 rt is Doi d.s.dEtbc 8lc, JlE) .3hft tbe d.dz. .'.J$ .
{rrpad > loo 4tYrdid> r.-s Bre att' $r ddta and arso' cltaig de.scribc.he
MTE.- rhe benst oP x.t b, c,ot tan tmrs &'{ rbe tlera a11665 io \-,
".n,rrto
[nguc'ge In]4rende(r, PhrtP.\m I'n de4tn&,n1 u.,A 6ro6 el .f'*g'rdr* '
*) blegaie as a &* eo d ".-
DaraBP5e frrtncl8errrd
q{ltth '
osfo' i rots
f app;og [onn ) ?
go Pcr ohier ltlonrlr'al
- gi- wb'J u.,e n?cd to g Pt't iara oPPli@ticog t6 ialk @i$ dc^Jabose 5'
in dqr rrffriroidr, @e ned b odd ettber tg 4toon btoc}6 6r tt"o'e ' :t rr{t*^i
J
Itre b(dde o 66 pyogro.ner( ( chealed Erc4Hoo s )
.v
@ rn OOc kcl,rplogs so{., ycpi}tdive 6}.,11''fefti a{e reqKrre 6 pre"vn OnS ctrrodGd \-/
darauage . l}"io rtflfivg slattnai i5 cale d go;lcr- P1c-r}e code' &oz-o ttr:e cocle '*'
J
a burdeo on a. Pm0ramff|e{ t,i be incyfdsed. (00)ler-pldt( to.lc)
J
Ja t'LkecoYe oSodl. ccrnnedr<'n rIE rtam'nl e^Pr;c;tb'
@) f., Uoea, a Ptooto"lrrr{ ba5 rJ
t lc the cc"\rfLtloo o6t'i''9
rs -r- r {I catrr!}{'ff' clo6lDqJ
It .nec,ng $c pYDsfqmts 'hc6
e n
lo |rrno
F,nd
J
(oift a . rf 't ts pel horxl lc proprtg then cd a laxr pior of lioe ) 4h J
Dara8c s
otlozlntz
blro rherr-
bJ C"nec}toj
difiit
D&tarSoae oflero$oo6
6n oo1 6lll) us?s JDSC Te'!'nolo33 " to ft1ftxrm
Rr{, obr('inin 3
on Oprl 6lur ureS tNof, Lohtn tuoftOlon pr:orl.dd$#c.rprr"d .
+rqso4rtort!
DoraBasg *.o,jlcm3. dnd fiA i5 u5td coh;re oaooging he -Dfa6are
,,r l
65a, p64g
----: dO66 (eoh r.te1
igArr,5 -_--> lF.he
-+ JopLiDk Or64c (CnP
---, --'
oJB Lotf(i Javq &ao) --:--------- ,qfi4he
i4 the pdrDarb Rrnctiooatirg OP crtr r6e OEn 6l@ra i6 Eeme. Jt ff,an5 rbe Ddq
lr-rrns ftr qrirr b don ;n fie R''rq oP o\ieus and rhe Par
gi5r.r,(e Log t(. lS
AD5: - Hib.r Dde i5 an ofxn 6ocl.ce ftortte axnx, olso cqfld a6 an oam fuot . o.od
Ib o(ts a6 a middlc tagcr betrren a Jo\a}o{?n aod Dalrr 6ose { *u' o." ,)
Pe.riarcnce ond qAerl 6ervi.e in rhe furm of Ohiects.
6+ JOBG |chnolog8.
gere"(marre of an d{ptrca$on.
tHuaoare has ver5loni n9 ao d TjrrrsiamP P"olul ' rorrh ttr-ra B** ' *t tn
@
a &,ra ig rrrarf ieJ arrl
c' l so
Corne to kr{Io foo *"g no o? iirnes
timc rhe dola i5 lot modi;ed'
oh t,tff detQ, ol c'Dho.t
a bl{-o an o{fli'4}too
ctcrss3 OhjG6 lv{ Darriftc,osft.r
eYc.. - "
oc I oalzole
-- Pr rorrPle,
{
l/ mc$ods
clo.s6 o? Java.
@ p,r,,. ctoso lYg.Enrprtan ,{rcrdi Er tcpric.n
t
/t crf,oaS
(0 ctosr D.oo
I
3
Pu,blic
cla.J6 -fe6
i irrdcrr(ni6 iava'io'&da0?4ale
t
t
-z hm Tert )6 a pF cldl6 ' ga'n"s e it ls 1"ryk"r"1o3
fP&rv let
f{rbll c clals JZnt exEnds Javqx ' 'stvl(t' l-+
t
I
-t [r,e Jc51 is nor a Po0o loss , B@us it i 6
( g,ft.adin9
'' :'.11.:1
U
@ p$io Ctoss Test inplctrtnlg jlva. rtni' Qet'ore
{
ir
I rtx Q'-nG>]
a kz it1a air.Plqrrarins Pt.'oGe(r)o"l
h'. ?.t i5 rpi nbJD ctals '
fo ''.\--,
bclffSi Rmi Flrntodl
\-
*, -, JD Jdva, cr l;gbt-ordgfr Pratnecao'f i5 also cdl-ted a.s bdn-irrvq6ive C't 1,df' -
lDRui6i ve
- ltarft urork '
t --ur i^
i6 t Id
tlo) invasive
invcsiv cit ;Dirlriive ft<-rrneroor l< '
Ao Healg - toaghr -'
{iietne coo,
'
- Q:- Wbat is a avogon i
I *-- A Java&on also a Jo\rq ctriss, t.,r!,rch i6 i;dPerden' oP c'n5 rec|'nol"g U
crr
''.1
a lir^rr uorK'
- --+ to 5d{ rk* et Javcr 4lat5' a.5 i a 4y9S91
tf'ti $t'f"t koo- cc'ndiHctns tousr 'be
- goltBud ,;i l
- O A Jova clasS rrusr he gbtlc
i- a c6t6rr4cl41
(D A Java class mc rst cootcdn Pu$ic degorrl't '
+ \t
a S'* adaq Pqio rlasi rrn ot trsd rpr
Everg JavaBcon clos$ '0160 Poto
'l'rss
rt_
1
R"blic Dn'( )
"t 7
J
//o<r+bds
-j z lnr b)
rt.^utic. Pt'm (lt" a"
.J
.I
!-
/l'rshods
t
-J
J4v4gean clars ./ D'mo )s a PoJD clas w'ii"( rhere ie no
- --- Hce &rrr, is noi.c(
!' FUic dt&rot Conshuri" ia
d6| de'ss '
:
mapPiog in Hiberrd :-
r{rAPIDS i6 a procesc oP h J
toritlng rrapptng6 bp-turcrr a pcuo cloxs no.me
O iu.ble rnrn aod pot6 ctos6 Varic6te6 Dar,'6 lo a J.drle cDluff5 ftw. J
f__'(fiD**
rd.diT
ssXxr ( ) )(
-----. b..b4viout
ge xx11 J
r orr
@ 6n-k{ rr
Op.t4 to\, hcorrse an
aPPl'tcollcro
rndoot et 6 rnndatz^g Rn on
.
Y,trtiip\t Ptfb cto6,6,gg ond I)arc.6ose &n GnloJo 661rip1e tabler ,
60 on oRfl t@l @nrt crrrtr6tan d .P b te 6rc'red )o
objed is neecl
"trS
c.ofe
$ve 1hJ5 irfinrclaH('q, a pro6rome( rrust Ccrnsf"r.+ /
u*nt table' -Ib
rmfplnS.
SLro.'ng.
-----\
Public ct*g C^ro-.t > ffstortter
t
--_ C.rto-e,Ia ; (tJ
> cia cdda
.+ c
C(lsrDrrEl N{rrie -.o,n"
$
----, cus rorrr'f Addr366)':-
. O BU art,ng Atrpfalo'g
m cldiotira &d[ @id |c cr4d iD ]fikntt ]a 6rn rtDl. Filti4F slaie]&e;bDg.
Ahloctcrss
ftrsbnrar
xothe otove trble Cr.storrs fioto clc.ss oQj?ci ;s ;ed fo be 5luftdriD CdltDf(r F$ler. i.lDcd4b49
'-> Atnat\ gxr.oiidn YE+rIYtd f,n an ltnl Bre ig ''xrDt" &+ hbctrq}t c'!of's
t$e
- .bbro"r'n}', lo
rnolPln3 Bre as T.?cogni2' iL
(15 1rgeslcd io F"+ Ik exrcrstoa oFa
a,sul$ in s6 64plicalton.
---> f,rr i"t a rrnPPlng xt''t P;1s c{ Jrava claJ5 an.l PtDpcr fi o? a .laa9 a.e -,
(aogrnmr 2 . rrnl
hb-,
4\Doc|tPE
Zhibernq,r - rrfippih$ z
h r
do]abqK ta"\e
lrnsa *
rnrre= Rrlrg 'yrtriied iova ctassnorog'
.L1b[e -- "E
z.id ocfi= "Vainablo **" Ot,r-t, =" pn*tg yrX olcmn ",.'orns" >
LlLt.4ffd >
IfnP 6krttnnr6 : -
in +$bernoJe) 'rtr i5 9065ib\ ib .,,$le rarlliple
O t.:frile consttt t'lng q r'APi og 9re
-) G"rAgura$dn iq }hhc'rrre
tbe 'lliberocrK'
0 C.mndftt Pto(E| l}es
ra $b.lDoJc PoPe'trlc5
@ Ma,mrng Rrus
_ ---+ Conggctrotlon in tlbcroat Can be d6rE tr) crnlg alre /,r$d i.e. \ ooanr.cfing
.'> a,,e cao'L rPdace cc'n Bgurdfi ort &oro xfrl (nlrb onDofu'lon ' 3t me4Do in b;beroate
r't'pP)n xrDlt Llt p6; @oegurollcn Xtnl
clnmlaHc,S ort usd a.lg Sl arr';a rt' 3
Ll \Lss 7
4 hi!a,D^K . rr,opi. > dE {frd'trd da"E(drratl
g
..16r .t'F !.bo.4lrda adns
--t h coda &c a< us+'S alr,.t Hc'r) ptDa.'/tia of d"ra6"1: aP oa clu'qt o"e wafg\- ti q^ot+s v'a@t'
JDBC
. t/rso! cg &t ttq s(llt otg$lrason fil'{ o' non@d tt q"} Ia"46lc
'd'
\\loal2oft
Zaogn.lrne>,cPg,xrnl
LI D&,1\PE
EtrE
l+ibcr rrrtc
=-""*'"3
l (4'n
Bguraltq)
ls"
I -
ftte
\
ft" a Rar.6 &rc"lk, t,e Lor.< a rrr,ro iar 6re aod dr+nd."r ja. B're-o. simi t(ert3
fta Hiberoale hlberftrte 6.(Jcr1 is rhe rra,io jal Bre and fie rer.dnirg ,taY BLea
a't dqrendenf jc" f;r<s 6,l ir.
ne Srxr<rt.'g are re li6l oF i<.' Rtes 6e+'nt ;n 11l rte C1-4sser,r u R"t
telozlrora
rrndsgiooding rnc,n and drpndenr jc''' frrtt:- :-===:-=:=
in &@ ot $e n\ne o(
-'-- I? .^ Jc,lra cr'ppliao'tlon uge3 d doss dva'lob\e
pe pecd 10 *,- *Dt iar Bte in the c\atsFajh'
corDpitaric'n drad\ <r need
aro*ct iaFte
.glr, *o't &pndt on acratscn
- ;;; 6tc at*o in *te cLAs5PAr !+
ic'r
to 5c1 rhe &pndrr*
Eg- fubi
j c class A
--vac Aiava, A. el4ss
' ' vo,d tntt ) cvv a''ta"
z.!c.r
l llcode
3 J
3
U
F-l}lic cl656 B
>Ja{ac B':ta'tc\ )
{ \,
E^rc?$un otturst
n&rr A() i
i' I a
A d6b>
vdld rDr)
7s1- a;,r55Pc,rb -' a 'ic't U
{ >i4Y4c B'javc J U
aoui ..orL) i
2ja< cv P o;'it" 6'ctctss J
3
3 ..J
NJavo lrcl n r1
SrHlc gars llai
r)
>.$,taL gEl,q"Sava J E4codoi oailllF r-J
{r,su-1Srnn3. a's5i I ) Vx:LPllott O.lu\\e 2 S<+ lrosiiort zr-aoqe4vi
'{u oo=nt- BC);
25q' q1q5gP..rh = b'iq';'4 >
a)a4 -J
cLAssPArq
biP-I:-
clc!55
-; c\.6t< orr ohJet o? Crof:rt.oacm
..., GnAAU'';bo cass i5 -::; *, q!T:H;::::-*'*d
-e
a Joa &,ra aFPl;col1"o, Lib"nc"t( e'viroornrrH
Conr.;Xu*a'lon class
cP3 Qorr'a't.
a class o? ot3' hiterrtd{'
-a GnPigr.rarjo'' i$
@e need to corl &'nP;gure t ) -eri"'
ctolsr
Aht' c..oJins on ohi't of s-n*t*'^
-z
os c( f)crornel.r
bX gass;og crlnfu*o]loo !
9o"tI"" --:l:
Btte 6-9 ots6 tacdeJ
and'
*",^^fi Btc topprn9
- *; '* ^o*sroo ^t,^6. l.rh anfuyuTelton
&o-
*"t.' i5 'scd eod t\t
datis
;; "oe
g,hAutatl oo ctc'tS '
aod vaqio1 4t s a s+a'ed in $. 'oe !a"94cg
o?
"-t
)
(oofiguotla Co* -- r*a G''(r6uvarto''t ;
nel ' cfu ' x..' r
"J"
biber
con?. ccm$qr'rcf"
Sk?- F-: -
ttU"tror- Cora.i 9".t",Y"nn,'tr
lug l, rc,-r oUf* oP
-7 B.aill on
..' --u 6*",-Fotr*; ia ..'' jrEYF.ce 6? dr1' hlbcrodle
rrtt( Ace i3 5^er""E'q9li'r1
-rtc lmplq'rndo! c tass of &:so"Ea*3
&<r liryt(iLt"tl dn c'tass
Sincc hlbe.no.rc ir a &,r*utru t btt' inrr ooA iB I mP
ddl"'
Ull[n a ".tr.rnFar.ry5 ohJe* i5 b,ird th,e q a! &n Hgt,roH ot aod nr'{$.- &
tl)r\ 5e skxtd int6 Sessrct lFa.r,tJ o\)&l
o
&rsu,Fou-g ObF.r ls .r,"1* i,*.; .-lgh* Ohje,j.
rt,*s is tbe qtr'tt o$e k"r{ G!i6 hi Ohje+ CY@ttd in bige' oore.
(
Seeaioq sesStao = +t!$ttt'J' of'e o 535) an ) ;
.---+ <ohen a
rd\l be dosed.
\-,
355;6a1. clo.5eL i
)
D-
r"' at4<t
*(pS:- l^lhllc 6toioq ir Seat'rt
o
dfiods.
&ctt"g ' crosdt)1
'!-
1
closg ' (j'rled Pro&&r +D a &fabase
'oqf(r
6r'(ioq (r Polo
clqss
91,{
16e .Pauo<,tng Exdm?\e iS
u5;n3 -lflerDdfc'
Produir-
"1
'L
"'
Proa,f . ,iavo f eom )
Flbric ctdss Pna"*
J
' pn"ot iot ptodatrd;
i
f,'rvoJ< 6h, D3 prod'dtName
Pr;vaF dooble pdce i
lldeh"rt Cdnsr'advi
F^ttic !ta,,*C f
i
t
ll fu rorsd,2ed Coosrr,.lt-u
"'; P'oa"*(rnt Fo&!Tu'6Hr
{ )
*'' P,odurld = Produrrrd
'
t)
J," int SerPodarrtu
{
*n,,n F'Dd'uqhrd '
&,
It-btlc void 3er Pta"" Nc't" (Snq pd-'rM-')
t
T
Narot I
*t' 1 d"t'N^t = P'i'ur
1
;. 6*ng 5.,?'"r"*|t''"ct
u a
lgno n Fd,-r-rMrou
l
FJui( vo\d serPlttt (d'*f Pltr )
{ ttug' rrt.. = 9n,.;
!
Fl.bti . dc,br" gu?*" t2
l{ rfu\ n (ttit" l
I
3
6ro,ing ao ohjeat lDa Dcrlaoag e' }.la'b'i'q'(
-'tfDa d cl&ss
l'1ibsn6,t o{T'l;c.dor .o}'ile
ao ohiert fom " *ult
PoJo
oro r'ol/Ex"
"-fl Hib.'mrcl l+b.,odfelhnios
,r*"i I'Hl-ll,i'- r'uu"t >
biFrndltc- roolgiol - 3 o -d+d
'bril: /f brxrnott
'ou..e{or6. . ,rr/
,Llid >
' c'lamn =
"?nat'tl'
ztoF"rU ffrme = po&vNa'ne
L{rf-*l :
narnc = F,"" 6olrmn =' Pnte'l
zlclos s >
4h;g'rrx - mqf ,g
'
Zl-- L;!<narc. cfu.,vt --)
Dm 60 //FN"
< lD(.l!PE bil,flDd_H - ron R$uya$ao puBfrC "-/lH,r..*r" 1t+*"-*t@-
" hirp,/wnu' !'ilcrrox" org Idid hb,rol - ronhyroHon -3o'dE''>
I
Z hiucrralt - ('#rg(4anrn >
zeesic":. - %oo4>
Lt -- Csrncc.ta^ p}."F lltg-->
*.",ti'""* J'i*' lt'.,*u- et*tle ' ituc' Orade ft.'o' 'lvwaz
t^; ..,a1*qt'1"
lr"oqr! narn?="H!o(^aJ<' ccaneri'lc,\ " tarr "u jCtc: Orrocte:lhin: g\o6thdt: l6)r:occl 4f${
lProFl'rv mrE =' hildoalt' c@.t*ro. . c$trrn@rc'e
" > &r' 4 f'r"') '2
!
lr,-s,,ar41'>ti3u'
t)n'pnn'.-
A""fn! mme='fu'!a<i4,c' (onnt!"c^ ' ,''
-- I*,"'t'- 1*.,y<rta - 'r
Zl J.** .
A4<p"la,L
z{roPry nsnt-" hitt'nal. " Sal'u_- ' a6'Ehana't< ' H+ z lt'^t*'rta 7 \i
,.1,7.t ,,V ,: :,. t,
zt- - ,qi;ri h rc f+tp+l e r+r t* '.n,) 'r'. 1 . : .
U
?irrllE.l2.r^_, r'rJnt|., i, , ' U
- r.1ir. -Frn l!-., r U
r.,r6 1rj?l!/{
^lh
!,.'+: ;4
tr)ll!,,..!:i ir.j.J aJ4,.t lci,nir ...
tsl', rjv}.l] :4.1i r/
h1!h,!l {t{.: rliaaratlrt .J.j .,.a, . \t1,.,,rtiri-) ,,r.,:.*l ., I
U
.,
(9,
C,
<. ,'t?1r-11.. )i,.,1i|!rrij :
L U
"'r. t - )1\,{r
,
c..._
, ".9 . ,.'. :, ()
' i r',lrnl
< lijt! \J
1, li4.r.n.n;l ' , 'rirr; I i-.s$r.,l.-:
\.] . ., ,,,,fon !r ht .- 1/, t:] l"lstrl
U
-f U -\
< a.lr:l.r$
.:r
lyl,1trLdl ^
'I l .,r U
. ,l
// P'oa.rsloxt t ..!c.va
Poblic Pod,$Ino.tt
t
Erblio 6ta.lic voi d rEnn (5mql1 a'ts)
J
t
ll SteP-r G.Prgtr.'ar.n'(
)
ddme z rteto
(oofig"' arron "
P.x*Pd,,*Ja(t"S;
f . ser Podtltrf'h,ne (" sz-r");
P' scrP'rce I to-1 ,
/1 st'P- e
(
kgr Jtaovt't''"n )
I.ony'uw lr 7 s'sgtdh '
I stc?-e
*sbi <n , hy e L?) ;
I 5r<? -9]
tr.doDmitC);
/t srcp-n
&55loq. closc t ); ")/
Syov- . cx.a ( A Wd''* 6qlt-t ts $rtmd in Dmbase
lvnttn
I/ 5l.p-gl
Qut'.i' ao<C/
-3
j
ctdgs, o it cn be corr,Pi rcd bg tli&oc+
onl cLlBgPATll
-. -+ Prodr.ct..bva io a FaJo
&rcn3 '
l+utr.ax 4trr aoroa Roar0 -java
io te clA5sPArH
,'
5 Froldrsn' bt'lt(m
\ h;5ro'Fd'jat : '
Hi krr)ortAp-r ) 6p.1- cussp$ = D:\ h'b!,r'!"ti -5'{'
(tftt} table pro&d - blle ( Pid tur*tn (s) pnnt'rt }"t , \,r&m Yaicha{5 ), N
'T..bl( lrtdftl *t*g" (l'r))
"
ttik'rnr 4p!> java' fto&ur Ins<, t
q,ua1 i6 atrar<d b.{ inErftrr'rj Ol..tat'ldt6s' if de ee d'lr db'.r4d 6hoo-rtr |. 'r4,ftJr1
r4 Jbl6 intcrt
Hilr{rnft : ioy'rr inn Roc&u--fajotc ( pno.ne, pr;re, pid) .af-es C?, ?, ? )
-F,p.*...a"tooo
A Poa"u ohie$ i5 Skrrd in lltrrBase
NOlE:-
c/# bd-l i6 J
ond Utc bese iatje CdumD rErne are rrgcied tbcn coltcmn
opH crnof .
DDL ot'crc+loo5' an
o- dar<'k'1"
-+ TbiS is an Hibernotc lxofx{ tlJ , us(d &,< peiR rmlog
{ b;r'oore'
exa,,d f
OrdL;ng toit+, lniLcroarc, h;tc' norc h* ,tu o!,ti'y t6 c4laoc.fi'adJ
-> Lohilt
pc-rPa.m DDt oF .\rloos ) iP nerJ.55.d11
@ lrcct-droP
rll-is fiDrlitu i5 vol i dd,l< '
---' te cteRul i \'/alrre .,?
i5 crerc-dF P tl'cn
;P loiber.r.t<. htnn? dd I ' atlto FDrxr*-b
-, 6o exer'r-tl oo 6k'r5 ') c'o d
Ci ) hr trnoarc ot
o'lc5 $e table 6hcn ao dpri I cafi
*xn hiktm*c t'irr Dol_ lyDp rhe iaf"te Pprn the DtaBase'
tnw'nqi a.,,
be added io
( Croh3uratlo'r o'"
-.- Ttu'b Libt{m.h< hboalJ ) ' atto TnYt<\ ean
tike *) -grloto;ng
ad t- c([tD " 2u4darc zlo'tw*'l z
ZPnFrry rl.,Jne --'' bl xrnc'c " hbmz
.- gasStd aS PaldroJcr
F^ Coo6gqrt l) cx-rhsd '
P;re i
Bre, coe can GnrEcficm ProFnli(6 ooe
ArF:' tn hibernarc ProPerneS 'orir gle'
rrr'ppiog &,,< he
nr,nrr be odded
c{dt fo o PrDfx'
d' 5
hitIncrfe proP"rH e6' &lr
Btcs cc'o't
Cr' B
"
rr i,.i b
lbe &rritr,
.q q"1 " ld,r'iff "fllr$F:l#,J"ff 3 l' 1*: : .'
""0,,,{'-T,1Tj,**-'-[** . *bors:r;r oarl po,r!o,i,i] e1_ j. ..,i.
(' -- Ij
,
d tst:- (ti
t" {l; .lldqt,i. r .1.,:sofl ;;,rr",; ,... ,
^t"t^H r't)l ) ;
ne- Ltol'!- '--
o,
ConPigurctron Lon P --
.iisti' otaf '.StLi'on"oni)
c,op. srRqr,'ru (ll$''+,q4*rrySgg; til
-
, I ::..-.
c-F o ._ t \.--,
^ '*0ogxry-(,"mn,-,),|i,!
t'!i:rr .lir.iai{}f Irt}i
i-
r,,,,nr.,l
'
rnr#J *,s . e,:,r,:.1,,,1,, ,,., I i-'.'': J"''
"
tlo"ncn"l ' ::
) '''S
lr'
i.,
fr-iqr.l.r, il
;
ir "ir rer\tl.t_1] r.. ,..
.,. ,rirj
# r,1jt) l,!r,jl :ai]:i .: r.,t,.rr.l
t.r', r,,,2:!1 i. r,!] i.rlr:r ,:,p, .3 :,l,,iryi !trl*)d#-} ,'-1,
tt:+t
,,,:1, r,1. ;.j,,r:f:i i):rn
-+ hod oft'olion is rpl,iog b* radiT an 6qltot R-n a Dra8age in}o a Java aF.J
ustng !l'bc.mlc.
}0 a baa Operc*ion gelect oF;raficrn a tvcl ltbSfarnro/t }!16a-u J
-) Jocrde{ 0ergorm /
goio'' rn*tr Fo<
ant ore 4 rhe li'lrodni
^ noo rrr'rhodr gpen $
U.
y,crhod
4 ?W do17.. .
) F'*',g, .tll bamrc rcrurng tbe Pol 61aa5 ohj* lt &ua- anrt .
rrr);
D9
ar{',
lll 6oN Y
L(n e6oo
@
oated
91 e,)
---. wlon M rntrbozr i, ur<-d &r./ lo.ding an ohie* from Mmnse ' ll'1a,'t4r(
*rc
4sr vatgic, wot$er "W the uid"
is eri"t in r}raBase cn nor' re axi6l
6,tr
rhcr i6p16;dttr rrado it &om a ttr hraB.ls aod pre1lare.s inltr rtorh Pa$o cl4s
obslt (p,.i"4 closs dqi) -frdli #no lt*1- PorD ebs obdel.t
dod
lOcrr to Our &lao.Cpn
l"{nd
tkn h;btnor" to 6!i P Tte
in frb<El6
Te *r 6iv.q 'd 5 oot er'isr lD rba Datao@e
teads rbc dafa rl &+oB<ce a'rd fxd.5 it intb rbe PoJO clax obf!f,
E:O IP {rc Srre') rd do.s no} oxisr io rbe Pr:er{" tt"- laadCr-) od6ad tfnotog c16
,
ftrl I;
Er.tgtlo') l kd atc'-) dJ(rtns
*- ,s
4-:- rS it
o ,'aDdrhrg
nanatnrrg bor,t a p't'bcygl.q ,"ff,!1#"
rbo,e
ro
t;'+t'fi^{
cot,rc tool'ng
-y31,
&| No, rP rle'e is rb Ptha,, krx ''tifh''r6 guE oF''of'o .,rb ou|
, '6atd J
hrbi"Krt.
grc.r'rrqn if iJ 16
c+roa , L.t ia loqd oFdic'') b,u"n*l +rq6' or tl'e
6iwt ,
,-l;'{
4-"a-**.,**i, 1,,', 11.,.1 i:r. g-r1.,,nj ,.: i..- ..i rj\.r-i.!r +*r*..s1p ,,.-,
\,,
E- *, ^ "olpT 4e, E*n'#ae d*y + ," ,""1\^,.:fl1!y: *k u
,*u -- !; k a't4,.. t, ^ 1'o1t''9{" ?*"],ir,, . j
\yto*, !,
,zrtj:r r rrl-'r11 'r:,rrrl O
U
' ;,-tr.i ,1,.,"r.,it ,","j, \,}.a..},r,raj .;.t j|. 1..:.ii .:t; lt ,, rit L,
I
I ,i.
S;;ru'.,',
ft'1*' 6P"$ea'o"c'r;
&tt,o,, ;",; =
0hi.,. o-- ees5i6n' 8et(Pro &J't)' 'cr{;5'zzz):
iG {o==rut,r)
&s5bn' cl6c( ) ;
&.r'"5 : .r*. tr )
! //vu,oc)
, .,,t .
J //t tcrss
7 t
iaua Rod'.q&l'a iavc'
zic.vcr Prq&d &ie<,t
Hib.tn.*<: ,ct.d P'ud,.r O - .Pi'J - -'1 ' ''I ' "iil'r ' rs;'l ";
A Prldlrt u';ib id $3 1s S"n I .:.-i !i rrjri^) ..
pr$dqd id - 36J
pnirr* oom z = Lc'r ...:ti
'.",,,.-
i :
f,tudu* tni.L - t6.,o.o
A".- ftcu to IamnB"a urec.rtrr an Oqje& is a{)! 1ot| lbtt LazS loc'clea &""' rhe
hrr.bases -a
Ohtcl i5 3elec} (sl) )odded. fb rdr4rns ew. rbo<rg b (r:e are ml- acrssiog (rudiog tb<
ltr,.l obi9tr iD *,e cale brt iu is loade d .Rt- (*".r'a g"- ) *" Dolaarrv
\-]
dlong toil}) rbe &ssion' A6oe dn .the ohjerts @ill be
b'tt'
-. - \,/
Drrtog ihe #sgion o?
at rfla,o6 iP are Perf;rrq an
ttr.?e'l) a?u't *es''a,''
EYrnd in $e carh e
*is cp<'aF'r's toi't !e
th"" fo *:'
io') ela* 't:
:Inp.t tol udorc tu{) &x,.
ail'e al thar sssidn'
i"prt'e'lrX in
rbe
sn|t d4 l;5c.' ncrrc
mctnd l,l ns Leloctrr a 6"De 6{4r
*r
tuiiih belP 0e tbc athe \iihtrnal<
red'rcej $c
an tl be
o$ *tt Awrr car'r @i
- ASa hi*, n.jc p'q,yqynmc*/ rre l*it hr,r. ant SerHot s ,dfu {o \. L^) c'"4c +e
ca.le
"'r,t
* or J,salle (n.'oa) Jfie co<hc'
be ailtuahct\ catc'kJ (Dhem a 6es'sidD ;5
- -> -thic &s:ic,n le,rcl carhc coill
* sho' l cn rt'e
,r" O*lg*lJ ,* ,nl Hme, 60) rh&l t@o se)e8 6?.nl3tn/rs u\uLe
I er.rq'- '----) s,
OhkJ Oa -.- gsd@!, gu (t oa,r".' chs,+*)\)
Prd"q P) = (0md-r.!r )or,
Sort"prtc.--"+c.,-. \-'l
ffrPn.rc))
(oP['---.---- -"): \-/
S-6sio1i. evi cr ( pr ) j
V
obr'qa qa = ,.r,,*n-o* 10.d- .u*,r.)
pndld 13>(tD&&)o3; U
z4
,FF'^
{{tK^r, ec(rna.<,ctau, 331 y.
("'n("fnr. ..- ' + pl,94$i(())..
\J
qFt {r./- ,rrtr^, . i(} (tnd,,{r '!r(4, \r't )
rql)'nn!.cvi<+ (fr)_
\J
a
l-
Up,iore Opetc,lco '
---+ In btbernarc, dh dojelt (ohlch i5 olreadS Srard ih ct Dk'Bc.gq Ccar' 6e QP Aat- 4 -'
in lu;o anorr.che s ,
neAs!@
a*,,+ ,"ao'|
tu '4&'i<
o!,r.h o6e
:; :n. ,:ili:: ".::;-*, tb de'
:
uent ul)
(iii) set nr. \t{lq.s lo the Vrwtrttt ube}' coe ]
Civ) cc,u &pJa'. C ) oF a 6essi.,n colrb ina larwYcrtt J
" ii' B zns $(m
a paf,u* tol're o
2,- ,p ,"uranr tu t4darc 6 frice a( .J
code is ft+rrcd
n
th2 4ruu':ioX aJ
Pro&Lc+ P'--nea
P'"d'tt()i a
n
P seil"oa"'rld la:z)'" J
P ' set?ar',*lxh"(u^)
'' j
'ser2tiz (4cr,o)"
P
/
c
be6'n Muwan on 't L/
'Ta$utl.ro +x-' kllr''rt:'
gssic'n' u7f,arc['n)) O
+\'Commii-); (j
*,e PnG4 fic nodt'+ is 6
r,rk n is ereurcd *en in rhe
ttre atpve cqle DalctBc'se
-
tr'e 3'rt1'-nai"'e
al Lt't'
urdc*cd tr, ' 4000", &rr * n-;_, rr-me fus'*s ?
P'odu* - ralte \J
Pid PrE.e Pr'(c
:,' \:: --aotl
-4- .-l
2
63c -tt^ -:
" --+ -l6e Jft',Abrk alpael i5, ue neecl t et bar\ thc Votutt ak(b &r 5 '2,
o( ttus
(tunr tb ufaar ' r:t a &'t ah't
dsrot aznr k uldd< /4oJ thc Y6LE ul'xJ' ut "a
Aefa,.n vaL'e caiuL<
on rhe pmXram,nx anl &, i? a P'W is nbt lt! 1t'jcn ;ts
udt+<li,, rk DotoK";e ,
I m,oo+-tr
!- Jtr *uo c,4proa.h,
tst .u" ne.d h lrr.d arr Ohjrf @e ,nflr
to upbn kon t!'e
-> ,@hd,
n'
hn|ase an) t1..\ nt an &t )$e eero vaJrxt ro tlte yny'nlet wl';'L '^nn*
1o uf l"r' , 614 in a Jmnm 't on
\-- 9&- I! tat w,n+ td q,i,are $t p;ce o? a pm&'* Ld '' 323' tl"- rlt
\-^
.1;116oin3 Coele is rlr; n rl .
/\,
.- Uh&r o: s(!6rc,r, .3u (P.ar* _<tass 33a\.
D , -)'
_ l,oduq e.(p^a.r)g;
l,r,.,So.-H *, l,r = gesg.n- begl;_h(os<dfi on ( ),
aO
p.*tktte ( toool l
tx. c"m rni 1 11,
rn -lhr +agte b pducf,table
. p;d
pr-rni-- -.@
flS- +ord
Eat -.-
Lq ka.
-
eoJoz/ro13
--+ rolcn ug&ring dn ohjed @hlle toadiog it Rom a &ralao,r e, *re wna;Bctric.ns d.rn g -'
o , ldtt1,
oYr rbe d&l( o?oh ohieci (,irl be Srure,t ast in cache of g""si,,.rt Labe.-t
, I9 $cIt o'.( rb ctnnges in fie slafc c,g an Ohiert 5y6,r d in codte :) aod atrti io
'FoJnrezfida -
0qlabclrc firD lrihffsrt do"r no+ a0r'k an, Pr*h Wr@ti{f\ c;l@ a
.J
iS G.mrttcl '
// fa"otLldorc''l't'tc.
''l/lryr 016'hitsrndl. '*i
irtP't or! . Itl F" DdJe ' c Pg ' )+ t
S.Jslon - aloseq))
&ctt'U . c-tose C ) ) irill
! ' I "
'i, .:q,. .ri .l i')
J
g)d"{*'5lqb!e" , , '
PrurFr'3;
,..
,
l,:
jJi lzi:.i!]. "1
,., *i-t.,:ry ar., rtr.,i. ,r' lrrrvri )f) ) .ti.
.::'i1 ,t lll,y,1i-: t ,. ,. - ,, . .,.Lir:ll 'r.:_i,i,., ,r..
\'./
I
r,)r-, '- ^ -r
" :':t -)ta-j
.( )1r,riiii,- I 1...r
{) Delert Ope.oHan l. -
-) Ue Can DeK_le ar) dfi.tr &m tbe Di&Bo-se o$rg llb.t.dle in rhe Srtocolog
kro (mX5.
crs< '
i &rnD lt-'c ftdaB
Q (,e can deklt a!) ohFl h
i
tDirlD(rr lo4dioS
+ oh;re da.trng a., Ohje(f ln *ns appmab ur m need tu asst6q at4 orhel
ValurS an 0hjeli erc$ il, Wa:x -lht 'n.x daexl an odw %n &nbo-n
bJ chcdda5 & *. ra.
+o &ldc or prod"* ohose ld ia aa3 fforn tl't De|oiqJe' \-/
fot excLaPle , ap t u t-oc..*
-7
$ toirlro* lod,ng it &m the Dc.iz'B a se tI'ru tht t'uo-In3 dt is
ye+'':.J,
i/Foa,-Drt ;'uo
''ttf,o't o9, htll odj'- r'i
i-n"o .['U"*^' tts'x; \i
lrrHic clojs P-a'*]ttr'
{
Ps v m tgrrngtl "{xs)
{ :
Unl=rl't" QnhV"'-n^tl
G?r6"t",r"')
b?' Gt"4n":"tt
"
g$",,',t,.r) 4""'1 -' Con?' b'tlg4-p'r'5t-'l;
6ess-(m 6ran.'^T- = ..foa^ ' oY^Su"r-CS:
F"ar* p = n- P-u'.rc1 ; t
P.serB,a-tJ.l f::a),'
J;.r.',,1"\ +x :srsii.rn!, ,lt;Fa^na*n A)
*ut &le+x (?) j
tx'co.',roitC)l
6esskmL' c/lrl{())
c
-+,tt6,l . albt.() )
i l : ';''
3 ':."i-i
-' tlr"l
afi,racb -r,:- - aoJAaq
ohii!+ fumrr. i6e"tt i!.goa krJ Cd -
--t JD itus afi'rdcl) , oe need ,lp'"1lA*dT ;r@n ;'ji i I
$e.1 re ncea \o..,_,
&fqo rhe le.& d
,l_
Ii
o: Ee+Sr''-*r{ fr"no*r-;!r*!1e31); .
. QUief,, r'r:rryr '3.J 1rr. ,;i r/ rfilJ ,1
0 souet ) ,*Ha'L
O "J
(! qr"hr. t ) r
e) Nbrrv so ,,
(t delk( ) @ cvr.to.
J
@ toc^a t .1
.)
:
J
Ve.SIcnlng on Ohi:rr:
-/
-> In Hib.rnale, co. h.r,e c^ ftau.e tbor hit ' nort 6br.4, version oF an ohjesl Ina -
io i&nnq lr,
0cdc$Gse lr'-ble Colrrmn, no.o t,neg Crn ob; elr ;6 .J
(Jdatcd, sincc from ito crrrafidn ,
"orrg
\_./
'-, L*x,rl oo o\ieaf ls rdly inrertcd into rhe bfctgare ttxJn it w,Gt c.,n nuwbta 1" -
inernd 96 (tul1A \-/
? , ,+". iba &kr is q&rcd $co thBnnorc o&ttrajl
inrT.rncffs tg ' t, , *,.l 5t rres ttd in D:roriqv
L
it 5 vcn;io'4 varaido r,rLrtli4
ma'ny noofl tnne5
- 85 rto&ng the wtston c,( on oliger
,.o. c.q $.,i th6i' hau :
!-
ihe Ohl&r is u{ddd sof,tr.. L
'$ gtr \,Jb6iooiog fedt.re a ttoo
-> Rn- 141 6166 ohier tt,n *re Srrocoir8 a
Chonffs Ort rtlO.td ;n a(t Oq|,ctb!1t(/. 1, O
O in poro cloJ8, or necd to crorc c.n lorcgen vc,!.i4ble and oc neea lo F"e*x
appprk Fesedoro and qett<r rv+!rd,t ,
'
> toitlt
In rmlO;og gl I cne Reed +o G1figun 6. tafl caued Lllettior'>
a-
Vers;crr Vorrto-ble oqd Vcr5ron Coluro\ Urd in a tqlo clc,r onl fubGaJ(
Jrrblr rufnA*!.
r% ho
-> 'W 1llc,s',oo 2 +.!q rr1ot b t6 i ""6lc.n-! crf+ti L\ a>
3or\ft6t
nnapiS {.t".
-> tD Ofi,tj *Js Vers".r. r,-og ft"ntn .g }rrbr^rlore t rbe PrDdrd ohjecrs rtery, Lt: Deed fo
rBFe rbe clnn6es in @r,q,ts " iavc. anl ' bLm'xrol 1;pq 7hs $tto''ln3
PYodllcf
Zl-- Prdrt bLIn x'n] - -)
// fxli,uc . jcLvc\
zblbtrDot( -fiEoPl% z
F.b$c . t^s P.d,,* Zc-laSS naroe = Pna-*" "
'la'lt'le = Prodl '+-krbte;
{ zia rnme --" l-tDdlralld " colt f6o = "Pid " z
pnrcl}( ioi FEdl('Id i z
zg&dtow ckt:s ='arsbqi'l
fj(tv('lc Stttq P'a.*N^rne :
' Ll;d>
Fitcllt double 0o,ce)
* *Zv e-tti
i 'co
t,.-n ="v"', -
''d " I t
on narne=" v
)r* rn\,d}( Jru v; "Po4Yrf
:
LllD|.Yr.\
'
nq.nf =" DaDdrraName' colqrft
|-
lfters re13rl-" rdi '
t+aPft! rwrr p,tc/' o1u-.,=" Nrc " I ,
$dt4 ="
] ..llcliJE>
4 Li U".t"f - rflalpht Z
Prod{4}- fabt8
Pid ?oaYOe pr,Ce Ve,r-l I iig1t'lbltrr'lRi k(
+rrh"r a nao frDd4f 5 inlritd i
ll 6o,Y 3N lt V''6lon
qod) ! --: ohcqert'r - r,rodd 15 r,?Jaf'{ ;t6 .-
t bt irtroe'r?
nun$w ,P''r
-Ti'ne6tamp
Per,.r..re 4 ]-{itcrrr,rc:-
zid> +xU
Appe
'------'> ftqifl}rBr'' :
lrrJ ------J &vaPrDJed
sirP-tr'"- cticl on Fte rrrnu --------+
\-J
Fnlsb
6l l4|3lde- lD tlt's viao W
ste-fl:- t Pa*"5s ElPlor
el vl&r i5 ditfio{ed
Bg &k^r t 'o t( Frro -
\ c"a @k ot't-:"
- lD NaviScrfa/ I u.,r rd
br.i fo,a".r it in"iisidc ' 50 ehr'r8e
-\'/
Tan*, ,.'^, f',' .-,
-----+ Narjtfid
--" gh6tol'\cJ'
ctcr4 on tdirtdo@ rn'fll -- --
-)
a-
Dtver lernp)c*c grcac (ntn or;vc' )
r+ O A.! na.yne of cla5 nc'rrr
; | ilu D';,"'r /
'
[ttver ry-a |
Covnaotoo ucl
u6ernome ; &DLb
Ibscor" d ; liqo{
L)rNf,IAes
0:\oEd c\raf! \irbz\ lrb\
Oldbck rjdt
Orivcl CIQSS nafne ', Or6de " jdbc . drNar. Orarf e Drt Ve,l
cl4s5
P.o* [3oa-tl- no I
6leP-13:- Qigf* clct on pyqief oa,1e
-'2
oe\n "
-=>
--) Fr'ni5\
it o16 'hiuernr,re *l
lmPt
i.port otg. hrsa.r*r. cPX'*;
fibli c cl45{t 6ua.'"1t- t
t
*,. ,st!t1c voie ,,6. fStot5t: ct'5;
t
._
C-Bg",*.t cioliP =neln C*er3"*,r-Cl;
GnI'con9iS t YcC) i
e,serEneoo (rur);
e.s*Vw,n. Cn"u ");
e-6e+&^l t60@),
e- erDqtoo ( to1;
-TionJor-rr on lt -- b **\cn'
Add E{itrool
tJ tlcniinr 6}d-n :_
!
objtt i5 &dFd &t a Paro clc66 fuo $at oEie{' ctitt be in o
-';" ^ ",-
-Trc,noienr eherc'
Sest:o" oP h'bernorc.
Tr'ansienr Sf.rrc ohjdcr i5 nor le{'rtlcnjing o rar4 an un&( tine &r.Bo&
-y A
IP u'e rrnt4 onX clnrrys on ibe Dara cf- a Tranaizr+ ohj.-d-. rttcn *rrs d.ooger
-- -
oYe ml ePftck^d on
ttre Dra&,re.
ES- P'a'nt P=nct P'arr<r Ll; Producl p=eq11 ;
P. arPodr,6J6 ( 1q11;
'---f,"tt "p " if io 'Iiansicr* etcr<
P s.+QoC.,a,M'r ( ,'nc.n; ,, l.
p.serPc.ro-p....
(aooct;'
't,
bere "P'' i5 in
-> Tr.,oste 6ilr,
- @ P*'rr.* s,.*,-
--+ oltn a &ve Opercdl<ro it doh Ob a lionatcnt 6folc ohf(} (ov) 6hen a
lmd opratron is dq-r on a Tlan5i.ru 6rale obtrt ttrn the Ohie{r c'itl
be
E_g_fu-
E{D'-
Prcdrc p= ocr.r-, P'oa"oll ; Pro&.* P=oc. rt ;
p. setP,,,a-crla 1,,, 1 ; -- tlcne ' P' )s io Traostaru ttqr<
P" tul?0a..&Na-c[" esc'' ) ; fla;e+ O = 5ersror, .
g* (P,oarur cf ors,l, ,
" )
p- etPncefqoool; p= (f'a".t) o",
-+ be.e 'p' is in -Tfur6tq$ Elalr
+ hr,e "P" i5 ;o &n6ld<'/ 6h31-.
Trc,n:c.cnc,o tx sestt- - k6:Jiolr@no4( ) l
=
8erston.6o,.re [P),'
rP'
*t t)c'. ;s in Per6Jsl(nf shoF
gt"r:- r/
(9 Drrrl'ed
i5 eric.r &,"n tl,e sa"tL- tbcq an ohi*r to Ca.\vcnneA fu^"t y"nl"ttnt "o*u
inru Dmrkd statt'
be J
hlh.o an Obre* 1-.., it' o$arj mer$ uel$ o' sesat'n *t"r ib t'oirt
-)
edered inlo Dercchad ato+e'
,-+ peio*rcd 6koL id c\ grzt1 6herr orr o1y.1t i5 &xffntn I drJ 4 a be5t"cn J
ard -Tianst c,u Strr-te is 61 sw{ Vpu{e a*cnng inro a
&rsld'l '
Es:O
( )j
tri@ p.o,.r+ ?="*'rr)
Hoatct P=,e- l'/"d"q "p* is io +tc,nsl]* atak
--"5 i*,4
P s&Pod'cld t'rr) i u,,;.'
) Ohie.r o-- 6esr)ca. Aet (P.a..,t, cror s, --,)
P *.P.t ., N*'a I
rec
P= [P'ouct) o;
?-6tt$'re (4ooo1 :
-> k"t ' p' ts in -translcru 6Krk ---r lt'.t "p" is io P,(l6lmt e kJ.k
Sasstlr'cl&'rC ) j
---J tre -P" is inerc!-lre d 6t'&-
a- 'lrar5qa66n
tx = &a6bo. b$olan:c!fiqr)c )i
&l6ion . sal,/r Cp) ,.
SovCl
toodL) @l'tc) deKlct )
g*c) a{eGuPdore C )
v!clt) @4r<C )
c\corf ) rrlcY9ac )
CtoscC) &rveOt t-tP&rcL )
bcx r.rate
NOIE:' ts y.l aliaahed tb A Ses5i."l oP hi
TrdnStcnt $tatc i5 on Obi.* obtcb oot
// 5tr-l<6 c licn'i'ia\,a
Clois StreoCtitt"t
J
t
&*,.^
P*., P--ne^ ft4"6-1 ;, ffv ;t i, trctr6l (nl 6rqlc
P,serRd.,arr ( r'rY
0 uPoa,.a N".'c ('r.cc')1
P,serP'rce ( +*o);
-{L"sacro.'
= 95gi..r. hr$Dlrcnsodl6n( );
.fx
tx {6mmit () j
6{,53lon . ( lO5( );
ftcro1 . ctoseC lf
t .,
3
f$,L LJhrte &.rcrtingo &r"o,"a oq;.rr iDro fla5i6rcnf $are, in 'he cotrt" op & o*att \'--/
iP orrea{ on O$crr i5 slel trlth tbe same fa (iacnr;(+e") vords rt'en |4'e,d<C'
rrrrbod &-ijls tb r.'nv<{t qq 95ie* ft66 dfcrAd Stalc iotr, ur6J6t<i-f 't) P
\J
5o, lhtrrrqcLp fi'"d, t
Instrod of t+darc rnchrcl t ) thon LUr116*. onl:l C"p;es the
i? cn cag rrrrje \,
.l
toim
6r4ft ( hpn1es (vott cs) 4 det oh.d oer. Ohfd inlo an eQia, in-#rt anc}e
tbt &rne Tde"! firr vdlue ( rd utr.) orrd tlpn tk chontrel ."e updo'eJ t"
$1 Dbf&ur bhr., rht lonradbq i5 Gr,.;drrct, .-J
Cl&5 i U$rrdterq
-i e
PevrfSrrqoqsrl) : l
- t ^ -,^-.^-.^-,*,r.bo6St*;t,.,p"ro'xL);
roneg(r''c-cl
G"s6"orronLr'
\r 6*s^F".'t1 ftcrag =rru:
$r","o sqlr-'f= fucto'U'o1tn***tt:
Poa.,t
t 6es'ont. closC )i -,
tx, CoiDmitc )j
&!5tcne'doscL)j
{<ruj . ooscc)j
L
J
colntugirc -id :-
-.r IP o DaJagase ta.ble IQs rnre*ran One t"j-o.I k.5 colomo fpn tohile co;6n3
roo{t'lf5 PiE oP [tiU..or", ingrt-ad of usio g Zid> *,g , .oc oted 16 csc
(coropo5lyg
-;a, kt.
-> ulure c6,;r,'r, rtra rnc4prrX Bre oP Lib.",orc, i b i 5 rl,e rrx.nAor<1 ** e;tl'<'t <id > ict \-/
ct (eo,.,pocre - la > -he6 rousr k. a" B6u.ed \-'l
Nl." a {'Ua }ol q Si"nlt f;r"o*1 kcX (ar) no prloor, k1e 1b<,n tx n<<J fo J
6AW Lia> ta6in rn4plnS $Le. tl ,,n*lr,n one F'no,d l=6s in +-ble r!a" '-t
1& t6 rr reY-'rd ' \-/
Po6iJe-ta"
r-,
Q1,n :-
Z&nPosllc - iJ >
t'att --'Voorolle r'o"e' cblut,"b='frdac'/i 4 aelr*a<-'f 7 !-/
zvcX'?'bq
L\- t rDt'.\ aa.rne=' Vcularle mme" colcras =' ?rt^X\ ab'nnw'6;- '
rla""p6t n -id 2
8,5 - o1-arjts
: -> ro 16. $t,o.i.rg aa.ntle, r,,e a'e Aoln b skrr and lma boor' clas& o{ie'ts-
4c"e isbn Nomk'{ t* Lt' or ft',",ogkc3': ' ; 'x'a''t*$
io a Datcgate. $orrd 4
;n &arrBase, roe a"t' U* o*
*-3*
- --r rhe li.Dc
At og sd.,i% an ouert
ab
-: ;5
a Bcut<, tr oYe Pasiog bcue;a
( rsun N +d*'1
- +ime o? loadrog
&,r g*lo'l lood (-' -) 't'4ho<ls '
book.hbrn' l?f'\'
b;u'mrc'4'x'at
Soovlo6crt'jala
&orStrt'r'iova
+ ' closg
llBau|nvo-
io'&'iouzolcle
Fdcic cl &s5 Boou imehtoenii 'hva-
Serttrs { g*ttr"s
t
J
J
t ))
B-* b=rr'r Bcov
\,
I'cr&orfJ();
! 'eiltYN^'"a(do'ia'); :
b's<*B,'t" [ao'o)i
uttl \
t' tttLu"N"*r Oo
u0"' ' Cf ; '
-li,.t"O - t^r = Ses3lm' l.rri-iia^sa"ltotr J
serr4on.
so!cL5) i !-.,
ittfr fi lubtno"
q il;
imv* of \ttt"P,"' :
(rass l4orbet4-
f$b\lc \r
f
nt, "
n'. fsu'5li c^"ls) \-/
-'X'*u'Lau$u"'E'uraP
*tJ"'o -+-,n= *- C-ur'looL)'cqnfr ' :: J
,9-.^ t*^= -&'t"tr'q^9**-Cl'l \*)
ioox D,ncl;
L--lt ,
' b.serBoorad Lr) i
L . ar.!u', No-ut C
ro l t
)j
Eoop br = [8-r)s..*-' 6*(8""f :
tl"":r
P;- r'6 &^]a.tr:'r'. B,"
"'- -" t ffi**
S.o.t C' Bo,rNa'.='
tur'6ut&eN.a';ti )l- 15I*;T.ll* i:f;""*
!o P(" g,rce= " + br'5ak'et>); .
' e*ar"'
<^* nPle ; *ra
*ris
$ris , b""-:
- fr4
exccufinS
-, &ftrc?_ eracd'kro3
*''::;(5),
, . . ,,, r*'"'*-
(bia ,*.ryr 6o1 i'bn))ij
, boo*
.ra.,ne -itifu ,t't
boor.-ide6 (5)'
't.a
Fi(b,d'
' 1 5;4, isbn)J
\,, -
SorL) ..ttr< nur'|Lo{ P*ne'5
IlyrGrB
l6Lr'
o^.t-*t*tt'l '
tloK-rr/'v \
FPlYrnaR: irfftt into
ic.va BooPSaart
>
d '
fl,E'mrc '. e)ctr b6YA ' 'bt
Boormvna =
3db
1x\rc ? &'o
Grnerot*s io l-hU.'.nre
"iaiorqe
&e<tre S|.,rirrg on ohjco 'n a Ft<(ase, l"tr;'r,t:' .et$c5 uE"*rr an RT
O oss',g"ed
0 irrr...cnr \--,
o &lfren cc
/-o Idcn*l \
0 [.,r ro
o frr$ ve
@ {-.rg n
@ ossitned '.-
--t It,e ciPol-llt geoeroror clo55 io HiL?tndre i5 'as5i{ned "
--> t? gerrr4jd clasb is asrigrE 'l lhcn hitctrnrc ;f ern<;c5 rtn id value ?<,t
an &.ia(t Roor a p-gta-na , \rPl'c dn Obe(} i.5 doirtg tD be Sol{d in rhc
*n&se.
a,
-+ Jn&,L 4 ossijnad Scoeraht/ ib is na erao&tcny fo aCJ SancYoivt crl rhc Ao ht
lld> t LX
-> -IW| anAcpc-)t* ft YDcons ;5 a28ng5 (ass;9"'ea )
ossilr,ed ?.'r,etat E or.)
i6, DonEase
dng DataBase.
tlil>
Lot)
Zid namc.'Ptdcrjd ' o,lun ="
p;a- I>
@ incwroent:-
a
rfro L;uc'narc 43gs
R'tn"lq
-> TP neocrotot claba i5 added a6 ;ncrcrncaf
value ancl f n
as sl gneCs
Ccrle d rrnx(Jd) +-!-. dnd Oeneralcs dn id
i5 l-6 Sc(f'( '{r'
lfu's { Jd va lcre ihe nero Ob;*, bePorc iL SoirT
Ohircr in Dot-u6ase .
ry /id m.c="PrDd,cit1,-
#:;.1i,'
lqcnd ai(i Cla<r
saer anJ
oeralloo, [lhvnare i5 going ]0 ooeY.]L a
o, *"tl)t * $6ve
Insert CorrrnandJ
('1,3'! )
;:l:', :::, :"'::lilru,P'd)v4,/c5
- @
"q'ry'.- valoe oP a'
6eled5 ne^t
1P genetd.E{ Clo65 i5 Seryrerre ten hibott'a-rc
vdrre oS an id
and 0s5ltn5 trlr
wenL( &om the &r4cia5c
iq lhe OeE qrrse
frr r\e o51e.t 6tta .t{rto itf*
.
Oble* cli\r be 6ar,red
&apcr,aa, @e n(ca ta pa:g a FtdtM
(,bile @nPigu'i og thi s xd'frar<r{ class -
Cc^Ued 6q^r oce' critb the rgneoce oc.ro.r Cafcd in Oera8ase aJ (llggl ''
.!-
.IP a &ql,..otc rllrrre i6 r'Dr Porsed d a Wamercx nrn 5'6rrn6a 6t-a,l4
ylxt Vola!-
ibsot.tn *4j3.\ce CdtLe l);&"nat< -kry'ence o.,J &lerf6
anJ c6sBn6 ib c,s on"id" te4'rc on Ohf'r i< 6olni to '<o''c
4tb. Koyence
in a DanBast '
-Thig qAente Benerctcr i5 OoraBose deg'tdent ' &6 g"oale , ft L,$vs P,'t
Vgt:'
" "z
;fnDd'ttad 6pluon ="Pid
/id mrne
l7
LXat{ll-ax clas5 --- 6"+1l..'!9"
l-.)
t)\az
@hile &!.c an OQjerr (Fd!,4 Ohj ) rn a D.tc.ects-, {h:b,roalc is BotnS rb
E5?-':
:: ge
#erce lnctlrrffLr 4b)
56r> Creot-L ztrAfutL
mJ -
0 toute
@ col,t .)
*Pn
Ql rrox - ro
toirh hlro ttnero}(,{
o\drq
fP toe t conAgure rte abore
dono 3 garcrrff-tct5
&5
ft,, rlc
paramerevS
hi berryrhe iarlJ de9o.rt' vreuer
tale * hlk{n*< - unl$le - F!3
Col(lmn ------) ntnt - hi
mr-ro 5??6? g rhi"ia';.rrl
-) then c'Pcr 6"'nerort
' : :. i',
ottrn ptst ri."c hiro 8cnefiatct i5 aetllat
oB libetaok -oh\Ae +9
liberrrcte 61o,.3 G vor..e 'c in hext -hi column
tble' the
for' 66e rtrn 16 6o1u'lc*ca
arhcn hn, 3e.,crat i5 ereurr<d 'ot
'rd
*pn iffremLfti5 ihe vatut 4 rr"e-hi
nexb id li *'n9 $e fr, rnuta ond
Vag co[,.-n bN "e'. i'e. ne*-hid$Xl,rt betorrr's
'a'-
'3' lnron-rto5 rhan h;Ue'qqJt
IP coe O,nff5arc tbe aborre atr)6idc/.6 PrDra,mrDey
ttg" prodqctld roitt 5e a56i9ned at, " i" . APttr grrtrorrg rbe d; bi l.tnct
x j
SUtL+ PrDm r"u - ta'ble
bxb
a
@ r*nntg:-
i5 @.,senH.q o4fd lrxfcrDeff (olurr,D CB
'lbi S fdetHB ?.oercI(r{ usd
P.n oiart".
6no 7
E9i zid n&me="6l.,Jenrnc co\uttr:='
c)oa6 = iScr*i 15- lz
Lq'ncrclr(rl
Llid>
(O ,ottu.,-
fa qn J one 4 &lot"inq
c{ nql, g'rrdfd Clcrs6, ftit eqrcr 'he
-+ ihiS gtrxrot(r{ i5 not
3 en.fot(r6. Q r+-teoce
@ rdcnn hJ
(9 t"to 1be
d not" re Uc5 tkrt
i6 slPfnftd b5 neec'se
!{rter Dafe Jst cbal'g }e}!eoLe
-r
nclrive i5 eq/rarto sqA'n'e ' ooriw ls ato4l to lt"'!
raeni. f,p Sd *rn
lP not tbco bikrnrart ckrcr:
rP not rhcn ff'mu3 hurwt ixee [ito.
coluFn = Pid 7
zid oorne ="Po&cJd'
'Iz
clcas --"
mrive
lq.oe\a.raj
/l1d 7
t id vatue o?
ge.etctt rt i-l t-r:ed to c{,S
blur the obierrs thi5 tdrci$n
0uid.ber:
\-/
-+ 'Ih)6 garf,]]ax'. ct155 i5 u5d P* prr'"'X f.X a9 " Atrr. ibpe " in c( hfaga,re tagte-
" \,
UUid skmd6 At univcr6al ljhiyre id,
+ Ouid it an atqrthra ir Benqor< q i""
ulilll. g 6!1r 4 di8,16rb
h,red c,n tbe Srrooin g 4 vc,luzs. U
0 fp aaar.s 4rhe 96rrm,
(0 Sro*.r time og 6Vr1 .,
@ 6gut
- ti-'
6 C"ctrttt \bjurr ln Jvn :' :
J
J
o
U:.;
\]
'-,
e< at;oq eL C(lsFom gen.rdrrJr cla.55 :- es[o\me
clasl is '8'DeK('{r).
lhoerrnre &..-e ,.-t lns pavided Some prtdeBr,cd gLrfiatul
*a exi'sdrr9 lcrrfio't.l' clc'Jsei 4rc wt S''|ft'r)\e
Pzl
rr io's Rr on ohj,errs xe
alSo Latok c\f'\ w t*-'-dekoed t"rY'aloa 'Ia$
Oa q)pli.altan +f o ," 16r'r
t
fl ro9r.
1
3 Px an 1d>
k ConBgu'e'l
a Ger,etonrr das s Ca'r
Jn a rtppiry Frc 4 l-$U.'nac thi s
jc'.Vq
// 1156u''"r- q'"6dlh
.
' !d'"H At'1
lYnft'rl hibcrDafc'
di8 .
)e) se'riorrrbff'fi1
@3.h,bc"oore' ogioe'
iala.(.llit' *i -
Frblic class l'1gG.*roro. lrDdcyhd'Js TienriF ec Gene{aftry
fL
o"*;r;" &;aa r*t, ( &ssron T".d.r'*"aw 6lJ Ohicrj o)
$c.",erarc
i
Ba"d"-
"= 9.- Bo1d.-c) I
rxdb6 \lYt bi lrnc 9"oJ' zar
inr k = T' D.x blntcto) ; tl lt c."n<,1''6 o-ro
aat '-)
o', ll ir i' 1r<carl*" @^*
1ao
Prorct p= [Pra",*)
6ty sn--- p - ges?,d'rtlrlavnt [ )i '11' 6'i een '+@
l+p.. \,
i'rr lo'6rl =st ' ian6.tbtl; t s^et"Nu - '
t'^ed:+
Etullla da],o gl^""' oor u'1"'
\-,
t-/
. t,
t-_7
Servlct @i fi Hibrrr.4f JDt< gtolion :-
a crvlci crn ure JDB. code fb ktF.
--+ Tn $rrlcf fo a k-LtBos CortrdJoicoflitn /
c0)rb a 0rjagc.se,
,.2 an plta. oP JDBC codc) iP@e tLse "fliberrrorc *rn ar' cclr'*dt drotc? r '46
, ao s:{ttq- coir$ $ihrrrrt -Tnft$a}t$n, oe harr r'tr {iu*g : afrrnn oa-ir,s +"/
\o3lc
dorrloprr5 a 86t Et oirh *iuarort frsl5Ko(!
ApD16(b t :- ,,)
-) c\leniopPl*olt64 iq 3e'r;ce 'rrh*\ \J
ctto$1 l+ibelrbF
-t e c4n iq,ssr t the 5rqr R'r
oF a So.r I+.
-> L? Scrvrce C-, -) r.r-rtr,l Conlrrins brrirdinX Euer*S(Ironj *ect rolnn ttre rro'c'l
OI.JY# irrrrasioq rhen rbe no.o? Soti@ *t'"
t,';il;F.I;; *"Lt *,^ r(( !^M<d. rrpr.h bi',.* ._-;5 old- in.!".ejE.l
+ Jt rn.o? G;Er.r-"g o.e rrr.as.d
^,i1,
rtreo h-uaeo on '
lilo({rEft .
Jl onn"tt c
ll ctose
t
3
{
;r(&.r*1,-=,..,,' ';
t &sal'-rll'l<1() "'
rcruY n f*,r."f ;
3
6n5 sa' [mptogee ahi'tji
usiog
e i5 to cua0 of!,Eri
fte Brrocong exampl Pc'P"rm
SeEu' EmPloUce
Emdq.e Srrwd
g-.nor f"ttj
&-,r(,v,
' horif
+L-
fd"rsAl
* '.la$
cmPloJ.t. tlto' lro I
lniberm]l-c.ch. xyn I
IID I
,li.r.th,L-
lj !"lb(irrqlt
n w- '- i Yt1(,lr.d.i,r5
'- -e'v
rn,r.r"rr dr.b.'{ ri,v6 (6er(0iirr l.br.t.ln )
dl.'ao lrrcarc$r|g a l,J.la?r,ticatl or @irt, biberrbft, @. Ded io coa{ lbJD d&ss, m<+pi. 0l</ ..-
&''ftguralton fire { }Herncrre ior. C)ossei :Bd.r Ood -lhc t-rrto cnA dtpc,nd.n-u1
To c0fnore rbe ,hva Bres oF the cttrNre opplictdon, cre need to 5e1 7be Srrct'ri og ')
? jc.r P;res in i",e Cl,rsbpAr* 'J
0 &.rvlet-aPi'ial Hibernoi6'iaY 't
@
-****
Jn
str""r*:eo:r5Hjj:5, conrsu,c.rtcro 'Bte' o"needc 1
T,5?.l
ro 6 oie"'t'-: coi,g9r.,.*;o, Eres oerrcr rnrttide %n"oo"
'
1_^:;;rnpt.
1L rnecror
s;loordd-on-l
ose's ) oJ ned a --- -
S(
ol",rdlloos oo
moldPle &raG '
rrr'tlp 'r '1
10 p6, fum 3el5i cms ond
Pdrsto0fd
r ft[rgf(s
:5431/Posl-oYe{
url : '$bc; pcergre ervl I //lccolhost
t- Dic'tett
diate* i org. biber;are dlole.t Rstg'cSo
t PrD{fams
---------J ?c6rgnc's? I t'3 '-"" ""
' Wl tb $rg'rc$
Sta',
--)
Enld @rsst ord : 016t?r S
t,l&rogcd J
l^ibile obr.rin c\ cDnre$i on u6iDg cr cri\J(Jt
lDilb cr Do-rr,B&Se
t
oslos I etrr:
- e,:- Nhc-t i6 *,e diPP b)lr,) (\ Poo\ ond a cor),e -?
poo 1 ;s
..- Aos:OJn o -rt mc(n5 j'st ohie(i iD rhe
o ohjed-5 ore 44.11 ohjeds
@l
pLpl" Qr olbo call *rs 6ee c ohlecs as
g,(..crtg 6(rrne a5 e lc.6 r o 4iect in rbe
rrec?r4se if) c\
a g'u'p o? 6rclrc fur obiedg
sraltc\est ohieds. 0r- d ccirct e i5
fet : -
o Th\rA palYtb Coone*lon
tts( *)e tsi\l- -in SDoc
omne*16' pco\'onfg fr'r
d 16
!li!.{nofc i5 rro mend(
pn dr(-t{cr., m oci e-
I\Lsnort 6a lt
cc.t$te u:ea f<'r
Testihg $e ottti(4'l1('n s & .
-8,,*'rr, -o
the.t Bibe\ao.b( is veron*nded to 66 crnd on 4rtre tlurd earrrl
Co"6grrarrr'r Br e'
hib'xodfc' f6t'nr}rot '
qrorcrrt orr ' ftoYide'{ -claJs!
> 016 '
@
Dnxoo \ cuirELrtdn Poo\ : -
I
t d
is 0160 dlo ofloocdce rhir [rrrt''t
61v'ipcftcnPoo '
-ihi5 pro{oo \ G.r-eLH (In Q()o
\--l'
B te
it \s drsv; bcrk<.d
okrng oi rb \ribt'nak \n the fr^m crp ct '1ar
.-Ycr 6i oo 'i <r1
Pmloo\ c'|1\
t olrivorqc{ lhen i
et'J-om4l'l
06bctn *$ 6 PYoxoo\ GmneLlion Oco\
-0 otl'vohe thir lnox mt ConnedJctetn Qoo\ , fhe Btroolt'3 aYe {he 3 cl{'YY e{
o{ird .
rraxdze
rbe Coorrc+lon Wenhe$ aod
O at * a &perarc xrnt Rre oitb "?
be lcLnSodme> ' N'n\
the pcol ' 'T!r'is xr'-)t fiteDome cr'n
sefr.rdlc xr'! I Bte c'totctt
o"d ott'og c'Dirb it Jhe
@ a,nBger. *e P.'re'
pmvi&J clc,J5 6nd o,,o, *""u' in blue*mtc ct-f'' 3t"..n ^
-vc{siao'dc'Y in lhe cLAssPAr}l
@ +a r.:r,r," exe&'Hn3 ) ek Pm^ool
ckesrl t re-1rr-tred
c'n3
xmr Bre &r o p-nt- ib
L3\i\e crr.,l.og ,. sepc.r-rrK
o?t*Xr^ l coo te on{ rrerne
Dto fio". fie xml and the roor elerncnl
rhe loot i5
'i 4nl oa ccn(t
rn frgo I fitnlmtrrq Slze oF
pr0xool c6.\rgch$o
se+ Yfirxsi-zt c'9 rtte tcol'
Sei minsi?eexPlicirlS B,r rrre corrr
,zlPYDxoo r >
/l ic*rtrrI1'\q >
ct3e q Servcy gide CobDetlic.n rloor Co"Bgor.a I rbe 9rvcr adroioja lo]trr ^
fanDing eli.)tl ut)*) In lb &YveY G' oo aPpli cotkrD rqnr)iD 9 ''tt ou+ '+ rl:,e
poo).
Snve{
\J
fbt c\ \-e.d Conne-(ioD r h-tf crrfiq like q yco.( Cqnnd*{ dn 16 qc11- javartog<!
dhcn o ta'/d pvugrarn closs rbt Javcrprngv6."', tl'.o inten"lJS the 'reotonq",t{-o,)
t trl (poo r ccnrne+tir-in) &n t bc.ck t.o lhe p6o ) -,
-' A &rver ctdmiDislo.r-ar O}aTcs b'te fu-rY( e Obj<4 in JDa rqi5h, oP rbe.
j
CccoBgu"re *d-rrbcrrrce
-,@ A 5e-rve( odminiStat(r/
6bje-4f in iNDr' .t.Sirtri '
DoJ'r6'rtrrd
A.' odminl6raH Regi5Fecl (st*"a )
- @
" Bioalqg'l
ttu5 ia qt:o colud
'-- ^-r a^nr&ls arirh rqrst',tr co 3
PYDre'ris and
conn
CE4@ n Java prograra ulrs Jodi
name [r'cA) - Thls i5 olso
ooa.," 116(otrrce o\je* , b5 ujini i tf Jn&
^'
ca{ed LooYq oEt<4loD':
ger Connerrcn )
C
oo \ ct'l[i ng
'--,O((9 A Jovo f"og"tn as\'s Rx o' Crnrnectl
cm &o-
ar)A Bt'rf1 oUtt'it-'S o. Ccrnnedl
rn<rhxrd tm fur<.5o(r. ce oboe*,
tlre poot.
c{drJ obEdns C,rJfuttts.e
Lrdr Rt* tgt"rt3
, hlt " torc ;Di'x
It Case o( hibc,nc.rc
Dafa(SoclYae Odrt "
-',:.-" q .^-", don
Connedon P"o.o tt't Pcol fiYDug b
ood fl{o Ottdi$5 ^: c( lbtrn oe
fq *.15r (oe ned ro rcmo\Je Co"'eufc' Pro6'r
tie$ ctrd iqp\ctcc
hed tb o-tt. c$, f,n4i gruf<rFi<3 in l,;ber nore ' Cgg ' rm I .
' A!\tdbc{LtL -----> JrrCiff(rne
(kg)
o hibe'Dal- conncrHdf)
km!-'
@ fr.itrroote ' irdi'class 1on.*o cl?oD lbe 6erve'i like GrassPisb
S6nrr',/ (.$) r"xblt8(
@ Liuerna-tt'
jndi 'ur t )
0sloafzota
cc"Agai,og"@:-
tt"tt,o*'
3rc?-1:- copy a.idbol4'ilcJ in c1\glqb69i6bva\ $ox$"b\ do"rarne\ dotrn,o -l-\
J
q?=t draar ibe 6tass R-sh sawcr r
bio > aoodlr;n 6b{t-dornaln dorrrrioj-
c:\ gtrressshvz \9lr'sa Rsrr\
Pafedieg
SKP-a:- EDt r rtr rlao-'og A 4ddjli6r'dl
ft4s.or d
UNL
trsel ltotl
ef c\. a. [qo-- ] vutk|n
JIYOLi,adrE:
#
$e-ia: At leef Si d e &lerr JDB0 ReSoorces ----r Ner, ---J Effel
r-\
- ----) oY
&o) lraroe 1 P*l "t"-l ---1
cannetAan pot is exatW cYuie or D"l
, Uiclc-or.,
(
Notg.- p 'lat'\ warbu a-
fioot narn e
----. !r"tb]
\. :]
]tr Porrcurng eramPle is io oblain a Connedr'an &om 4 C,Dffrffr(o] c+ GhssFsb
rr\glc.ssP;shva \ gtc'ssb'b\
r;b) ..
@ jov.^ee'j..r (t(.,t r Jrnsr
, .-...r^ \
lib\ in6k'u \ c0P\i'ofion\ '1
@ ir'4ir",ova i ".r ut*.*''nts \glastgsh\
h" -lir"ndor-rr
No1@ ao afPti..*lon @ &
& r+u'5 erqmp lc refor Page
c:\ Or.qe\ hidd\e ulo\ uscr-Pqi'rB \ &rDa;ng \ blbe'rrnrc -acr'oi a\stantl^icblog;c ' ba1
sP-s:- oteo *f Brdrs1 ood TgPe ibe fullo@irrg Url iD addYess baY
crnso te
bttP: // tocc,tt'ost : roor )
U&ln&mg : HablSicodmin
Pds6arr.{d i i.!o
-+
Nesr -------'
a""' t* $15tlg J
Name; I 9@lme
J
or Nam:
F;Andi I
-l$pe '.
octdbde
-,---r oe)(tt , Oxb ----e En,ttr
[.rE.hdje I)rt'r":
ge Srno:inq co.oealco PtaG''J4
-l
1;,obdse Ndrf, : fili---
Ho6iNome
F{t : 16.!r
g(Drt
ftda0o.sc lxo(oam c.
fYrls .qrd n
-, --)
Ii*b]
\_ _L
Gnejn.o pa5(rooc I Y@:-\
--'--+ Nert ---J B ndm,oSc'ver --- 3 fioiab
s}(psl:- o,,l.* I*, Lfbol'n*)r,/
pool lheo ctrcx do P6lor,e
cl'd. c"'
to 6ei c'4'oo'i3 {t' c^ Con*cttoo
NOIE:' ig $o(t cJc(nt
I --'l gtE \J
rnnarcaf;rg:l- ---)
ooff{l@l -----r 20r'r rhe co+or'nJ
tcl'b r'trqitrx.to Cat4dq: @
fr fie prrviar5 exef.ple, iP coL uJar'l fo use Catnnd'tdn por cff cru$i6 se'luq $6' -
ib lttcrnatc' cfx' lml ftr ) de ozd t6 odd rhe Suocoin5 Trdi r'rDlrn "
oppDc-{'H dn into
iohttit'lnL
@n &"'vcrt *rls
and banch in sr('tdenj ' lben coe
liKe rle for'o<oi''X
q creafing o Frrtr* closS(o() gc6a clcrsS hot" 1t1*r1
Pef6oO
te inlt"ted
--+ b* ptn;ata $" {rtot'in3 3 strcd46ics f6 Yrl'"derrt
-I|Lc.oorc r
drd'a, in Dat"Barc.
J
in cL siog\e fcdde DoJaBose '
c.( st1trcd
coluo n5 4'st gt'wrat'tzt.l 'u
a Doi"Bose iritfe cciltaing
In thiS T5?e 6P biic'rc\ ,
->
djt"bt if.5 and 4n od& ticnq'[
Colttrnn
oltri it6' eolctons +6 Specal-'zeJ
-+ Whre Oo{Uag rrirb d',6 thble fxr elaeS friexar\, tte Degc;mrtaftr c"]1h1 U
a l)olz'8c'se f<tble' \r/
ls rmn adfrrr1 ir'
o'* ^'"'3 Otst* dffi,-", -
irnplcmrntd d oirh
cc"i t lce
-> To.ute pet ct^se bicrar4rl rc]ar.d ro tti##f"#ffi,^"r.-,
e gr'rrgle tablar rbe oltmog
----> f.lhre Crcc/JD3
rb rnt ru\l Omsltain i '
g}:arrd norr be d&\ied
toi
od chtolte Paum.af'
otnd
br6
aO uaLL<e d{+lu i'', Jdble?'ctc's e lttt'rcttX Qt 6tu;og ''ftd"rcotd !-,
Cbta B c'le '
ohleds )h a Snglc ta'de of
c}r4/!e Pc^lfittlt J
che4.e'I5pe
dard l'1pe
6
\ Pqgrrnr
Pid ccllle clrrgqe PTaPe
rolpioS B're, (.e rEed to use Z4&bclass > t'3 Pj' *pp;"3 S''bcl"sses
-t ID bi bclnole
o? rbe hi ra r.t6"
s-&dass
$e can S@role gcoedase ortd
eocb
..- t'taPproaai,: -
Zt -- Pqycrnr ' bbro ^fnt --U
-
Ah-',> J
'ij -..'
clEoe 'tb', 'x'D I U
lh-ro>
lgJ.,ccU.s6
" '36loqP =' ch16 nc '/ z
Atr!fr,{?5 ndrne-- "r1*a5n. U
Lls'tr)c'ss> Lr
zlt''''>
Pagm.'rId
a{noarrf
F.X,.rnrDrt
;r CoraYog roect
cteqre\ ne
-,Jifu,
*'ilut., Ftr,.n-t5
Fg id ofrgrn-t pdore
P, *s a",opL 'ef<'i
GtarrG,aft,X-tnr '
jova
Ptt'b 1 ro a{r" o \)
C tx1..efo..'* ' '1,."v
a
"+
tt^' +1".d*d
JnsertC cnr ' iov
ti o.
p6mtn1l-bbro rol
h;uno*.. cPx . xmt \,
Cxc*c rtr fonu'io ol DulaE \s i- *, cl al&
Kct/ at'xr'n-r nu-ha, (q, t) , t-,,
S6LT crof tab\ p.g,'.,'t< ( ts{;a rurrbrr C5) Pr;ma'5
&'e ) j
Pdd*e
fqL> trql t('la Credil ( t .l nt mLar ( 6) ., cdg|e vc.tru.utto ) )-
-&btc
66L2 Creaft d+.-l."5( ( l-iA hqin[q (s), ch\r' e Vcrd.a > (tD) )i
{o.ble
39r> 5tl(r ]C P"- 1os"."r! ,
sdL) F &Ds ord41- tsak)
l6rt ,r fi"4 d,rle t .rtr _
* Pttrr 6Aett 4 eo'.' Gd'1-t',t tei &om cl*tue-t rtk
s6L7 Serct f{Anrnt6;
PJP ccrYPt PS aHrYfr
F.dID ir"c-m-t P&re
-t
7 50oo
& t,ooo
._-' ,b *u6 rup o? Inbcd tahce rrp{pi , hitei *.rc us<s a S?crro}e trb\e io
-*> rrq rn60p;og *rr op $iucrnorc, .,e oced tD cdn9rdure Zunign -sulclos6?
(anBgmng Jiu* erv C{nr"ot clots Lirarc\.
<6ubclas5
6rrbc1o55
l-ioiod -srAclcrss 2 --i'iasle for
Zuniclo - gu-bclass > ----+ Jd-ble F'r &tf,cloJc
cb{
PagffuId
amcarnt
foSroznl Date
card\Pt c@aeTgre
,4frtqnt'J rnme='Grnclrni'l>
" ttrtt*" =" pdc''te'' I > J
ZflDPIB narDe = P'^{1,'cn-f)ar'"
-plle =" c'd-r - *'tle" )
,.4 r >4tJni6n -a-rbclars = crestcc.rdPasr'crq"
rrtJog
zlunico - s$4rlr5
j 1'J51gz" atr1l41-
l<'bleu >
m - e(rbdar S ndmc ck$le
r rr Y ZLrnl
/-lh-r' >
Hme on DataBrrre
d6 pvwi dad the 'Brtaoing 3 telr'n;'1res &'r pe'(a -t"3
.'---o Ribrrror Framecrtrk
n9:
@ G'n';o
O Nalive 661
t ernplole e
--j emploteefi ::--!- J
dTroo
-) ernprD'eeNarne
Q "*^' -P )
r9; tr
591 fiom CmploUe
tor)
Pto- E-elo6oe " ,.]
-
&o- thtFr6'go*e
r Nhre uging obore Hst gpend, oe can Selelr atl ernPloses
t*S det4i l5 +4
+ermiaoto8g ) iP <"'e lma o'np\e*
0r airne rn b'uenrare -
"our *len ir i5 cAiled .J oq F.rrl oqle+ 4r,"n fie DardB <4e
lm
ure can d[reu tX 5rctt on
L]o'L'pe\ otrl
--? bhile \mding frqr ob;e* , b
{iom kcXtot,a
-)
E$(9;-
Sq/ --) s?leu enomP, s..d &o- emP\otee
I
e *
fqr ---+ .Ere+ @ errdrye eMme, e'emplo6ee $.l
fo- ErtPr'{te
og '
b5 uin.3 thc o}rlr S, RaL cy,et uh;te loadinr3 fte fr'r $ar de{ailo' O
eroplo$ Sorn rt c &*..Bc.se , r.r is co! ei lmdlng 0r'rHal
obPtt{ O
u*u tr lm&ng pc.1$ ar gbje*5, de C6d t $r&r t on \tbl ?uat
uld' :
'Pto." K3.*a '
EO:-
---) set* * Pturn trnpl%ee toktt dcpmo =
ao
31.1
ore 6ele$td ' Jn the abo\t 94c'g, &rr oqjets crq I oc'ded P"rm rhe
"
Ne s*rrr ted \{g'L qtt?'t toi'6 fo' "
kgcocrd
Oara0c.se, so
Ft6:-
d"ptno=
P,oro emptogee obere
?
6?l ------J Sele* errroe, se\
Sal P-- E'''Pltte e ,-
Wheve
t4l s"terr . ernfloyecNt rne , e' e.'ploSee
- ' dcatNumuer =
F m%: qr.lo(r = : pr
6etal ernp\ogee Ncnre, e- coplqp&'l
e' "otN
tiat err6'logee ohid1,,
----) bb u6ing rte o*'.,w Htu 1uend, oe crre. lmdtng 1x'.'
Cgnrz-, ri-
"
6".ts ?rs = Sessi''t) ' t"*tQ*'t C h?l co$mGod ) :
tu call orre r4-rbt Stlo'o;I
nJ c' @ue'g reeetence toe rEed
Agrcr Crnglud '
|-)
\t6 1mp)tmtni<rrl6n ctars5 ohirt
clos6 oe $ue'g frurci fure ' 15 0er.5r-P1 \.)
--r the imPtimer*Ldt(m
\J
lbeve are e t{dii5 o( exeut;og c{ Selec} dP"ctHon oP Hql'
->
!6t,*t r-
Daft,.P'ase J
-) In tbis LeL! 6e aIe 6elc.ltn3 F-rll a\ie(ts PwFl.
tl3lng HaL 7uLI3, iDtal oc;!'J 'j
-2 l.{hirc 6ere4in, Errt ohier6 ffo.n. htc.8o:. 4
f iuematc pcrfu,rr65 the 4r rr.,r,:io?
\'/
&t-
l-libondlc re.rd6 tbe ,oto'a krb\c ond eknzs r6em ib c' Q4{rttser 6qj"t'
t)
eodn ta-,j & Qes.'t+** o"'J ' sroros *re &rr'' io a
poJD ct&ss o5lec/'v
@ Hiucrnore
r.rd 5
in 4 Coll?dlc^l oP 1ee lr'clyl-ia r(Java o'r' 'b'"! - r
'. -
C,^dlfnPle
)i
srssi(m. c"e..rcQueq (" f'u.r
Evnolr:Jee
_-
$uer3 ^d
v { =
&u'<(0 o s
-.' ln rbts (l)ot, .de d-r yeadiog CD{) l{rlding 1r,r ria( oqie4,g Fo- *re Dc'tc'Ba6 e
using Ho't qrc.U.
Mroe r e. e''y'o5ee5u
P'''., F'"ertr* 9
6.,re.g gtX . 6es6i<,o . crorcQtrerX (" s.t.a e'"fnptuUee
erqrolee
Olrkdt l
l^Iob O: -
ohiet-6
--) fo lblS Nc,t, toe & rcqdinS d 5ir8\e pn4"g o? dn Ohje* 6r)
the &''ot''.' g
o t+ibtrEre raols rhe ddrc. Rom +s.lrte a1;d dio.rt6 i. Qesctrr5er,
@ |ltbcrr6}c Snas the pyo(t.irg fb?e usiog ftedrs.r rncrc.derrq and st.'r s
ttre volte o? egll, ran inb rhot parrtcutet Spe e odj&r .
of e Rear[ se|.
@ HiE'nore 6lores the ohie(]_s
. info ,.c+.,coltLd.qo o? tapt- Jc.v<.c^tt. Liet J
@ Emttg , p;5.'n *.
rc.tu'nb ihc C-blie{fl cr\ k.* to Otr jovc. pvo6rc^m ,-)
_
\.
\
.Asr luog :J
f- -'l (9 obu*(
l"'r l'*--\J
la!'-o
I s.'a |
"^-_Q
Jltrott t 11= tist ' iEraf"tC);
Y,llr,re lit ' baeNe-x tcl)
i
"(5i"3) it',
5, ntxtl) i
Sung
5.o e 1sr) )
3 E'l|,plolrce.;qyA
(l'tr{,tflee'bb';:,'xml
h;warc' '?a "tn l
Sarerl-Clrerrf 'iava :
.,(
' clags
nP., 9og, no (! "p" *, S 4lp,,ao.r .
... Non - 6ereu' @rctior)a usiog Ha,L '-
ttloa/rol:
'- + tjbiF H6tL, uJe c'ro P'r f?rm botb 3eiq aDd - &l?q- o[ri'{Jd]D5 6n cr Dafz'Bas
'r.tn
'v
anob* objcl ,, r
,np use \r6ei i {e.r",r
v'e#E
Irsert oPrcdlon
in ^
Ho'L t,le
'
f6ns,,cruing on
l-"'U;
c&ob\o\ tJ bu-tes af
o? H6t , c o*tt rh
.- .- on
u*ure 6ur'onuclns "*."1i-Llrrtert olxra}Mm
* gtrre &utri' m*t be &e{uue'
destln*{cn ohJej cod'
\nd;vi dr^crilX SpecPled in
rhe 0u\'
.
^ ho4 Voni.rb\cs d( q/ialto rh. &)t.. .ws ata d-t6n,Jloa aa$ o*a 6\r< crd .a\ .-t\,
l{t e^orf,lt :-
v
,i
- ,, , c
v
.:,lJ:;..
\-,)
{ ri c
. .., ...;'
,9a!> Ser* CooDr (i) , Ser" LSoI )/ tD&r\ tsol ) FtTr rnp\blee
t]aL: SeE* oonr(r)
. h0q.e&4) , ndr. te.e,nprrye&t) ftorv.
, 5r.nr Ce. jl
r
,,i :,i
(rircrra AeI (s\Di,i
--is ,rr"d ed Dodin3 eoHli 5 (ohi&r5
) Bo'o $e hasoee
cri|rra. Apr i., t+it..i
oP(ratJ:.a) cdn be dooe'. 3t cao't Pc-t F"{ r')
usiog rhi6 cr'ir.'iaAPj, Od$ &l$
- oo Dc'f&l3ose
UPdorc \- delelt oFlai o"r5
nnu rn!.rr ,J uYos!
o\r$ initlf L@) (>
n,_rl.m rrrr_heni s.a
qle4"'!-tne'n! *rr r.od;n3
rJ uss
In r I';Utttnre inKtrn
Crittric.AP ,
- 9lajqclls
@ nceil'to pqss qq!S49q tQ'r
nf,rc.dar-q 0? a fosc\oss ' 60r
|+ib.rrrlc, ds c '
i'e donot PorS dt'b "tlt"u Pardrt)@<{
*,,*,t"'j ;:::::"':*',
n F"'tohiccts(or)turtorarrt
'*o'.''
".OeloBose .
clc'ss) ;
sessian. crcaJc GE'ia CE'oPlo'ee '
Crirerict Cnr:
Li.t .nr. 1;5il;
L-F 08.
'tmpltiXcc
ttt"oroi
- it=tisr- ircrJ t;
---o'
Hh/r( (ib bqJ^/." rt I
' )
t e.ptq" e--fEn'e1u6" ) ir.Nexrt);
I 5.o r (e X6f,xl. tl)
Add,nq cond, hoD ro cnrcYio
"-
& Coodrion f{,( toadr,',3 66p5s theo l,)e odd tD Cyedrc a Crrrendo o$err abd f{eb -
\,
U Ded rD cdd Crikrlon o\icrt m C;rc'tr' Ohiea
ibg tPcr<oce 6-t'3i' l?tx"r"r"'r tr"ttY
--, G*non is ao inrcr&^ca gat qnd .* can
inK'i Pr're' Rest''-al o''s
ctau
-- Rom.r,- s class ',b rbl g&f.d-:!s6 a? Grt'rt- .,
is c lxoo clo66 . '\)
-lhe oll Star{c rrflt'ds anl o{h 6t''"ttc m'FnJ J
Re6h-ichcT,6 closb Cfnl.(d'cr5
ObJcrt j
{eJ&rng o. Gi E i6n
I I - I -t.ricn., and Q:gt';tfit'ns borb acc &- &ttP Ft!"'it',
blt! Udt(n(,' '
ft Ottb iroilo'(itX
Cr:d o,6 ' lo'tern"r"'
&; Ptr- ')
.-_l
E9:o:-
- d'"t **
'rr,u 4,,*,'5 cocle ;s for lbadinS nriH.5 of E'phtt prto clt'J 3
'
j
a leltc'r '3, GttcliG'
CantainS
'rsin5 \ \.--Z
rr"a;: "*"1
G,*'o crrr = 6es6ioolcrarcGo;'(E ;.,.' i :
l'!-
G;r.,i*cofd;flon--K(sboo.\5.irlxe(.'e.el"5.eM-e,t'sl.),'
\-'
crii (onarnon;.,'
.ad d
)
L;sr IiSf -- c'jt ' list L);
\'
Itttcrrrr it-- L'5t' iKraLt(l);
!/,
cr ]u i s
llrraBase coing Gircri '
) f'*o- 61
--r h$le lmdrg Otfaa Run o ft,t Bc.se (6ins critcric!, ib is Pc66ible +"
a
lmoinX , in"r."a oP O'"t'Plte-r Orltnn &o-
fr,u oUPrrs
otird \,
Dokrqllsc th.is is cdued lmdin6 gom"l
-
*c &troa"X 6st+s
ir'votve 5
--- Payriol CtaJdS a6in? CriEna
Lt
^d;ng
oa1* %tt och PtoF n
O cr.or. a Rq,e*lon
@ set&de4List lo cri
rc{ic(
$e Cri Eri o. '
tfe need c'u
ro li6r [) ft'r exer-rin3
l
0n *'A'*ilo't' ro fl1C,rert'lf
Ar *re hmt o? l trrollnS rtgr 'ollerd ' (o( need tbPtcos!
!-l
oo
inro (Jhicd-t l'
.ft1e
ftrroornS ^crroP le
is Rrr Loc.dlog tc,ro prDfe;ffes op
Cde
Afm fi orn the DoFg'c{se qtin$ G icri q
v:
\.-/ (trrtic,. crir -- &sslon ' ."-,,. $*ttr o ( Eoplo5ce'cnss)i
\v /lsitp -1
v ");
Prok*.^ p, = Pqi&ri""s ' p-F"T (" errployee N'.me
""
&qi..rr
- // s'.et r
L-ist( ) j
' ftryut6 Li" r
Plisr: Rqieu{6os' frniedi6'-'
\J ddd fB)i
P\i6r'
Plist' add (F!)j
-
lSr,pg
crit' sfP'qied <n ( Plist)i
iinaff' ) j
\- Ilt{'rof ;t -- liit '
t it'hos No'tt )
)
Nhre
.t
' L
66ar rotol1 = (ohF"t]) ih'nt^tt);
S o'r (uolo1+
' " +rocol'l) j
CnEr.t'& '
o$$"goJt R rxl*,0 oes,.rf tr5in$
q
Fbdlr'' otg'tore rn*uog bd lirc
yes(-rlis i5
sum oP Sotasri ,coon* o$
66srl 3
d'Lt" i5 c4',ed
*** d-o h'
:-.-, 6 \uze orncunt 're
;.il--*-"
oPP\iog FiooBco ted'niq/te
i..' .'tl rtti
ne i.oo
a *t"td fu Qati'oJl.n
o \ rb
'!' rrao.t"'
1[," %rroro ing 6'" rbe ir.oo rne'ooq
rnertrod
on,.ras rotad
-----o ft stc'tr o ., ,
Proro \61 reaodd
ir.$
"..":: , , *Et .ean as 16,o.l hcz l-lex rrqrt
srr tr (to) a
r) eerFrt tf?esrt ,'u,----"
16$ 6rtn a ".
to
; 2) 6erf1&x Qsut ld'o)
-
YE .-G,r."o
L (E-croocc.dcs)',
6e'gld$ ' ctot fu
Gi tc.ia ctit' e'+ 46 "i'a"
E
. 6erFr5rPesotr
(5) I ,"cda t)e Jeturs
og
^c\%ecs
crir
c t' **l1a^Ptst'rcta);
Lis r list ' c{ir'list(); )i
,.- list itcraFdl
lrcratot rL -
-
wn*reIit'bosNarc))
{, .i1 nxtL ) , "*e ,p*E"&te.fuo:
,
Eoplogee LErnpi,$ee o{ N*t"BoO J ;
et EmP\ogeeld
L) t" ' re.gdE,npl%teMme r e q*Dtlr
6on [e
3
arPbCD' '
lrrato5ee'.)Av
a ,efu Po6enn: @
errlolooee 'bbo'xrnl
ceB' xsl
biE'noJe'
Gtrcnr ' i'va
+ ' c\acs
-_ 6:-
4tt stdll a , hdl-rd{r 1f4,o\{ t'
cboor l4g'L ohcn, fte 6((a,rt('
cti( dr'orr1 sctot ogratlou on \oart.
ch.o t, CyietEd4 rdren Ae A(!e','k dXoorntc
Narve Set u
Lllrco fo
chY:se Crirc"iq ;n l-liu.'*r. ?
lo ure G"ru,t''
ihtn ii i5 recornendetr
tx'"rr t-o
no'n -sele* oP'roJtdns
[or) o\m crre
@
qJe ned Na$\re5o'L'
fut excrrhpl:- i
( er... * Pnt'-n emPtogee')
? 655 i on '
5er-Occr! q'Ys "*4st6r-Btueo0
-- qlu ' )lsrL) l
Li5 t
llsr
DB
\ ''51 erbplo8ee
\
I
r---l_ 66pol
H"
II l"'-
t.-
IJ
Rrr aro$,Ple:-
6t'"t L ro* o 0t" ."$'P.');
SoLaue"X qq -- tQs6icn '
"*,"-50'r-
qt.odd Eohj rg I Enplo6ee-.lcss)"
Ltst tisr = 9q ' li6rL) i
Itc'at<i{ . il-- tist' iltrajzrc),'
riltre C t.lDdqN.rtt ))
f
[-ela6.e e= (E"pl"y. );t'""^.t >;
+1 - cororoi tc) ;
E plddet'.lav4
'am ) \-,,
enp\o8.e ' bbm
(J
hibe(rslc'ee6'rt')t
Nd rr Cli'ff' ilr\la
* 'ctarss
i5 g)tp66ible
fo cT tale ot
or bibplnde, tt
Nhire r.Joluog wi$ eirtrr
JiDBc
,]
I
l
(oo.lt5 l
SrrotrinX P'
o
ef td' e-taticit
t
ffiL>. ed g1e.r . in \ U
^..-r.",
Ge6.rc oY reel ace prreduie b$tPro Leoo 'r
'
ernPDo = roo]
s.,r 5al -- .oht DbYt J
1'[. *ro*
5eL>
v l
@,x1
Tus[re4, , \l
ftLtoltc- | I
Prrrcde,"e crfalcd
cd\on i5 &" coll,"t rhe ofs.tP
fll' fte S'lot,ltt'g liberqcK o{Pli
cli.d'J''!'r
* . dass
ll cri r* .&va
imfrc(to5. hib.rnarc' * i !/ir'i'
imps.a oq. hiu'nore ' cP6 ' i
X
Ser:r<,nEcroy Pz,co.6
'r.o' G''e6-*""ct
&Lbyg, oljtfr!$rtl'.( ); U
";'=
on SqS ses(lar'
'
*-*
Ara...j gessr,q. ."* ;;; f{* 11'1)J') i
+t! ' 6ff,ruc8ar I o/ 1-? sc ) i
t"U
. erl".e6"^ ( L'ter,o1',
esslon' 6e6lo-liansac*'xrt
);
, -rcnJ&ot<n tx =
tx . Coo rnlfc )j
ft,sslon ' cloleC) ;
Acra.5. close()i
6'o l( P-tea-'" aetrca" ) )
t
!
*
- Corriog a l"ocr-lcor A?m Hibcr r'a}( :
==-o
ode rtro
u.*on Ro. l+ib.{., e bx
JDBC
- ,-.-l otrhocr* t'rslng
",
$e 4noo;ng 6 condrtr ons '91'ar rd k Sa$rAa.{
- *f)alaBalc
O^ Fln.r-"'ftIil- 7e'utn o
(u\sQl
cryftt)n a)p ot rlt" tadB'
*l (ot) tnust
@ the u's' "*" 6'l.la'td &ti,ies eo'$c+t '
ct
@ -npr k,nro^ ''*t
o't
a4rpbca$
.- + a\ older tu rouse " qt"rX 2- fu '64$pla
-,'r*ola
flm4 {n
#m4 {rt or'' }hunn*
zb-m>
Zcldt6 n tr!a-- tr.'progee table ='emPlodee'' >
\,
LlLlos6>
Lqtkb ?; ?
oo.n =
J
,,^. ^
}bLqAot
kor:logae e h*rr e'dep+NQmbe{ =
2 --". \-,
ft6
zl4rlxtn> !,
t.ti
Ls(l-1l/cY rnme= ?2 \,
o -'s-l 59'L +r(''t '
&leu a P'lm rrnPldEee cohr'r or''1 - \,
4$-W<1> \J
Llh-m> .J
o. - . :a -. L ?rot5 ,rcc need to
exetu (
sq
-5 To er*f,r Norrdlt61- 1z'r5' Cor) '\lared
outctin Quz-5 rtk,"tnt:' h c"*nfl 6ctl0'""a
Ov"n () nafiod "e *sun \J
lrrr.{P"G" \J
\-
.:\''/
J
fte Brra.oing f,oncnon i6 3o
lnB b teft,Y o q C.aY 541 roirb o ser oP Erplo Xe<3
getL> ed xL
661> @xL
/
F.flx"o c,'ealed ,.- to" ned
,ae ro canPi6u'c c. NamdM'ft
HibCtttate '
r"' '"'"" Pom
Qrndrn
--, For <c,rriq rhe obcrve
. _0.,,nrr;oq 4roa;o3 f;;;l
Il,il ':"1]",-n'' "*" *o
'';;r
naw = 9t
L31\'"tde{l, . ., - ,."- !> [o0lor. jovd.
arr(,s " '
;.ax(rtq clc.s5--'EmPlbUee ' 'li'n+ iavq
* o"**
[!-cr eme-io?oc)J #;^5@^
Aqt -y'e*x' f,ittt.'.ptt
fo cd*tr{l
n is use<l {c{
{cr in%rrntrr
ingorrnlr5 tt''t
iat
- '' " 'etl
In rte above ' Zreriu{t" '7
intD pc6o c\&\5
obfd' eolhY,*o
d?
ed,l, r6ur op Q+rtt&i ..-..ore
t c'nvo,.s
-' o thcn the \htlt
/Yeka D7 '-J
' --a 1? ore &Y)o+ Conft6(lYt
\e'
[&$\l5rF into an Orqiedll' i*F*d & tq"f
Stru"lu o& i'
<m oP [rtbg nate 6,e
-2 lh a clicn-i oPPlltort
u-'lll& l5
(r'oBXortd in rhe r.rg';n6 fttc
rht f.-,n"u*',
a tt^5 L'+'" ) ;
d*"3 qf$ ? 616).n- 3<tNarfeJ
inttrFcce
( )
*> Nurr inrcrgoce [<.s ptovrdcd oo AErrcat irfrhod cqlri excidc onJ ar'
PrD$de
^
tho<-'rd imflcmcntaHon e\eclrc( ) Frfifucl bd oTbtn5 &Sc @ae '
',
- \-,
--" Fd{ e^cmpl :
.]
p{,bli c clas5 llghJat irqterrrnJ6 N6{B-
J
a-) rboocoa l?"ttPttc.n
(Cdnret-$dn
' Ouotu vo'd ]drrt
{
" /Jr"l'lo iau'
oae
3 --)
&
are no \tstri cH c'rta tnhren rbc Pocteat -tt5 o"d R^do.{ ..,
hrm thro-'r
L-n)o.1ee. Th;5 PtDced!'1 t'krs empn o bc.s inlxrt fht'-r rer,'r-rS btdrS AS drry+,
r- 6r'm6e
5gL> ed Fritpa
tolu$ ou' "u'n/t)
praedr* bo.*,s - Pb (e,r<, in oumbcr,
Cr4t ct .tq,lacg
n,.,o'x^i (4'
't *o* ") i
bq,f,'E-* "'* ' -*'
f.m co[rn< einprb < eoo i
Selelt SoL int efiQ56l emplo6ee
i9 emp 6ot bei,o.eq 0 aod Sooo theh
bon"s := 5oo;
b6oas : =)5oo i
eod i? l
?n,l'
Pn&d4rc CYeaEd
-
hib.rrr'jc 'c?3 xm\
Crier* 'java /'oass
' ll Cllcot Jova
J it -a + execar-.c )
-Rctq. closzr)l
\,/
1
l
l- r< | or/ r'r
(nirb 6ewlci dn d Hibernc"he Inre6rc(ticn
f\inonon , cLs Po'r-o(-^
te dr"Ploled ot a lm<oserr ,'j
---l N hen *,r"e io a
h''ze dmoaoi oP aal< to i5 j d,:y'exed on
a-f c. timc
.tbcn, i9 arr tbe dora \J
.iee -teJfs'xe 4- a 6tut "1"tz+ I
@oahf
tu rgeat'o$"", @hile
rtaclivrq
J
lbt Duzc
.,
thc brl'<arcr rtrrn on &duset looSes
oP dqJa ot. 6nca, s\odn c'n a btncose''v '
ure nerd dal ded tht - L,zt c,muLr.t o{
obov'
-> :+deu fo 6'{.tcllr ttr
groulem,
de nceJ tD 6\od poXe \ p.Xe 4
dor.. o
dala lnto rnruv)" Ff 6 6nd ^
is - gaSirctioo'-
bmo5e{. -lhib roechahish', &lraI
6.. lin'< it
c.'<- rot disP\a'$ed at
6D
of Jnbr d\\ bc rrp.ils
--: F<r, px,.*plc, \f 316' l r
,rDd51. thL t.]orls orc i;sptaXc J ln o- pabe b5 Ycqe '
1t meo\s Pa$narton
F lcrlr:
rnd)]niSrh.
iogic r :-
is P'r &)ttiab tr3e og
.
rncd. e
to cbecY- 0ffortr{ d tq46t
a t de o@d
--) Xn 6rlltf,
- &'fa' tc( c$r.d fe1eloclcs-,
Ksfttnse rLa'lt}* 0aJaroe
ra&q *'e v6!ae {a
Iq q 6a'rlct,(,oe o<o
- kpoge ..eqluesrcd t5 the cr
to Bna 'cr*
i9[sft'i"]ode" == ry,,r';
o ot o yubte
t@'- on c. ' \']
deEulS in rhe t'nm f
b'reosa
\--/
Qe&'dsPo. Page
* Pc(ter'rt )( *'"'r.c{Of
-)
ior 5i = ou-kr O[ Re3'6sp.Po5e
( E-oro6ee 'cta-ts) I \-/
Grcar. crir I s'i6l6n' c*o-}.C.,i'"ao'
j \J
a.rr, s*f,''5 r Rcsc.rt (si) \-
o P"'-t tp" 0'.s") ) \-
cnt . se*fbL 06..rts io'-u'
U
Li$ li'i= c'it' listt) t
il-"i-aicl'(n [ ); !,
lt ' llst-'
Ittta.roi ''- '"' |
) ' '1 \J
hhle ( it 'tosNc"i( ) , ,r
t'\J :
3\', \-./
l0$lc ai-
ohFlfs ['tcrrae ) a\'nnbJo\e iq $e DarLertse tc6le \-i
-ig* "*r*o? ^
oh,le c!6lf)g Gi tcri a brl nee Pcifryrdis P- R"AfS ""
in biberno-rc ) '
-)
Ogreetd}{ tqrr.r164 'rsu\t .
o( oLierr( lo Oo}afuAe in
---r rn ttrl s lqic,toe ore Strninl Irc rn orJai\a'lo\?
List = &*.list();
)isr
Tf.ratn it -- list'it"df6'()i
if (it'hosMxro )
{
lnr(goY i= ( hrqjca)
it r'exri)'
s ii
touNL"'rbc"OP Qecoa =
iP(g.gelodex > I)
J,,
t ?PoBeindcr =
" * [pgelna.x - r )+ '' >P'v '/e" )
go'1,tio'tn t"<o hoP=srvr
J
iP (po6dnr er zmohbgu.
)
l
D[&]onJ Strucl(rrc '. -
tlcb.xml
w&rnqcNo@ P.0gLPrr*@
'l. rr I ),"t.1
o+ L"do.,r.
) :1 i: c,', .l;,., ,
ibcrffrrciar I
T0 ornpirc flgmlt oo Servler,, are need n 53t *r Buotorog tgl Oq$rq, j"
Crfi65PAr$ O 6edtcl -e+i {a'r
' ., ..! lr
_,i
.lI
a- tn f}lar,are ( Assocor''cr's in Fhkrrr+e )
Qay6666bipa
- 1ba dora in c! DalaBase i5 6tored in rnrlfiple tz'bles crnd rhen &rDe 'reld.}taq
-t
ts a56ioed bl(o rbe [h}( , !gro,,se oe fte 9,*t''3 t<i)o Yccror6'
talya oP[Dinlm u''r loi c^ dodttJ ' 5o, ltte to]\e is 6oto5
rrelid6
-b loor liBe tbe -Bruroio5,.
l+o6Pito.l
*r id e Ti..,<lot
Do.Name Spe.jaLr4aon @ -tprn
Doci d
t-1D L
\ 6r 16
lol lc MD
3
+
5
";+'t{ loe x) z 1"15 aol
7., \6
to> B irtlD
t..l z
3b3
5og
it o'" *k &
reunan blco tt't drtra rbrroee
io ralae tfia d1it:. os use&"t'
'-> lo rh( o-bow, t'x L"
tLs optl ctts)
\,
d*.r- rnPo
\,
dcc; d dorn:me Srno.\!z<'tl (,) &r-i d
Parien* - ioFo
-it'Fo t<r'tte
15
doc-inPo is q talie L.'6) frrosl(x tdl,l
a., d ft*i.t* '\
flcoen-l
in l-liberrl3t
Errnl-c 4,' Pos;sii"g
*,ts tgre 4 Tebj<J da-t'a i'1
-----r Nhilt NclUaS oirh hi
as porr & 6u" c'PP)cortcn
crtofe mutdPte Po* cu4s 6es 'l't\'6
CbfcrBole) Loe
c* 'lhe ftflo clo'sss-
ou.lects
crnd ro{ otsifl\ a ftJott dnshiP Ult,>
frYPi ng in $i
to'nate'
fuoc;c'ricn
&ok?t 15 CJ,uad
of relorto',shrPS blc, ode43.
Hitgnd' &PPatr5 tbe lonon;nX + t'Jf"a
@ r"an6 - n-one
@ rrr.n8 - n -rrr'o9
@ Ohf - to -one
rdalonsL; P
de need tu odd
an acldtttenal pnV-'n..4 4
0 uhile Cleartng q Pffiot l-{]D ctos5,
tu Storc nanl chitd dhje'l-s ;''
crsca
t$Pe 6llc$dq . 'lbi5 crl le(-tlon prDpo{}s 13
----' In *'lt Vend s{ Onc,l Gr.srorrzt velorins4r.t'p , Vendr'r clal s ia a parta 64ay3
P5 v o (sr'iogt 1 ons)
{
@ q fu str=,"- )L'sr'St,();
6et. aa a Cc^) )
(4' oJd frr).;
S$. o.d J (ca)i
b) v s.-rC.^sio*, t Cetr) i
( );
lronSoCH<rn tx = st-!sion bc{lo-lronsdd('r'
sessido . Sc.v ( C{);
I tr , Grnrnir C),
V.t&'J Cu5ionel
vcftlor javq .
Cu.5tDrn<r , iauq
Il l4^Rtt+oto
*. class
ll utsaaqt\.,{ 'Jdv d
1/veoarr. Java puA)a dats Cr$=;r ./
-
imf&ar- ic.Yo'tdtl ,t i {
fxrtl,c cl.d6 V'ndar Prtrta}t in,h cath<'nrr{U;
t P"\alt $-y
J
orr*"a.Parne7
ttu* ,.'t v'ods(ld
p;u"* "
5"r,6 vqla' Mmz; P,raH St'rg ct'rh'ni l\'ld/<Y.'
frt"*. 8* cutt,.l''jn'<)
t j
zt -- V.rdf(.lbtn l'nl -- >
zb-6> ..
" .,- = v..d nr' >
+aue
z4l"ss oorn' --'v(nda
'
zld r'rnr="v(rtlorla cfdt^mo--"
via''lz
narre--" vtrrdorNarne
" ztlumn =''umn'c"
LTNP\
Zs(-t namc:" atrs l*rn " ca"(a.dt =" a"" >
Qtu z
Atlc.t >
zll,-nz
f.lrustait' hb- .rrt,l -- >
/b-t ,>
la'oe ='Cr'stz''c1'z
-or" **t ="C*1o"1'" ' "f
?
ad rn-rr?"ctrsldtr'fad column=*cusHa
4roforS nam =
Llcns' > . .
zlE-m>
l
a
Z!r..,+Plr| ft3('J.\(e="yendo.hLro.xr.rr' /z
zrr4o\n5 ,e*tot --" Cr'shxn&/. hlto 'xt'r r-l2
// fnsg(tclicnr .j..va
imF.n- .b!a- uri { - *,
imf,o{t oE ' bibrn4}' *i
iln?.'!4- ot.hibo,rlo/ ' clt' d'i
Floli. clals Insn'CU'*
'
6
O , u ,"(S*"3t1 aXs)
.t
h(r0
f.'*^4.', a
S.*'-
/pr"tnr $dc*
V-drt v-\<d V..r.L);
v,suVcoJ^u (rtt)
t. s*VtndaNa.rc ("x6H " ) ,
c!,irr I /LhrJ Otlu* - r
ll Oh1il -
Gtw* cr-r'...', Cytrr-n tl j Ct tt.nru,, e1= n* fl,rt *"ra11
cr. su&sar',r, fJ(50t)/ c,' ar Cr.,r"'t.Ir Go>Ji
(r,<o Cqtrrrnov Nr',rr .fr.rfy'J j
f Cr. set G.r-dr''-.r, !nt1 ("tts')i
Cr'scr G rtar,,r,r 4,u* (: +l,r D" J/
Q'tt r,rn un A{a*x 1'Wo')
/l.l"ra oL.)al-3
C.o'* c:=rco C^rrr*,a1i
cr.a. Grn".. fe 16or) ;
. r-,Jl ,l i -!.
qf.lcr!
r !r,..{ir "
* .enq";
_- 4,+nrrrrti I
/laer cJ"ra Oh)t't -h Ja'r-'t'lr'&+
C.t .=* -lLr'9.e1 ;
s. ad 'l ( cr );
6. ad.l Ccr) i
s. ad J cca)J
+6 F,"nr O5,lc+.
)ladJ iava ' u$ t'st-t I riii ,i ,.if.,i, | 1 't: :
.,,! :1: r! )?'! t
Yt0 \,NAME
,*;..;1r6so
ttl l8m
661
5.,3
a-i 6ete(} Ofrercrlon io |o- rr)..nt
- Orf - :-
ikl
- a f)arer* Odecl lS loclded biOe\.r^tr
- Jn onf- lD- m6og relddcro Ship, 6h.o
att
Ordo rmli ca I rl lood B ii6 cbila obicrrs-'ctrso Prom rbe ftd'a6661 .
*-+ Jn earl5 loading, #iktmrc loads tt'e ChitJ Ohj(cfs aloDg @ith rbt peffrt
Oqie* ;--.6;*11. &* io Laztrloa&n8, $r"t -tg ftmn r ohjcrr t.< lmded
\-7 ,r- t"t,-'""/ )
and il.5 chird oqpcts d'.e [ocd. J oo &-ar, d (wt'."
LlKj> * b11la'1t"3
V^rt="a@' -----'
loz6 ='forsc ' car[ ltu& n
5
-=r
ar/o: / :orr
//stt?-! tr1) i
(Ve''dat' clals'
t'undcrr v=(Ve"ao) Ses6ioD' 6er
// 5lQ -z
$ei- s= v' gaCLrs m nrro C ) i
// s*p -s
' 3"r (C*bffler '
cras5/ F3)i
Cusro".' 'c
= (C*"-.., ) aessi-
I srco-*
4s\>
k'*''g 6 valuB
It"t coscade a|*\,"-,,< lnve rlr
'coe
l) None CdeParll t )
2) all
6) ott - dereK -orPbcn
+) 8.''.1e
5) 5r,ve- uecLrre
6) derere
6Wc'Ho% J
Cb^car.te atr'rih'lJe )g
ft hil,etn(ltt atoc* r,lir,.cb Yt6'-*-le<+
ased io )oerxm
ed )) ot' tt'urf-tL;P
ohie?f cf, an Otu<"t
(dFiled (das&'t
S\ruld be itanskred * ., r.-rr ^I"rn< ?]
nilc onlb cosc'&s inst' i oF"c'$ot -t * i--.\l
- L'^LrP't
J* f,roro ihe DalaggSe L
O hoa +t f')c'd ^t ohi.l ,n to ceued! on
v- * c, C
*d o)\ .hJrd "T ,'";n o -Transaanq
O 'Nd
":;;-- a
(tttffi c.ru u"1,_'"
-:
\2
llatto I clals, ur);
(V..,ddr.
scsslao'Ser
{enac,r r1= [Vendor) n
'
It+<p-z
-t
) \,
Zi ' v get 6'stc. neroc)
.6 ltr",wAll( )
lr. rohmlr aJ
- --,-- rp \o.r rv\nt tt 6 Fuznt ot)ett o&7 itt alt ch I d o6i,ar fom $e
'@d!-e
l',e pre"t'cb:e ' liP' #r
-f],'n,,' n,
ft*ak st then ,neneed tt du"n 8i-pl6
0rrTo Han5 ?
\-: tj D'kr'3vq
lt!d..cr. ja! q
\? D{,Jor. bL,n"', [rnl
ftrod.l'ct . llm xrn \
h;h,-ax ' 43 .x o i
,,..* ldc'roian - Ja\io ,
* _ c\ass
/\P&i t:
// gi:arc 'i ov t^ lP,&ard^va
p,bdc cl4rs P"e,,l+
irnftn- \lsra.(rril. *;
Frltic cl.rs3 ft..|.x Ptn&,t+U i
' -.. r..'.Y}lva,e .St*X
!duarc lot decLnJa;
"-'i"'i
3n"3 detarl.la-c; r : :.r.-,,',l...- -.-Fi!cr,9,.;/otAe W14 :
Pn'vafe
, , '..:.j, r1'
e+<'< ! 6a<r
t .r.: i. , ,
:...i \''i.
''1:. nl L,'
'i:':..
1- 1. ,". r
i:') . it'ir:,:.:1
" i":r t
. i rrre:il
:
lle"*'r oalru
D"a^ d-- ne'a Deau Ai
d.wDal<rJ+(ra);
" -);
d. se+DolurNa-e ( '+ac
t/Lhr) }LF+ -3
llcbrd cq)at - r, ttctriAWt -z
pdu+ l'=net' P^a"*tl; Pa* h=nu"fu;t'a
P-d'* Pf'nr'o PlJ'"utrT t) (to'-1,' g .c.P,oa'+tr ( rorl.
n' se* ilad-Gu ( qq ' 7r-, sP,,l"'ot
f, .c'P-d.o-t N^"t {
'}") g .ratP"aur }w".{"2'
7,,sePn4'* Not* (^ i'); (s*o)
*r. r.* f'n'<c [:c'ito)l Q.a*P'1..
1,. suPntt (zt oo) ;
List n Pdr*
ll'o+'' lloaa iatta'at
; set fud,,lrs 1 ti't);
-'liansa,n ,xt t-t -- st:tl<,r,' k1;{T"u^s'*^( l)
gergon.kt\r(e):
f x ' lornmil( )7
is used & rbae 'p'!o unr-List tdco (de consB"\-e zLi6t > lal ln
aur*oq
- ^* "
a rr{piog Bre, rP c't tt'2 *ren oe at6o l.f,ed tu at'B8c(i zlier-i"t6nt .-'
' z\i6t>
dhP'fr,
inde^
rhc clr;ld bblcat 't./t,of ibs
--t .Tn &&{ l'a iolzxrrt ke l'ti&'orc thot staft o,;{,
'
inswt o( ZUsr > tc-A ;n
4
\n a hld&]tc , ac necA +o ef'ltf;nut zbn > tag
'
hiVrron ,qP;n5 1'e' ct'
of z\rcr> B1 'f
&alar . hbm ' xro t F tc , ntttad
i
e:-Ntrnis,ied;[&,-..,."blttosiniacol\criloDc+tgPcJ'*
.la!o- crrit' List
t
tb rcrrd o p'rlicule''r ctr;tl ohtcer
ble
rbt
4E. Jnane oF ixva ' L'ti I ' 6ef/ it i5 P0s5l
*
lsrog col ruion tUpe java.crtil Fc.1,', -
-rnong relollonsh;
.. P tL'r -. ,rg a
o s('r' rD'r"
oP ctntl dxj<tfs
----, vJhile C,rtlr-lio5 One- to
-
)n cJ. p.Yrn-t- clhj.Ll ) (r)e use a le.c,}tdn r"3r'e c4 PnrMt in o- P4rYer1t cLar6
.,_ oDl
'Thcr obu.lr{ 6n tgle cc.n be erhcr a jova util'St* Lox) iava'ari r'List L*)
Java otil- XaP
,-- a IF toe use d colledt cro tgPc o.s iava.trlil'noP thao in nopprng $rt aP
"--> rP col lecrtcn tgne is used &s & rlaP theo., in chtld fubte o? bnsose an
'oddihiorr]. Cdumn ls .tcg""d f.'r aD l+bu{na}e, & st
"i"3 rhe ke6
ossr6',el
-"+ J( Colleclton tgle ia jala,uril-lh{ iheo , colvte 6onfl4*"'n, rhe(ft4 > t'7, c't o"1
h a-A t,". c(n Add; tbn<d ta3 c.tSo inSid e Z rmp I k5 Carea lwtp -t?X>
jouo. un-t . Ser zE, >
jona ' cnrt.List
jrvd ' u-tjl.ma? ZJ:.x'It 7
is
*'}e l2etottoshl
cd-lred P4ler
(4!'led and f'.a-ct.
&aler .(nd '' 4
!!@we Lw kDo fqlo rrorses
',lses
" O
d One t6 - dn3 trDrn &nt,.n to a irtdr-.rt '
a Oeq.K'l
r a't us:o3 14"p" 30" ct c"llel.lncn fu sh;'6 a 6rc"f +
@ fn deole &vo (lass r t,le
pro dr, cts fo a der.len'.
// deot"r. bbm x- t Ji
,-)
Zl oocwPE
l
Zb-ro2
'
6He=" &c-ler >
c
( clots *n g J DsaPr "
Zid na,ne="deoletfd" coluon:'^ did'/> I
'-l
" dlno'ne' lenfrb ="ro' /> t.4
zfrDlr,t rprne=" dec.prMme colu'r'o =1 _i
{h'arde ="anl l' > \,I
@/tW ,rarrs ='lprodlcti' '
zr{{Piog
,/-\rt 6plti n3-
// Iose'tCrir'*'.1..v
".
impo4- jo\re.oat.x;
irnpc,vt Ot,lnt!,r'cl' *)
imror 43. Iu lor.a+e' dX ' r ;
Frlt'c cl..vl l"r.',,l-Cfrt-*
I
P s v m fsr,ing tl t'# )
f
**^tr'+n *^n=
&*s^ sct"c'!:
ll P""* oaY"*
Deov't d- rrs fu.:t.2- c> I
d' s*DeoraT-i (tot;;
d, <+Dalt" Na"ne C *Bc'),;
A il^d &)P'1-?
ll ,*aa oqz' '
t ldd rd o6pt-a
f\o&'at b-,'l.,D
*na-!+I.
_tf: frcose o? Lisr , ue Ctur o'ro; d fie add; Ha.l,tf Ol .rq.a, iP clri.d i,* 4
GmAnu;n6 lful> f"A, &-rr Jroua oY flng , i<ino+ Porsid.a tu aaoid
aA);t1ono! d;luoan in clatl la6le ' I i L:.. .,: -r .. ,. .
i6Pe os L'si and a cotlaol 'ti iSPe
os
$ Si.nilaJirl blco osiog o ou"adon
-> d pcthlat' lcn cb ild{dHjc#-aF 'ffth;}oY(^f, oqtcLl)
t1a? is, it Pslble
15 to dtl4Jh
-- l)
r ^-r'v'ckrsBIllI)
yorcv'cusor,r) i
ho1t^ d =[Derl.r) eserar'qetfr"., ,ir'r . i 1r,,,,.., ir],:,. ,..,.r iri]" ..,1 .. .i
i" r.r7 r, i
^
. t'
.n
...,i\l\ni.,,
mon! - lo -cne
"cP.ttoce
t!'q to
(D ;n chi rd rrnpp;n, B,e, r-o. reed to ConP; gc've lfttaol -]f"oDe>
inP<,rrn fhe hiberocirt r,!^ccrt fte w.laH do shi P .
l/ c.[rttd
llw,,t ll o"tn* ' io.u n
/ \f,rdcr' 'i6v
q
?ublic cta!6 Lrdt'roo/
P(rbll( clos6 Vcrd'r t- Jd '
Yttd-t rru (usftEal
J
tnnu*
int vcndo'rd; t
Lb-a>
zda46 mroe =
"Cr's+anr'r " k*ie= "arst"ttra i .=')
\_2
.|d -- 17
ZP\DW{rA - - l> J
zwffa - - l> - cosde ntt l> :-t
vqrdcr " .,-, ='V*' ,or....:*ri!
LoldtxJ-ra -one
zlcta-s s >
rn-e ='
t-
ttQc,toc 4 ti o
^. ''"," P"t'*
"'l
4h-->
i5 ctdldJ l.o rh Grrfitvr Cqjerrs
veojdr Ohji{'t
lO d- Ctieni ciTpli.4t{or of +bltt*rt c
Cr'et""""- Pqro
cr"{
h catunj *Vc" aor 1 ) wrhod
aP
* c\6s!
ocrr @
_ _,!t" Ese y@-:el qrytttdl
79,ton C*9
H\*
'gr\*
'lqz| " or+rtbc'te oe rtrn! - to - 6ne : -
- - Tp ,lor, t.o,i FC
-
lirzd = &rrsc' *,cn it is Cole d ' eor l$ l@J'n3"' rn fno'6 loar!"i .,
\s tb
\'-, tb is adad tb the c.hld ohFa* ail eNIt rte cL;te c6fr! tiu<r1
- J'Vo WoS'ro,t't
Y5.-t6;t
I\-/ i l\r- ll \s+
Detetc Cfxr^lion 'n roaryd - to - One :-
an excr?lioo ^ \,
td ohicar L- rno'e ch' tdg tbc'r
"o
"*,y,al&i ib6 pore61-
daft3 $e chH dqlea+ and &i'r -f-- the
bibernare
D.tagr,se.
ir (r) ifs
-', -L(
|iuLttuf'r
ft ddeJe *'6 ,h. cln td ohj&+
gtz (a) r/
10
Ittn n&d +o rnarD,\ the Caci:eAe a)+li}ule'
F.tenr Ohje4 cttt'
Ey : r!.r r
Ft ( 0oto"et '
ctc'55)60l);
(Ct,rtot'r' ) essrot' '
Cor*"* c=
\J
c
j.,
;_)
J
or-io- r'ar'g (gr -dir ecri<rn ar)f rnang -Fo -c.n e fbi-drt nH".t3r;
-'-+ 6ne- lo -rrang (Ui-diteoronol) . i5 a corbinaHc'n o( o-re,to -rrranS onJ
manb -io -one,
p4ten-f (]'ra
-> Fat orre-n - rrnrru\,I toe n2ed a collr$6n in g16,26
' P''"t
d cta'<'
ffnnu-ro{rne,.,,e nerd a vePetance bP fntenr is rep red ln
4-}t t
:
&' bi.'dittofi o''c^r'
bll! ven 2ot
,5.- fP crrc t ra.,r ta applV one-fo+r>aY ln
o.nd GrSro-e-.- f$t6 classes theq c,re nezd rhe rr*'it5 clenn+ '
L
.l
3
Vmdrn.bbm 'xm I
zh-rn>
Ll&.!5 rr.rre= 'V<h dq " fu,)rle="wndt't" >
Lid.-- .--l>
l{ttnq'n ... .-.1>
LKI raf,j'\e. drrkrrrr^ 6 it^tlrse = bn.r >
CcrsA^de ="att"
/ua 661&rna =
'^vtnid '/z
lone -to-n a\ da;s ) C^oni I '
Llttt )
\ .klr*1>
) L'!.>
In atn at,'! l{tt-<" ;ir-*= 2nu,.,J
li-diw&to.rc,r.
(i
!)
" olrS
t? ote dnu a/d irossa =tr,raijl r ll*#t a/qet&t&*e J
Jo' a9ilfl L'i -Jire4tqc! ,t4.rfi .cn..6hf.* -:nu t-il.i.lr. ,1"' 1 rttl: 1! !:
'. J
J
.$<t> ll
J
/cws tftrt'---Clrlwnt't" +fi="cttho"- ) o
Z:if, - ':i' :'i i '
j'r r'1;
--r '
- -r 'r
4croas>.
zI)1<.>
:i ,: ,i * ,r.: - 3rrri;.
- l-1i I '_
\ ', ]'i
.R-ldltoDsh;P :
-, manu - lo - foan5 -
t'nns ldlidn6b; Plsra bodr etaes-
rmng - io - rrang -@lolidDb'jP is a oDe -'to- e
ALo nto
darse6 ohlefs ,
----''r to - rna^5
P PoJo
robite OPPIUiD$ rncnS- '"ldrro1ALl
os &)n toYte '
ulled
ar dnrr"bose 6ide, tE ni(td c^ th;rd iaAta a1so,
rsi
'The *ry;ra m aml6 tanT-n4oY "elzurooshP
minirnum no.& +rbre-
,daflo"&tP
--t'@ A Joio lable &.nr.rio5 ha6" LXt oP rrqnt- b - nr'nf
BtzrdnJ C'nd
lztb\es & *nb
F.\q.ooe : - ltf,, pO,ID c!u5e.6 and the
Dcdclbrare
&yrrse "Y<l'!H
c'r'sl''r P ate
trrb\ic aldsS
poblic c1655 S'.,ae'r*
{
1 cd.seld
6tqd.nfld 6;111'seNhrLe
sk d.nt Mrne
&rafion
6hdcnr 6ra
[,m vo-tc Sr cc*oeeo ; {o'rate Qt St d""rs
:
1
a
J 3
eF Skrd n t r @Gf6e
i J_
6id orame GrrP cD4me dutoJilq>
1
' idr-PK :
8rucko+ bb,ftt'rr.r'\'
th- ro> :
-'.
" n*'v -- sa'*Qt"-7
t(to6 r11r''p =" 5t<'*nr
Z,id _ 17
llsu 7
Aal',ss>
zln-$t>
Zb-m> I I,
<id
-- l>
Lprbgrlvr'g l>
- lroirrc"i
( s.r no.ne=u Slrt&,tts" Casaede='Lr.l" 1.{ble = Strrau',ts I
$r tu = rra HllhSet( ):
S&e = n(ro
6ffa.odJCc');
Scra . odd Cc') ;
Sta. ddd Cc3);
t6 one-to -tnoYLb -
*?. aaa tE )i . -,
rb2' add Cr'):
lce.edd C(3,),1..1' -.: a rll*;
-
t rS*'a.'*t Ctca) I
.lle.
,..,
'
I ;f,_ ,.
n'Aq -to-fr)Gnt is mrt"ng k+, arE- rD.ri-ronJ tdafi.9 3h'|
-
Cg..i n .dlrt'la og 6tf-to 4o<a\ .relelcv'a!* r
\-
3t 6ta&nJ joirrd in .cr4cr c4n6< s l. rnonj
q cd!r6( i6 j0ied q s'45- + dn-ra-n\\ Jl-nl-b**
Siado.ri -dne
Cd,'sa . i o\rr
r4+o( F%c @ appt,.cc,lr- no:
Stt denr , bho ' :vo t @
&'rs . bbro' Im t
hiie-orc - 4n. r-t J
I",arrcuqr ' lg\tq
J{ . cl.tts
a.tiRrl:'
56,L> 5el* &"" s|udeff , 6el(* * R'n CsrfS<. )
Lli
@ eaa'.5 an adn'}.iotYl &@rre to ;
-'{rts6
io lie grlsting St.aer,r the'' *e 4'io'rn6
--- T od4 o. neq, cc!Y6
ore re4irited
td"**
6r@-!-'.- Itcrd ite &t 4' Coqcs 6? ke 5t
!r99.-
@ttJe .={#")s.,t'-. 9* ( course. curs , 9or ):
dro d:
gr er-- c gerShde^l-3 ); C
6lrf-B r
5r. ac,t* 5=6.- Sha&nrcl;
5 q$qlr,,Fr ClDoa):
5'(J6tud.u ltr're (",.Y"'' ) l
s(g Srrder|Jogo d S.r.a):
jfq." IrontaLtl.^ li, c$i.,n , t041ran &4tIr,C);
.-
DereXng a Or1t6e P,otr) a itll dn* : -
I L'
r*a ou hc @6ea .bined { a corteoddn oq[-i':'' ' "r '
@
/frc?-r
s= C5rracnr) 685lot'' 8er(6r&daf
' clorg) lcrol )' 'i':"' : '"'-l't'."'i-: r"'
6r,&'.t
llsttP-r 1 r ...).{..r1 ,.,11
fletrt-s
Gr,.,se c- (tiu{to) q*5i^.1 9$ [ Ct'aee' dors'
,,.",1 I rtrj.,: . rrrri
rr'
ll 6KP-k
!r:'
li4nrrl: d.:
ot*ta{) )
' = 5oe#"{'&4fitns
lYi'rlsoirton ''lx :') 'r
_ ".,. *_.:
: :.
a-
*) &)e -io-ooc :-
--t one-ro-oDe oirb Fover'6n ktJ i5 alrr'osr e$!! to o{fiUir)t !t Yrrdt{ -to -ooe ' lr-t-
ii Frrei6n kr3 cott'mn 64- ch; fa tdCe 4to(.ld not alloo &rPttcr're
ibe diepcr.rcc
Vd''I.plc:.:
' rhe Yrro$ onsln'P is
prrn aocl !'rcco!e
Nc lave roo rcro cto*rs arraed
* x"H'
{ Pli"ale
ffi\otr inl ft.scnld ;
Pn\tol(
priv.rh Swing p^<onl.b.oe,' '{).t 1ta
''
Pe*rm
Se*.,s {6ert "r @ prr"ar' Pe'rsoct
! serk* 46tlt"(
\
Pe.son tr .[].en6e
*
r Fv-
t e&rc Purid
Pid Pnarn e
!d iddc
rmt
// p*aoo.
hrbro'
/h-Yr',>
lcl(is' ron'e=" ftrsrf,,'' tl'l = ts(s<rr!
/id __l>
tPPnY - - l>
2rqx&J - - 17 l \/
LlLE|ge
)
J
"
4h-r.,> ' !,)
/h-m> J
<c\456 = Lic4trc ir.*tf -- 41.**"
rFtr)
I onero0'cF I
L+ P.rdn.jala
,x"
Uccnse' i4va
F6oo ' hhro'rrnl
e gqp0!
""q"@.4-k"do*Ql
Ilccoi! ' hbm' lrnl
I huerrrrc' c? ' rq t bcz- &{tn K!3 olumq . /r".l?f .p;-
' J!1!!J'tCu'r* ' Jav4
&{lr.4lc vof[.-l '
* . CtcrlS
-^> 4\
a- 9F pr4rk
Rlsor) (fi6dY'r ) li@o 3 e Cd', rd )
J J
Pid Prar.e &tt eaaj<
E*.*-"1
L-a __ ,___-l
L-> pcrso., .Jova
\-./
liccnse,lc.va
r"k^ p,6e@ cn op"@ + l'a*t@
'tia.nse ' htm
lfnl
. te"{c'n , hbm . rm I
Lj be{'atc' c&, \ th \
Jr.rratC-r ienrlova \J
*-doa
FoFd i!@r iR&fl^J r"n i,]hL'at(
't*tn \^tl i6\'ratt'
Fta,Y,t< .)
fu '
Jo''r 'iablc '|8irl8D lt{P
rbe &5t
ihe FLtD vtll,4s oYe d^jucarcd '
ft,Agn ktS. zo
1if,tuT> tu|'
t$Pc 1r) 1k PaUo c.l-41,1
--, a zidbrrg > ra3 in a nappiog $re' rbe cdlancn
cooF Epre
*
nrxt be List'(,;ava unl'List)
@, ca,"cl* tgpe
Sei cnr$' t"tt'*n t96 Lit''
O rn s&&t* 'ic.vc\, rQkrce
ii{r,* "E\(luril' { i
PllUlc clrrss St"a"'.t \-,
{ t*" idt shrde{, 1d i
6rte -6*"X aL.a'r trh'ne;
Fror Jog cz&Jvcrrp '
) Ft'ta* lsr Gzr'4:
.otr\ L:a|n9> t.g lirc * 8rro"ot.,6
wpte zfu> rcX
-
Clsiahed '
dqi'tt
6\i"t Ut- ncc'd .,liSt
-o ib In e*Clicnt 'Javcr, in ?lo.* & ' 6crj
4".rLier cl ;
iit I
L;"t r,*sr = rE o
tisl-. ad d CQ) i
BY ad A (c>) )
6r' ofcr,'s'e ft;st);
Sx.scGc'rae(i;st);'''-' io borc'8orc
(.e ohitsln rbe $rro<'"rns
a'rgrr
Afre. extr{ttnS rhe }s{ rlenf
' C
sid s4'rr
Crr{tf
B'rlb
6 aaq
rrrA
r'
lool bbb
!g ry"\
qol idlq
r]lralt ('n
t6b
qo> ororle ''100
-'r tx don't $rci ft1 c{ Joio l3r'e rtr.' \ aePo'rt rbe '1oio gle ls TnocrJoto'l
rP
'---a lonet Join 15 on 64i!i Join og 6oL. It mecn6, lte Join 6trr'i 6'reofs "ttl8
tht datc' &um tarole , iP an assossi c'r.a ddra' a(l6t 'r ib '
.,
rbc Br,oring clic/rt of,pn liles oo-tD -rne(t| rebAondnj p blr-o a vcnd<T anJ
.
-1$ usi?Jolr' 5i11r'
d. paffb cr4s5e5. dr,J obtctns tl,c &rz. $orn too -ttrltci
.,. 0rjrDrr./.
f/ Toi''tcst ''!rva
irqn* iava' uttl ' *;
ioPort 016 ' bitcl"oot<' x;
o16 htr"''c'tc ' tfu - *;
ioltort
F.ldic Cttrs 5 &;o'Icgt
{
P6 v r'' [5u"gt] o'gr)
t
li"46 *ttt'"T-x"'n q )
5,..1- f...,5 U*= r-, G-elEuYaH<"t()' &nlnutL> '
S.s.r *ro', = -g-rX.*"fusr.,o () ) r,.r,.--
\'l4h' #,- k .
c'a,.td'r"{ l
B*1 qr1 = scr5ldn ' ('strt't v '*'a"Nm'
"t-*$.,"a c" )"
ioio V'&rJtdrn"{6
Lisr [ =?t ' li5r () ;
-
Iu"o+u it-' l' i"fir',nL> )
. !,lh;rt (it 'basNt^t c l;
f
Ob.i,-t ,,.r, 1=fout 1)it'oe*rcll ..,, ri,
. - '' t'+'(ai
.i
5o g(rooloI+ --. .It r1\,
| rJ'
,,;.,..r.r
-- 1
. Serslsn ' ctos't ))
. {r"t . ctos() i
'3 \
\tn ioia J
$'$ v 'v.ndrNlc,,ne, c. custrr.e,Nlc.rrr f,"'., v lePr o'lar v'a.,ala't'rs c
J
-.-+ fn Gre of ,t8ht o(Jl.r &ia, k f.,',are *lerrs r.,o,r dd. "o,,) 'r!" 5{de 4$e
.-)
join ir no asso6told dl,t tat LcPrsla" oe $e Jol\ ' ,
, err.l lhg 6h th,ete
--'. Jn C4K gg ft rr 1oio, L; Utt.ore &-hcrs b$ eqrd dc'].6 ond arr'o unTsJ Aata \J
a5;r1 !g i6crreanr.
nrc -faruolnX i5 P,n td.,ri, lt+n frtDbl. B') rhu.gl.r c".rc'la Anr tg L;Uun ot ,
-:
Grc*a cnt -- sess\dh. cydtrG r."r ofvtf,t ' cross );
Jortl) t
c.rt. setFedrlloa e ('c.torts'i [tnr'nc;ae '
hsr l,-- cYii'li6r();
Xo fie oSove Code, i?@e ds.ot se+ Fek}l r.6le 4ran { dr&ct r t51 P'r"t"node
"
6ELEci rnode .o(4n6 1+n' 6icl&f Op(nr'nora dre 3e'.,o'<
"
oo)rr be talcn a5 SsLr"r".
t vtd-.,c " l+n " &let ofuahatts inro c. S16lc Screrj of.@t{c'q ) (lD ntu4 1'6 zlnttXe
$ s"re*
@ Join
is
(! S,:fseietr ov 6"!d oPe'ra'fi <rD
0- "'
&in " 5.-,.r<r
\resped\ 64tcoion o chlldi,
;*':;: ;;: rbr
ib lotd f'"")
11":ff.T-,#--'
Dra8a<
\" set'*"'r""ol-
flc! '@'<s " '"*
h;u"'o*t fl@x{o}<8
srurq5,, l't;U"'ort
"
t3 \
----5 34 6el ell Per.Lrn3 Srtrq5
Per.Lrg -.**"- !J!'oo
o! cldras o(
'
& W' V
"
ogarS ond f seJ<tt oqlcrt@ & "
+nal{o4s
6d fle*"oxl '
ilr'r iblsPdsjbla;
4 qlc
-'IPoc
-lr csu **R*t'r1oce
(!u (-'-) '-'- .-- oP c"lroic'
! , ., rrhocl 0t" I":
P"khJ"O -*flb
"'.seled $in
@) f,oiri
saerr Gr) *"4 si,"t4.
*.. &!-
t. n'ru &'b("leut
"P.r.u"6 rbe R;.t"t*q
i gu,e- *"
q-'-; tj
n*-rlrocl , "
.Frrx'}q
*
*) ah erod 4 cou ng getkrchYlo"le Cr-) ' o *. il^**o F5,roH cn 'P
co^ F5r.ltcn
co" '+
'^ ,er"x.dop
in <r nalprnS firc , !1 olAnl Rtl" amv-'rc 'tt" '
trr{Crt +flc '
;tr"J stJokle4 >
{set m.e=" orrro-"ls '
g"nr'--" atre.* |
uo:..o'd"="cdt"
Llkt z
NerBcans lDE:-
ao Hibelrsrc afPn Llgl"g NtBoo6:LoE '
SKP5 l0 develoP
H6t : I b""b.-;-l
l)d'r
8.rvr<b:
'.
E
f;;cil
Uk"*-a,G6+ I
=;*"ilil;,*H il ;
--+ofu
Po*",:l-6--l-'..es"sb
g'<0 t:- bchr ctcL o.' prde* rf,me --> r,<ro Jov'{clars '- - J tl*S u'ot:@ U
f,"is\ - t)
---
i-frort 0r$,littroa]t.*)
irn(loYr utt. h;borrat( . ch. *'
Frblc Ctol S lrrerC uc.*
P6 Y
- (3*og o,5sl.l
)
{ F.turuL))
&o'aAn'"
&ts-T"rt "5 &t',u= rxo G.?rg,.,**1;. *ngagureL)'
$sst or
= 44tU - or. Serst o"(, I
'e!$"n
h'Dc."o d=nea P,,Derno(;-
d.s+Sra (r'r1,'
d.r+Sno..e t'.o"" ),:
ibe l-io,t'*'lro'' fl = selncn ' k6;oT;uns a t o\L))
lmntttl*t'.- eloo
'>ntE&,o 5 B.irro'a
1
in fi1.4 &n'or I., o'", . 1ao'o
// ftE i!
O ur.d
&,1.i :-
6 =_ioo
5nrc5 S,='ro'
I
hib"'d< chr6r'
- o -"*'*, *.tc..i",c.o-"tc,,A! 4@*x>
.,- s:::::--EA-
>
+Dl{,?5 od.. }ira?ld" far"dl'h
"ot! ht kd&!-' >-r$r:
rh llgilgJ r ".d,<
tc ,n4erns
(diF' ,:.il HTj;.
Y'c!&F' odJ';;
- sh!.dlt,io .' -.. -zralah
-f,r'- - ,: fffi ;""" ke''tdis "'t! in '1""*a-s.. fd"!a{ '
iir- --,,J lon,,r. oor" (-t-roh *,_Ti;. ;" Q*..a, w**
6rc *t
so. I'tonot -aap'1
of c &va
'{Plic4}ion'
- x'.'l o;re
h i6 d?Pio? molLda '
@ nu con calcre
--) In lhe oMve 3ur.Us , xmt uaX 0f &hnio3 rncradc'trr is trrrrc$ns rbe
| .,
) efra$se os Porl 4f,4 ,f4va ptqjct levtloprrrr*,
o'
burden dh &va frDaraiTfr S
-'-----t
ded imp\tmarralt oo w
t0015, be,n,!.!c I1-',1 ou oa$
iod6 onr provi
_,
-' coY'm,tn JPA SPetlhcofion
--> Nbile crariog on dnrrofali"n , &xne me*a&tz, id prDyid ed 'Prt o", "o',.t,ariorr - -l
-? -The
16l inffnrrglor, Q,r an annotr,rt<rr, is ser \ tlsir @1z r8ef . rhii i6
$e Qetenlton tbti%'
PqTD clc45
Cor',ooo AonouriooS Wrh "-
to imft(l a F*e4e 4
hblle cl(oxng a POJo clctsg
J r,rr,*, ure' oeed
csled *:
"*
JPA &vox ' PersisEoLe
ugiog 'j}tle cYo'{T
qnmt.rHoog arc fornrrpnll
-.+ The ftrtcoing 4
\J
\-7
@ @rote
&t-s tlue a1
anroraAdn , cL f']oJb clasg :
-Io.Ule 'g ctkcl t6 rm0l c| FJD CloI3 tt) a FBrlse trbte ' re ft aelas're'ne
-; @
--
6')a tt'.b.enaroe 4Ye rQlklJ ioen rtus @ rirue anvnnttm i's oPd(mal '
a- kcg .colutn & a b)a&te loAe'
@rl it rrrpped 'to a prDfrryrg @rth o p,tlttf.Yg
fP poprtg narae and columo nc'1,.,a ore tnoJche d theo @ 6tt"'t' Qnnoiorlo
001onat'
yesdrYCe I toe
sboU'[ aa4
Jr1 @nBguralion Bre op lr,rte.nare, .)"srcd
rq?*% Jry
.--
-) h 9u" & khr*r.6'6, ln o' cllevlf aiop'i' tile oecd
V?o"
clat6 ig
Ctal6 Oba*. baf u .&r,n biu',oaitr't A . cint
b' ae &.'L ttlrted "tuw
mcqed in a Gr,66.rarri^ d/'r3 <tntf, '
^ Ltkioo.a.
in a Clicnf 6{di'd$on oY
ru*
in a Dcra&'rc trsioS
'it &r{ 'n5ert'n5 o sE',denJ obJel}
0ne Brr,*r"'X otPt'
Anrntdhons '
\T;""'t'r--l
L==---)
L, 5r,,aoru.&va
bitt"are ' cl3'rtnl
Jo5art Cti.r* '&ro
+ ' cldsS
(9 O ,e k'd.qr
'4"r ft8l o,\ app.,
O
' o'- Oifecreoce blor &r? G) 4 Per,5i6t C-) rncrtod
q'
q
ased ib &w an Ohied-
iD
bs :. bo*, 6avC-) { per6isl L-) irlcttld$ ar',
<et<lrns ibe' id o? thi Sawdl' o4jsf
fuiagase' U4
rrrbod
Save C)
: i,_ .-.,r1 i, a,\
,g92*? SePoro*-
r(,"tc! a't
gJbuats b;rz''clt I in
*re DcraBara
-+ il] cqs & kbte Q^
'atitrr'*
frAtr :t i., -rr1
!,,,
Pld
Vcriq Id l
,J**t
, '* Muc ;
" -."e"); r'l'rale Ch{nj Crutmr.
. @ Cotutnh (oaff= vrra'
PVa+c $trfng ltnaotM"t; @ Cd.ron [rr.me ="C*tru )
.-w"aAPat f"rr.tr SMnS cdiot^q Ad{rrB '
3
in x-r fo,.,or
"-
!.,- p-n Uarg {ez,r1 @ffr"XToOnc (t"erbuiry "Va,a-.cros, c"saar =G*c".r1p.*) ;
16"c1"3. f\
&,i )^ A^'uren q' '-d*" 1""* P'-{ t'nY
(guro)ntllu rDn (tiarne
= y1].l,id t "tfr,,..rat @r.","l,k ,t= vra)j.-
priua*c Vcna", ve.a*.
p,L- LlzY la) f,Atrer L'z'd"trs
3
--t;;;.
ttl-u1"0-A"-,-;l
G."r_u,. jova.
htar*.t . cfx .x.r
J}*r(rl "tf ' iiva
*. 4las3
ODe-rD- roar,? (Ur -ar'c d*,"r ; (otrt' :-
^nnoiarlo.,
--> fi OAAtog b6$ Cr,e -io-mong dJ1d mc,n8-to-one at1h6t rfid), {De dro
&c-tope bi-dtvaa-darnr dne-to'rnanX osd6ia}lon-
{
dtlt tnq f,d
*,rlo Narne
*-) <l.,,,cr Addr.{J
io *r 0ero6o:e '
ott 'reqr'it"d to ilr( Fr.rb-io - rrtrr'i tt161+c"rcJ'le
AC,6os61oiot
r)
@ n"ngTollonS
r)
@ JolnTc.ut"
a) @ Joi"Gltt-. lte
'Ihe &"ieq6oQa oP
JotoTo.b\e and
--a fn(o.sc oF honXTohal ,0]e rred
rehrtoosl,i P o/e stzt'd in Soinlablc
dr.tqaJe3 - i krhs
ca|-id, gr. ir.b'id -(K
/7 e.reg.rru 'j4vq
impoYt iovax. P"r6;stto@'*i
i/nf{* ic,vd ' .rfll t(;
@ P"*tc
@ Tolr"(.ot'c = 'eet:tg"r;ee')
Poblic alda6 Cdl'?%
{.
@Id
"car-ia ") \,
@Gt.,-n [m"r =
f,d
fri\rl-te ini Ct+<gg ;
Gtu-., ( rn rr'r' )
.,e = " cof -
@
;rr;rare $;oj c"r1oX M"re :
7
J-
// Jt ro.Jrva
impc* jc.,a} ' Pcn#9tn'e ' J'
'\J
"
imfwt ial,o'(Iril'*i \-,
O P,*hj \.'2
@ to.ne
(no"ta-'' itt"e"
Fr5$6 c\ass
f'tert) .,j.-..
{"
- 6rd \-,
6-"'u-" [ot"'t='
ittr''-U')
r'
P;varr in* lgtld ,
' \--,
@ Col,rrn.,
('trtc' "ix.-*d') r,onord.tt.,,'r @Sl*r"
o*
@ **ffit#L,.;1ffi'*' s , cas,te= Grai'r3p''
'ifrq="''-''-;
hqt'?r
-
PrivaF S.t s o"rcgc^it 'f (atg'Yv
(cr'ota'\)
L =
-
man8lo t'lan, Annbrddct\
Ir6e^tclihf . iav a
('i*' FmdYUve3
@ -e-'o-o't !4J44 c.'d
&'Ptiatfc
' frc4plg ooe-Ti-one cr,irh F
eJgn tseq' toe '*dia'* ;
-1
rutt vatues ioto foc1orc5 cda'tn
dnnar'/tdn t'x shu'tJ add
u"''' Rmgn r<1 @irb '
u)tle afPlsing cm-ID'oJt
-) & ot|noft r{dn
Un[,t-te oot
ur4+r\ crrnu" -
Y '- Ini-rrrlt 'l+tli'l<
s/* -
@7$rGt"-n
- -^ dx
^1.,
- torrh bei6okca , "
'ox (&e
'6a) /:.M---'T'J\. ortroroftao
-- Fn cm-tu-ooe @fU"tfuO"
da'{g
e.r)d u@n !e
to o{ptJ t0-6ne p blt! Frson '
,'-> lP 34-,' urnr ooe- doflc'nsku
Sil'd5
coth lrugnkcX c'n ro* ttro rhe
u5'n3 oonot fidns r irr 6ne. t.-'o.r
;.*,,
l/W*o'aua
)t)
irDfrrt iafa'x ' fro{9st(nlc'
3#"*,**'"""^""1'
@E"nT puorc oalsLiall.'re
@T"ue
(.ate "
= trtsot") t^,,
grclic class Persoo
drau"- ("t"'e =" tia l
IL lluox r",l- lic-s"nl,
@ 6rrrnn (rr'rnc -";ddE )
&1,"" (-'*="en')
d,
i*r. * ;uuttW),
'edaft
grl nr ft",f Puso"f @Gtu-n frrr.-t = ,)
l
o&tog o gerEralJrf &r a.' ia 115 9a"!I16:-
rP oc oroot to (rdd do3 go hit,.,ore f,fDvldC gs''(rof"r c[al6 l0 an xd
frt|@t
ttrn For ue rred b deBoe *,o"^ 5tr-t<8b usl(
@6"o;"Cx*.oruv
aPnr degntog ltrc Stt4lql rb add o ocrrrratur e. on Ad crre r-r e d
&or.orc,rtcrn
@O"*--d,r"-" .
{
(** ="691", stuxrt -- 'irrcrcmcr+ ")
@O*-'r.C.*-r- troJio!
^ rrrrll(
eJd I
@P*3 @*'l -
-r"rle (o*-e ="Pda ) "
@ @f"U. {n".-. = l;,-o )
pu.bt,L cut6 Wa\ ,",];u. clo*s li.-r.
{ { /o'o'**
@rd '^.,-id' ) \--l".-P +v!- -'
Q.,G,**G, -'\
-"tu(r"-e= v r', ' s*'?]"-s"/
li6r""nrf 'r'-e = Pd-'- r nL
"n
,ur. r *
g'uo lTr ; pno^u<xt -- @la"..a<' ('* -r*Y' '
it"6 p'+-M-e l
"1,,uor-.
dG.-,*.Ur* (*.6"* -,- 'n^.r')
. !,"'T,r[-'=l?iilir'
e Hff rY"=;'#y'
Datrc e-5t*fox2
f!'\'!.L-
@ O,"ro 0r,. ( t"'go f n*X
"lrn^. ,t^'s , cos@Je = Gt^*1xce . ett I
@P;-"r5k1Drn Gluqn i6 infienrs y[,e h; tt^""1-. rt* ^^lrr^,t^., eoJ,.
-a l"itr a q
'a" 4
dl\o ac+inl
rr or. P*r y'tn ',
:
java
ftrson.
hrrn tc. Jaya
nePc' pone@ aN,,@ e L^*O
hilc'nare ' cf1' xm t
fnr"tCur'ot ' iorj "
*'clc't!
6Br>--d&f-{_0oq-__.a^{E", ;
fEkr D
/1
iq hihf'fiar-L -."
I
(omnrt"nr rrrd)lnq
,' o
cllx ar a
nlu;'9 a *kN*t "P o"e fbtr0
+ ^ r**-;re
Q:ryxte* nwpiox i5 t
@,h*u,a
an rh. -{.,uoin6 e^atdt, a '"tt-"tnct oF PM-" .t"* p ooog ar a
'
4 fx,$L otra P"oon
@ &u-",(.r...re=" 1" ) 8- J-
eLe
p.ldtt Char iru'tlafi Aa 1
@Ot,,-lrt^'nc=
@Coru-" ( n"..,e=' F"o*." ) f'Yitl4
< inf Pe"5o,JA :
p"vat I'r,tX $,.tN-''u; @Cat'^"( n"'ne=^ *a" )
no-e='lnome
-) p\ruc J.rY..a+rl ' Drc Az,L',
@Cau.. I
f;** 6'n? lartNarnel ytone ',
p.vt l'. PNtnnt
3 t
J
ft':zn'Java
PNam'Jdvq
Lrk'natt. cPa )"nI
rt9<,r r,aSt@ q?n @ + L^'l^'t 61
f,ra,ftcu.'* 'jduq
* ' cldrl
fo fe alo ela,'f,l, hih.'mrc lrstzts btr' dare and +lmc )xfo 4 Qs.raBc.re *aA(,
a c"*t'5 $sihFold'5
@ oe can cyor SeF.rcrte 3r* clo$ P,(
ord P,, d"B-n3 *,rl.,a" & to d' a"r.ln'" og"n'os I I'ik'.,"tt'
lu'
le{,(rax ctar! is cqre d 0. DAo clalr,
-fti s ctooeA \s a k** uryga.^rN , .&r inregalrr 5 sr''^rs onA \p'*re '
bLtaa
"'
->
one fup'src [.t, a^5 +"*f b5 m,rnele Acttorcv.xes *
g*'x
O Ae j+ G 3tn.t6 &rrtl' ttlocroor lrte8rafrqr exornrrlc q6;.rr"1 qle <ra pr&r.ntog
.--, Sn6rorog
,
&dd onl d.trri c{r'orionS cn 4 So,bsLrilr,i oP d"h, bU ffiq DAo cl4r(
irdcx . irP
&la+xroao
Strtfcrib(5
')
selbar-hilE tat-
t r$pricatioi-1 (se*r"t 'ru, net.'1'.t6'.1i!"rfomj..er ioBeit,irpdat;dite .nd'3rot
2 t' ol)erationi(cttFD op.lations))
-----------------ln ler!.htrd---------:---:----j-------------:
i 3
4
5
<c6nter>
<h2>
6 <a h!ef=.i nsert.ht61 > Crate E!ployee.</a> <b.>
7 <a href="update. htnlnxtpdat qr4'ro!'eq-i/* <ir> :
</sePL6t-Mppinq>
l
I
I
t
a*har-hibeldat-*epls. t*t 3/2/2OL3 A,as PM
?2 <s6F1.t>
?3 <ser1t-n&e>s3</sw16t-tre.>
?4 <6ery1et-clasE>Deretsowl.t</serelet-c1ase>
75 </s.n1D
?6 <aewlet-@pPin9>
77 <swlot-n'@>63</!oR1t{!@>
78 <u!1-patth>/deletesEv</ull-pattn>
79 </E 16t-eappins>
80 <Eealet>
81 <strIl-ne>s4</setr1t-@>
82 <6rylet-class>selectsea!.6t</servle!-class>
83 </3e!v16t>
84 <ssle!-napFing>
85 <setr1et-rMe>s4</setr1et-nde>
86 <urr.-pattei?n>/selectsrv<A!1-psttn>
8? </.ealet"@ppin9>
89 ---------------------Eaploye. ja6-
90 //Erployee.jawa {PoJo)
91 pultlic clas5 Ergloyee
92 I
93 priwate int @plot'6Id;
94 privale st.i.s dplo!eNrle,
95 plivate int eEployesal;
96 plivate in! deptNuDbt;
9? pdblic int qetDeptlhebr O {
98 retun deptlluub.!;
99 1
100 public woid eetneptNuub.! (itrt deptNab6.) {
101 thi,s. dp+-Nurbr = deptNrlber;
to2 l
103 !'tiblic strinq got8lF1ottL! O {
104 retu.n dployeeNaG;
105 )
105 pdrlic woid eetE l)loyoNa@ (String dployeeNde) {
10? thia.orployeell.c - dploFerrrde;
104 )
109 pdrlic int gelEEi)IoyIdO {
110 retu.o er91o!elat;
111 )
LL2 pdrlic woid eethployld(int elployeeld) I
113 this.oEployeerd = @plottd;
11rl )
115 public iDt EetEit'royeSe1{} {
116 returtr dp1oy..Sal,
LL1 }
114 peblie void BotE ployeesal(irt dptoyeosar) {
119 this.eqtlq.SaL = dplo!esa1;
LzO l
L2L I
,.22 - ---.-- --- -- -- -------oq)loyee.ttb6,nt
123 <lDocEiPE bib&ate-nappirs PoBtlIc 'i-l/ttilernate/taibernat6 ltappitrg DID 3.0//EN"
L24 "httti //hibEnat. sdrceforq. net/bi!tute-nappinq-3. O dtcl">
.
125 <bibelnab-@pp j.na>
L26 <dlasshare='Erploy
L27 <d D@=tr@p1oyerdn6olllD=na,r-o'/>
LzA <propertynde=n@ploieN.lan colurltrEtr@i/>
L29 <I)lotEltyna@=ndploF.sa1" col@=nsaln/>
130 <PtoPelty na@=ndept$ltlibeln colutlarrdo!'tno /> n
131 </olass>
132 </hibehat6-npt'ins>
133 --------------------Inseltservtet. j
134 idpolt Jlwa.10. r;
135 tllporl Jlvd, sery1.t. t,
135 iarElt o!E.hibenlto. r;
13? ilpolt olE. hibhet. cfg. * ;
139 trtrllc class Inseltgeelt atend! cele.j-cserylet
139 {
140 plj.ct sessiorFactoly frctoryt
141 //Don-life cycle iltt rtlod
L42 prbtic woid j"nj.t(' thrors geftlttrceptior
Palte 2 of 20
|--..--.-
sekhar-h1bernate-exaqrles. t*t 3/2/2Or3 A t15 PM
143 {
144 faotory-rer configuration ( ) . conftgllc { } ,builalsessionractory O;
145 l
145 //r!f. dyoLa .nice O hethod
147 r)ullid voi.l eervi@ {seryteequest rq. s6w1tR6spon3 res)
148 throws seFleeExceptioDr loltcoptiotr
x49 {
150 //!eEd input warues
151 Str:ing a1 = feq.SatPatdeter ("dprc");
L52 String s2 = reS.getPardete.("enaG", .
153 stlinq 33 - !es. setParete. ( rsaln) '
154 Strirg 14 E !q, gratPaldeter ('deptnon ) ;
155 / /nratryrnE
155 int apro = Irtaqor.pafseant(s1.t!i!O) ;
int a1 - hteser.pa.s6lot{53.tri!{)} ;
158 irt dptno = IntegeE.palsernt(s4.trirO) ;
159 //opr sessi.on
160 Sossion sssion = factory. opeDsession O;
L6L / /creata a pojo crass objct
L62 E&ploy6 e= nw snplryee0;
163 6. setErployeeld (dpno) ;
164 e. setlal)r.oyn@ ( E2 ) ;
165 6. sotEqrr.oyesel (sar) ;
166 e. setDPtNlDb! (deptno) j
L67 //begdn tlssaction
164 tlaDaactioa tx = sssion.beqinTranEactioa O;
169 s6ssion.sa@() ;
170 t*. co@it O ;
L11 PliDtlitits! pP = res,qetwliter0;
t12 t)R.piittla("<h2> Erployee sared Sucoe56fuut</h2> <br>n),
173 ps.plintln (,'Return <a href=iaclex.btsl>fiOtG</.>") ;
L14 pe. cro.e O ;
175 session. clo8 O ,.
1?6 | / l.ewj,c.
L71 poblic rcid algstlot' o
174 (
].t9 f.cto!y.ctoseO;
180 l
181 )
1A2 -------------------uPdateselt. java---
183 inport jaE.io. *;
164 irpolt jaEr. a6w16t. *,
185 inpolt ors. hibrnat. *;
186 iEport or9. hibrnat . cfg. * ,
1A? publi.c claes ltpdatStrIe! extends cnerics6slt
188 {
1a9 SssioDlaotory factory;
190 void initO thEows SpletEiception
191 {
factoriqs ConfiElratio! O . codigule O butrdsesgionFaotory . O;
193 l
L94 eoid se*i@ (SnletRequeEt req, SRltReaPons !s)
195 thEows SeryletEa@ption,IoBxcEl'tio
196 I
197 //!ad rnput wa1ue3
198 stlins s1 = iq.getPardetor(n@pnotr).
199 strinE 32 - rq . stParetr ( "n !e" ) '
200 string !3 rq.ge!Pa!a@t!(n5aln).
20L gtltng s{ -= Fq. getPardeter (
202 int qmo r Inteqo!.parset.t (s1. t!i!O ) ;
203 ilt sal - IntEei.parselnt{s3.tsj.E{}},
204 irt alept$o ' Iatogr.parsht (a. tril() ) ;
Print$titr pF res,getwfite!O;
gsslon sessiotr- = f,actoty. op6s33ion O ,
205
206
201 objat o = reasion. gt {Ehplo!. class,at'no) ;
208
209 {
2to pr.plitrtln(n<h2> Eelrlot'e Nunbgt Not Fou$d, ao lorr
2L1 , i. not upalated </h2>'l ;
2L2 Pt0,t'litrtln(nReturn <a href=in<!6x.htrd>Eo&</a>"),.
2L3
7--
setha!-hibeloat-e*aDrrls. trt 3/2/20L3 A tL5 PM
2L4 )
215 EnpIoI. c q (EryLore) o;
2L5 tnsaction ta - ..!!:ion. beginrlansacti"otr O t
2L7 .. sotl4rroyaN.le (s2) ;
218 . sei:lq)roy.sal (!ar) ,
2L9 . . stDPttulibr (alaprlo) t
220 t'(.6or6it(l;
22L pr. prlrtln (,'<r2> luploFg updated sudcessfu1l1</hz> <br>i);
222 Pt. PriDtln (nBtm <a hlef=iDdex. htnl>BOME</a>"),
223 rr. o10!6 O ;
224 3s31o!.cloae O ;
22s I / / sewLce
public void &atlot {)
227 {
224 factoay.cl@6O,
)
230 )
23! -------s1ctsft let. jawa-------------
232 ilpott java. io. r;
233 inpo:t Javax. setulet. r,
234 impor! orq.hibenat.r;
235 ilpo.i o.q hibhatg. cfg. I ;
.
3/2/20L3
356 -hiboEDet mysq1. cfg. El-----------------
357 <lDocttpE hibh.t-co.lLguration PUBIIC
358 ,'-l/nib.natri/silt nete confiquEarion DlD 3,o//ENtr
359
360
361 <sesslon-factorfr>
<t-- connection plopertls -->
363 <prctpelty tl,e-n coEection. &ier_c1a3s'>coD. !ysq1 . jdbo. D!lr</Plope.ty>
364 <prclErty !l&e='.coDnection.ullr'> jdbc:qasql: //locarho8t:3306/tes!</P!operty>
365 <I'rolErly nse!{conrecti@.u3ene">!oot</proPrty>
366 <prolElly treeattconnection.Passwoldnx/PloPrty>
361 < ! -- hilcgrut prolErties -->
368 <prcIElty na@=ndialect">o!9.hlbetut.dial"ect.r&SQLDiaIect</p!op6!tY>
369 <propertt' !!@="shos_sqln>tse</ploEErty>
370 <ploperti' t:,reE'libb2ddl.auto">updat</Prop6rtt'>
371 <l-- EPPi[g files -->
372 <lapping resouce= studert. b!6. s1" />
n
3?3 </sossion-faotory>
374 </hibemate-conf iguration>
375 -htbfr ate_postgresql. cfg. eL---------
3?6 <lDocTvlE hibenat.-@rfigntration PUBIIC
377 n-l/Hib6rmte/Bi5loat3 CoDfigulation DTD 3.0//E!{"
374 .'.'>
3?9 <!-- hibeaatejortgrcsql . cfgr. n1 -->
380 <hibenate-coDf l.gllantior>
381 <s65ion-factolY>
342 <!-- @8ct1on PtoPerties -_>
383 <pfopeftt' ll,@=icomectioD.dtj.we! cla.s">org. PostE!3ql.Driw!</ProPerly>
384 <plopeEty Eie=r'comction. urln>jalbc. postglesq1: //rocauDs!:5432lpostsres</prop,
385 <prop.lty re=r'connection.usernacn>Postgt3</P!oPe!ty>
386 <plopartti
')a@=t'co@ectior.parssord'r>postEres</ProPerty>
<!-- hibhate plopertieg -->
3a <t'ropetty naG=ndial6ct!>orS. hibernat6, dialect. PostgregQI;Dialect</p!opa!ty>
349 <I'sotErty naie-nshow_sql't>tEue</pEoperty>
390 <prolElty ne='ttibr2ddr.auto">updat6</P!oPe!ty>
391 <!-- la!,ttinE fils -->
392 <daplring ssou.ce=" 5 tudent, bbD. rDL " />
393 </sessior-factory>
394 </hibeloate-coDf i,gulatiotr>
395 -lnaertclint, java-
396 ieport org. hibeanate. r ;
391 inport org. bib.mate. cSg. r ;
394 clase hsertclient
399 {
]to0 Etetio woid aain (strj.ns Il a!qs)
401 {
402 AeaslonFactory factoryl = nef, Configirlationo.
403 coDfiqu ( nhiblnat_ryaq1. cfg. sIn) buildsossio.Factory O ;
.
719 l
?80 Int gtEEPlorESaI O I
781 .eturn edplotsrl,
Paqe 11 of 20
7--:
742 )
783 woid staq)loy.eaal (iDt .qrtoYsat) |
781 this, 6ploy6e9.1 = Dplo!@Sa1 ;
785- l
745 l
747 -- - -- -eEPlo}e . blo. :dl
788 <lDocligE hibelDate-happiiq PttBtJc n-l/ltib.lEte/Iribelnate Mapping DaD 3.0//ENt
?89 "http. //bi-bernare. sourcefo.qre.nerlhtbla.r6-@ppips-3. 0.drd">
790 <l-- dll)1oy6e. hbm. ut -->
791 <tdbernate-napping>
792 <class nee=t'Enployeen tablFnedptoi'n>
793 <id n&=(@ptoy6etdi coruMrn-lFlon/>
794 <propelty nee=ndployl{acn colt:m=ionllenl>
795 <propltv ld=n@plo1.eesall coluen='3ati/>
796 <propelty ree=trdegtNurbefn @Il's=ndePtlorl>
797
?98 </ltitEnate -Eppinq>
199 -----serectclient. j
400 //srectclient. java
801 illlroft java.utif. *;
402 inpoit olq.hibe!.ate.*;
803 inlrort org. hibernaie. cfg. *;
804 dlass selectclie^!
405 {
806 putrlic static woid !!in (gtlinE I I ar93)
807 {
a0a sessionlactory f,actory = re{ co.fisulacion ( ) . configur O .bqildses:ionFac
809 sessio. sesEj.on - factory.opensssion O ;
810 I /'ar-r
811 auery qr1'1=!6sion. oloatOuely ( "fron Enployee e {}!t. ...q)loiesal>:P1
812 qryl - setPararetar ( "p1".2000) ;
413 r,isr 11 = qtyl.I1st() ;
414 Iteiar:or itl - ll.it.atoa0;
415 q. !Ie (i11 .ha8NextO )
816 {
81? Ebployee - (EsI)l6Fel itl . next O ;
814 systd. out. p.irttn ( . stEq1oietd ( ) + " \ t" +e. qetEiPloteN.lt O +'\t"
819 +e. getlnployeesal O *'\t"+. g6tD6l)tNulb6r ( ) ) ;
420 ]
82L systs . out . Plintln
422
823 quely <rry2 = 3331on. cleateQuery ( nselect e.aployeeld,.lr,ploi6NaG fEo'
824 Eaployee e {he!e e.dePtNuDbet=:P1"};
825 qrt2 . EetPara@te! ( trt)l(,30) ,
426 List f2 = qry2.list O;
a27 rterato- it2 = 12.it.atoao;
824 {hite (it2.bsaNoxtO )
429 {
830 object r[ j E (obj.ctt ])lt2.next(r;
831 syrtd. ost. plirtla (! t0l +'\tn+! t11 ) ;
432 l
833 sYstd. out, Frirtln (
834
835 Query qry3 = as3io!.creatqury("select e.eEr,loyeeNsle frc! EDployee ,
836 sh6! 6.@ploy6Na! lit. rtstr n)
837 nid 13 = gry3.ti.to;
838 rterator it3 - l3.it !ator(';
839 wbile ( it3. hasNert O)
8r0 {
8{1 string r = (gtrlig) tt3. nit O;
8tt2 systa. ort.plinth (5) ;
8/t3 )
8ta sy td . out . I)lintln (n );
8{5 sesslon.clos() ;
8t6 factory. clos (l ;
al7
8aa
8t9
850 Arpriotion-g(HQl, In.ert op!.tlon)
851 -i __ --- __Erploye. . j
452 fEl,lio clas8 Ebl'loyee
Paq 12 of 20
66kl.d-hibernate 3/2/2013
453 {
854 privat iat qrl,oy..ld;
855 privat stling @plollfam;
855 private tnt .qrloF.Sal;
857 privat6 j.trt alai'tNulibr t
a5a public lnt gtD.ptNud! { ) {
859 sturn dptNlsber ;
a6o )
861 public void gtDeptNudr (int deptNdibet) t
862 this.dptNuG. - aleptNuliber;
863 )
864 pubtic stliDg setliPLoyNae O {
465 !tuh dl)loyeeNa@;
866 l
461 void BtEqrloyeNa@ (Stri,Dg 4PloyNa@)
868 this . oirtoitla@ = @ployeNae;
469 )
470 pdblic int EtEqrLot'.eld O {
a?1 letu.n 6bltlof61d;
812 I
8?3 public woid stlDployeeld(in! @Ployeeld) {
474 tbls. lt)loield = dplot6Id ;
475 )
416 pDllic iat s.tEr@Ioresal ( ) t
817 seturn @Plot@Sa1 ;
8?8 )
879 public (int dPloy6sa1)
woj-cl setanplotsal I
880 tbis. lploy.Sal = dploYeesal;
aa1 )
882 )
883 ---.apl oYe . hld . m1
484 <!DOCTYPE hibernate@pping PoBnrc tr-llHibrE&/ribe&te MaPPitrg DrD 3. o//EN'
ss5 "http j //hibsate. sourcefotga.oe!/hibehat6-@ppipg-3 0.attd">
8S6 <l-- enploy66 , tita. B1 -->
641 <hibernate-Mt4)ing>
864 <class nde="Erptofn tablFnsploye
aa9 <id n@="erplofr.ln @Il'm=ndpnon/>
890 <plopdrlt aalle"@ploFeNaft" colll@=renden/>
491 <property na@=ttdt'l,oFesal't collls=rrsain/>
892 <Propelty na@=ndPonlrloln coll:M=ndpt4onl>
893
894 </bibelnate-Mt4titq>
495 ---bitElFte. cfq.nl-__-------_-------
896 <!DOCIYPE hibesat-configrfation PUBLTC
897 " - / /Irib6nat/aiblBte confiqnrratio! DTD 3.o//E!r"
894 "httD: //ffi .hibnat. olq/dtd/iribelnate -3.0.dtd">
899 <!-- hiboat .cfq.sl -->
900 <hibelnate-conf iguration>
901 <session-fsotoai'>
902 <!-- coNatioa PloPelties -->
903 <property nl!e=r'co$ection . alril,u_cLass ">o!acle. J albo. OlaoL.iDlj.weE</Prope!ty>
904 <p!op!q, lltsFr@rnction.urt">j@/PfoPaq
905 <p!oP.ty nti=ncomctioD.usehse'r>scott</ProPoltr>
906 <p!op.!ty D5DeE'rcodection.pass{ordtt>tiger</PloPefty>
907 <!-- bi.brnat- plopertiei -->
908 <?roperly n.!e=!clialect',>org. hibernate. dialect. Ollcl.Dislect</Prop6lty>
909 <prolEEty na!srshor_q1t!>tne</P.oPe!ty>
910 <propltl' D.@='ribu2dall.auto">uPdat6</P!o!stY>
911 <l-- aaPPllig fitos -->
912 <lapping r.lourcetnesptoyee. bb8. nl n />
913 <AapplnE rgsorEc=n tlteoplote. hbc. bI( />
914 </seEsion-faotoEy>
91s </hib6nate-conflguatioD>
915 ----------------_----_-I.stErPloye. j.?a---:-_---_---
917 public claas Iat.EDPIot@
918 {
919 plivat int dpld;
920 pliwat stling attrilD;
92L plivate iat qrs.1,
922 priwata iDt deptno;
923 public vold setE4ld(int @ptal)
l-
3/2
924 t
925 thts . lpld=qrrd t
925 I
927 int getllpld(t
924 {
929
930 )
931 rcid 5etE!P!l'@ (gt!j.Dg dlrrEee)
932 {
933 t}tis. dpNa@=dpNar. i
934 )
935 st.inq getla!'N.c()
935 i
931 retuh spt{a@;
938 l
939 woid setErpsrl(int qrsal)
940 {
941 t!is. dpSal=dpgaI,
942 l
943 iht gotEnpsal o
944 I
945 rtuh @p9a1,
946 I
947 void sotDePtno(inr .t6Ptno)
9rIa {
949 this . alet,tDo=cieptno ;
950 )
951 iDt EetDet'tDo o
9s2 I
953 letun .iepttro,
954 l
955
956
95? <!-- teE tspLoye . hbr. nl -->
958 <!DoCTIPE bibernate-@pping pUBnrC "-//aibelnace/r.ibe.nare lrappirg DlD 3.0//EN(
959 t-aappinq-3.0. dtd">
960
951 <hibernate{apping>
962 <class nee=,,testEhl'1ofon tabIFnTESlSMpt OYEE{>
963 <id n@=ndptdn cotr'D="esp d,,/>
964 <Ploperty nam=rre8p!{a@ 1n9th="12n/>
965 <P.operty n.c=tr.rysaln col1ld=n3af'/>
965 <propelty n.i=nd.E ttror />
967
968 </hib6hate-@ppinE>
969 ---hsertclint. jaE
970 iopor! orq.hibeEEt. *;
971 irpolt orE.bi.bhat . afg. +;
972 pdtic class rD5ortcttent
9?3 {
97A public atatic ?oid @in(strinE sI t)
975 {
975 sasionFactolll faotory - D6e confisu.ati.on o . configllr o .bulldseBsionl.acr,
977 asio! aaaion = faorory. opensession O ;
978 Query qrr - sgsgion.cieareOuly(rriDselt j.nt rstEnploye (eroprd, dpNam,
979 upgel.,d.ptno) setecr 6. @plo!erd, e, enpto!er{.ue?.. q)loy.sa1, e..le!'rNulib,
980 fro6 EaPror e"l;
981 tlssactio! tr E !55ion. beginTrns.ction o ,
942 int I = qly.rcut(rpdate O ;
983 t:.co@it(r,
984 si.std. out. plintllr (k+" objeots irselreat,, ) ;
985 Quly qlyl=8ssioE.csatOuery(,,upd!r Edl)lof e s.t .@ptoyeesar=gooo
985 *ntIft'!br3o")
9A1 ' rEeslc*o! r:1 r !6ssr.oD.besinr..".""llif;, ," ;
988 j.nt X1 - Say1..:.atuDdet O ;
989 tr1.c@it0;
990 syat6, out. plhrLD (L1+n ob jecr6 aE upatatcrn) ;
991 s*rlon.6lo.e();
992 f.cto!y. cloao O t
993 l
994 ll
3/2/2A73
995
996 Applioati6-10 (critli'a rest)
991 ----E ProYe. java--
998 pullio cla! ElttloYe
999 I
10oo prlvate iDt dploteld,
1001 priwat stlinq eilploidNac;
LO02 prtw.t irt @I)Lof@Sa1 ;
1003 tnt &pt{trbr ;
Prite j.nt
1004 pubu.c getDePtNu6be! O {
1005 itulD dePtNuDbe!;
1006 l
1007 pr:!1ic woid setDeptN@b! (int dePtNutl'6!) {
1008 tbis.d6ptt{ude! = deptNuaber;
1009 )
1010 Str:iDg gtErl'toyeeN&e O {
1011 Fturn dlrloFeNee;
1012 l
1013 pub].j'c woid 3et&rPlo1el6ee (strinq dP1oy6l{aG)
1014 thi6 . @ploiel{de = lployeeNd ,'
1015 I
1016 publio int gctloPloyeeld O i
101? rotan eDl)loyeeld;
1014 )
1019 publib woid set!&ploteld(int 6ployeelal) {
1020 thi3. 64t1oy6rd = enployold;
1021 )
t022 t'ub].ic int getlel'loyeesal O {
4023 rtum @['Loy.esaf;
1024 )
1025 public woid setE!P1oy66sa1(iD! 4Ployoesal) {
1026 thiB , @Itloyesal = @Ployesat ;
to27 )
1o2S )
1029 ----dPIoFo. hbn,el---__----=:----_-----
1030 <lDocrYPE hiLonat3-@pl)iug PttBLrc "-//gibelnate/Eibeftata ldaPPing D1D 3.0//E!ri
1031 "htpr //hitElnate. sourceforge.nel/hibenat@ppin9-3. 0.dtal''>
1032 <! -- dplo!o.hbn.aL -->
1033 <hibE ate-@PPing>
10311 <class na@ElEDployeen tabl= dployee (>
tr
Pag 15 of 20
sekhar-hibelnate
4,i15 PM
1066 sy8td. out I'rtattn (
,
1067 ploperries of objctd (kay2)
1068 ctrt rta !.:::"t
111::lin arit2 = seslion.cleaL..Fi
1069 Elojection Pl = P-;;;;:;;.;;;::i;i;;1ffi1f,.1:i:..,,
1070 Projction p2 projecrionE .;!o;eEty (,,upro1'9sat,,t
1o7l Projectioniist= prist = nro5ections.projcrion.isrO ;
LO12 pLirt.adal(p1); ;
LO73 plisr.aatd(p2);
107 4 crit2 , Etproj 6cri on (plist) j
1o?5 I.ist 12 = crit2.Ii6rO;
7076 Ite.ator ir2 = l2.itelaro: t! .
LO77 *hi.le (ir2. hasNext O )
10?a (
1079 objct obj t 1=(objectf t)it2.next0;
1080 syate- out. pEiEtrn (obj tot+,,
10a1 . "+objtlj);
1082 Systd. @t, pribtln (
10a3
1084 111::3i" with siDqre plopeEty(,ay3,
"lj:*.= seseion.cr*rec.i.".i"1e.pioy"e."t"".r,
cn!6r1a crit3
10a5 Projection p3 = p.ojecrions.property(,tee!,Ioyesalr),.
1086 qit3. serprojection (p3 ) ;
1087 l,ist 13 = c.it3.liEt{l l
1088 rtrator it3 - 13,iteralor{! i
10a9 xhile(it3.hasN6xt O )
1090 (
1091 Inresr i E(rorese!) ft3.next
L092 O,
1093
Syst6.out,plintln(i) ;
I
1094 systn. out.p.inttn
1095 ae8atoa.elosO;
1096 factory. close ( ) ;
109?
1o9A
1099
1100 Applicatior-U(Natlw
1101 --. : ------___________Eqrroie. Sg! ap!,lication)
java_
!LO2 p@rac class EDployee
1103
1104 priwere int esployeerd;
1!05 plivrt Stlitrg @p.t o16N&e j
1106 pEivate int qrloyesat;
1107 prihte int d.ptNuib!,.
1108 public int gtD.ptNurber O {
1109 Eturn dptXu&b6t;
1110 l
1111 public woid s.tDpttfu&br (int deptxu!.ber)
t!12 ars. dptNu[b. = .!6ptxu&ber; t
1113 t
1114 public attiug srtEDI,toFeN5@
1115
aeruh .qrloyeNane;
{) {
1116 I
1117 public rcid st!ryloyeNde {strinq sp.royeeNac}
111A this.qrlolre"lr* =
1119 I "rpr"i""N*,
!t20 public iar EotEq)toyerd O {
LL2L atuEt ol'toield,
!122 )
aI23 publtc rcid,s.tEeplot@rd{int
L\24 $proyerC) {
tura.qloteld = ePloy.eldl
1125 ]
1128 public int gtteplo:,esal O
!L27 {
**- @t lofSal;
1128 )
LL29 publla trol.ct-stEry,lolesrt{lnt uF{ay6.Far)
{130 Enrs . dPro,l@sal E ery+otErsal {
1131 I ,
t132
I133 '
113{ < r DocrypE bu*mat6-**iffiiiii;* :qr--------------ti
tr_//aibelDt./si.bemetM+)!,iaqDTD
1135 ..httD://hiha'-.*-
_^__-_a-_ 3.0//ENr
1135
a-
pekha.-hib.tut -.rslr.txt 3/2/20a3 a tLs PM
L20a )
L209 Inil1lc j.nt g.tlDlrloyesal( ) {
L2L0 rtun d|)loysal ;
L2!L l
L2\2 l[bu.o wold ettqployoesal (in! edployesat) {
LzL3 tbi...q)1oy6esa1 = @ployeesal;
I2L4 l
!2L5 )
L216 ---------enptoyee. hbn, xeL--------------
L2t1 <!DoCTYPE hi!!Et6-@t{ring luBl]lc ',-//dibfrate/Hibeaat6 lrappi,g DtD 3,o//EN"
121,8 "httpr //hibeaate. souEcefoEqe. ner/h1bEnate.eppin9-3. O.drdtr>
<hib6nate-@ptriDg>
!220 <clasE nallF"EDp]'oy6n table=nenployeer>
\22! <id naG=,,edployeldn collm=(epnon/>
L222 <I'r6Perty D&F raployeeNae " co1tl@=n6nen/>
L223 <prolErtt nale-"eqrtoyesalx colt@=nsaln/>
L224 <proP.ty coll,@="&ptnoi/>
L22s ':@=!d6ptN@bert
L226 <sqI-que4.
L221 <rturn crasartrE&ployee'r al:as=nenl>
L22A l?EcaII 8lectA1lEnployee sO ]
1229 </ sql-qu6ry'>
1230 </hib6mat6{at pitrg>
1"23L ------c1ieit. jawa--
L232 irpolt org, hibh.te. r:
1233 irport orE. hlbelnat. efg. * ;
1234 isport java. utj.l. r,
\23s public class cLidt
!236 {
L237 public tatic rcid nain(srling arq6It)
L23A (
SoaaionFactory facloly =new ConfigulatioDO.confiqu.e{),buitdsessioDEactoly
12AO Sssion ss = faetoly opeises sioh { ) ;
_
Paq 1a of 20
\
l-
-t
6Akh{!-rdbEEt -x&pls.txt 3/2/2oL3 atrs 4a
rcid s tmploye Id ( iDt aplot@Id) {
1280 this. erployoetal = dplotId;
1281 )
1,292 rrulIic int qetErployesa1 O {
L2a3 rturn 4Ployese1;
\241 l
1285 g$lj.c void settnproyesaI(int !ploy6sa1) {
L2A6 tltls. @ployeesal - erp1oye6g.1,
L287 )
1288 l
L2as -----------------------eRployee.tlbe.el----------------
1290 <!DOCtIPE bibmateaappinq PUBiIC i-l/Hibemate/Eib.late Mapping DTD 3.o//ENr
L29L 'tht'lp: //hibeinale. soulcefotqe. net/hibraEt-Mpping-3. O.dtdt'>
1292 <hiblDate-@ppinq>
1293 <clas3 na@=trEnl)loYeetr tabl=r dplo] (>
\294 <id tra@="@p1oyeld( co1tld=neEgaon/>
1295 <PloPorty nd6=n6ployeeNa@n co!.llD=nD'ci/>
!296 <PloPerty na@='Ienployeesati colll6='rsaln/>
L291 <pfoPerty nee='rdeptllurb! n co\er=naleptno n />
\298
1299 </hiblnat-Dappinq>
1300 -----------*----- -- - -- --web. mI--
L3Q2
1303 <5.4let-DareX)aginatidnte6t</doFl.t-D!re>
1304 <ae let-class>Paginationses1et</sewl6t-cIass>
1305
1306 <ae*Lt-@ppinq>
130? <s6tr1et-n@e>pagiratiortest</eewlot-n&e>
1304 <u!I-patrrn>/ps </u!!-patt.rn>
1309 </s416t-epping>
1310 </r6b-app>
1311 ------------------------PasinatioDSeryl6t. jawa------
1312 jltrort jawa.io.r;
1313 i-uport jawaa. seelet. *;
1314 j.apoat jawa.util.+;
1315 iDport org.llibe.rate. *,
1315 iiport orE.hibernate. cfs. r;
1317 iBPott olg,hibe.nate. criterioD. *;
1318 pubLio cLa6a PaqiDatiooserylot extends cnelicse*let
1319 {
!320 int t)agelDd6x=0;
1321 seEaioDFactory faerofi;
1-322 glllic void init{) throws AealetExcePtion
1-323 {
faclory = ns corfigaation ( ) . @nfisu ( ) buirdsessionPacrosy {l ;
.
1325 syst4. out.p.itrttn("factory csatd.,.... . . . . ") ;
!326 l
pr5lic void soaice {SewLot-R6.tust .sq, SntetResponeo ses)
!324 thro{s SftletAaoption, roExcoFtion
L329 {
1330 ia! totarNuabtofRecordsso ;
1331 in! nuobtofRecoldsP.lPa9=3;
L332 / /Iosrc-I
1333 String sFaghdx = req, g.t!er.!ter ("pa9oi(te:() ;
1334 if ( sPag6ha!6x-aoll )
1335 {
:.335 . paqelDdx=l ;
1337 )
133a
1339 {
13aO pasotndea-htE!.pu!Int (sPasetndex) ;
13r11 l
1342 sesaioo aoseioa - factoly.opn9r3ior{),
1343
13ila:. int Ei.-(FasInd*rd'lbelofR@rdsPerpaEe) - Du&blofRo@rdsprpa9,
1345 . clitria ci.t2 E .ssioa. c!atcsiteri. (Ellt)Iole, class) ;
13a6 cEit2. sotriratResult(3i) ;
13!t7 cit2. setllraiReauLt. (nurbrofaooa&Prpaqe) ;
13,18 List 12 = cri.t2.Itat0 ;
1349 Itrator it2 - L2.it!.tor0;
Paq. 19 of 20
3,t2 /2OL3
1350 Pl1ntwritr pw E res . Ctwl.its (' ,
1351 Ph.grintln { tl<centlxtabl. borta!-2 rialthE' aOS r treigbt= t 7Ot, > ) - tr
L352 Pv. PlinLrn {"<fr>") '
1353 pr . prlnt]'D ( o<tn \F!P{O<,/thxtbEl|t|!{E</th><th>SAr</thXth>DE PTNG(/th>r I
1354 Pr,PEj.ntln ( n</tr>n
);
tr355 rhir.e (1t2.basNexeo )
I
135? E ployee e 1{E!p1oFo) it2.n.rr O ;
1358 Pr.println{n<tE>n),
1359 . pw.pfiAtln (,r<t bt!+e.gattrytoyerd {} +n</t4>tr) ;
1360 . Pr. pribtlrr ( n<td>n+a.gtE4ployeeNac o +"</td>" ) ;
1361 I'w. F:antln i,,<td>n+.gltElpLol'sal o +i</tc>n ) ;
1362 Fd,p'inLtn rr<tD,,+e.gtDoPtlihbe! {) r"</rd>-, ;
1363 Pw. Frintln { 1</E>') _
1364
1355 Ps-Priltln ( r</ta!a>n) '
1366
1367 Critria c.it1 :e$sion.c!Etecritelia(Esploye.c1aes) ;
1368 critl , setP.ojectioD (l4j.otlons, oicou,r ( ) ) i
1369 Liet u. = crir1.lis!(i,
1370 rterator it1 = l1,ir.ator() i
1371 if (itl,hasNear O )
L372 {
t3?3 object o = irl.doxr();
L37 4 total1{uobelof*acolds-Iategt. parsernt (o. tost.iDg ( ));
13?s I
1376
1371 int nclofPages = tolatNuibelofRcordB/Drhbe.OfRecoldsp6.page;
13?i ii(totatNrdbelof,Reco.ds > (Dooflases * DuiberofRcordsp!;ase) )
13?9 {',
13BO DoofPaqes; = noofpags+l ;
1381 )
1382 Pw. Plintln ('<b!>r) '
13A3
13AA Pw. Printb ( tr<tab16 widlur=?ot hight!2oa>r)
;
1385 Pk,PEj.Dtln {r<tt>n) '
1386 P*.printltr ( "<td>n ) ;
1347 if (Paget.alex>1)
1388 {
1389
1390 ps.t)rinth(,,<a tEf=rs?pagindex="+{paqerndex_l)+">
1391 )'
L392
1393 {
1394 Ps.r)rintrn ( rEnbsP n) '
'
1395 l
1395 pk.PEintln ( n</d>r) '
139t PE.Println ("<td> enbsp, </td)r').
1398 I)s.pliltln (t'<t >rdbsp;</td>tr) .
1399 Pr . Plintla ( n<td>n )
1400 i-f (pagetndex <noofpas;sl
1401 {
\402 p{.I)rinrln(,r<a b!6f=)s?pagei.ndx=tr+ (paqern<!6x+1) +n>
1403 )
140r1 eIs
1405 {-
1406 In.P.iDttn (n fdbsp; n] ,
L407 )
1408 Pe. Pllntln ( "</table>n ) ,
1409 tt. Pllntln (n</cutr>n) .
1rt10 sesdior. alose () ;
1411
L4t2 l
1413
141a t
1415 factoly.closqO;
1416 sy6td. ost.piint].n { t'f.ctoly otosealn),
1t|17 )
1a18 l
lh^J""+-4 3h912o13 9t47 PM
s.thar-hjlqaate-exaEples'2.txt
Application-14(One-To-lMany Exampl)
//Parent POJO
import java.util.*;
.l
public class Vendor
{
?. private int vendorldi
t privat Skin g vsndorName;
l{r private Set customers;
],! public Set getcustomers0 {
t7 return customers;
i3 )
i4 public void setcustomers(Set customers) (
this,cuslomers = customers;
't5 I
ii public int getvendorld0 (
return vendorld;
l
publicvoid setvondorld(intvendorld){
this.vendorld = vendorld;
)
public String gewendorName{) {
return vendorName:
)
:ij.) public vold setvendorName(Stiing vendorName) {
1: thls.vndorName = vendorName;
)
a) )
ilif --------------Cu!tomer.java---------------
//chi'd PoJo
,.1 public class Customer
{
private int customerld;
private Slring customerName;
private string customerAddressi
publlc int gelcustomerld{) {
return customerld;
.:1,;
)
public void setcustomerld{int customerld) {
this.customerid = customerld;
4:i )
public String getcustomerName{) {
..1t return customerName;
t{ )
public void setCustomerName(Strins customerName) {
:'n this.customerName = customcrName;
:14
Page 1 of 31
3/'l9/2013 9:49 PM
sekhar-hibernate"xamples-2.txt
<one-to-many class="Customer"/>
</hibernate-mapping>
-------------customer.hbm.xml-------'-'---"-'
<IDOCTYPE hibernate-mapping PUBLIC "'//Hibernate/Hilrernato Mapping DTD 3 o/EN"
"httpJ/hibernate.sourceforoe.net/hibernate-maoDino-3 0 dtd">
,l' <l-- costomer.hbm.xml ->
't; <hibernate-mapping>
<class name:"Customel' table="customr">
ir) <id nam='customerld" column="cl.lstid"/>
,! <property name="customerName" column="custname" length="1 0"/>
lt <proiert! name="customerAddress" column="custadd" length="l0"F
ei|
</hibernate-mapplng>
34
import java.util.';
import org.hibernate.*;
3t import org.hibemate.cfg.';
a3 public class lnsertclient
:i9 (
public static vold main(string arss[])
r1 (
92 SessionFactory factory = new Confi quration0.confi gure0.buildSessionFactoryo;
Session session = factory.opensession0i
!.!
g5 Vendor v=new Vendoro;
,,)a v.selvendorld(1 1 1 );
v.servendorName("lBM");
/Child object-1
:,:r Cuslomer cl = new Customero;
cl.setcustomerld(501 );
cl.setcuslomerName("lNFY");
:il) cl.setc!stomerAddress("HYD");
Iill l/Child object -2
Customei c2 = new Customer0;
c2.setcustomerld(502);
c2.setcustomerName("TCS");
c2.setcustomerAddress("HYD");
,i'r' /Child object -3
Customer c3 = new c'rstome4i
c3.setcustomerld(503);
itl c3.setcustomerName("VERIZON");
I t'.4 c3.setcustomerAddress("US");
l1.-i //stepl
_i
14 Set s=new Hashset{);
irt s,add(c1);
s.add(c2);
s.add(c3);
'i0 slep2
j 1.J v.setcustomers(s);
; -?fl Transaction tx = session.beginTransaction0;
itl
ta,t tx.commito;
se5lon.close0;
124 factory.closeo;
l:Li
: i;1:
121
12s import java.util.';
t?9 import org.hibernate.*;
i30 import org.hibernate.cfg.*;
i3l public class Additionalchild
132 {
133 public statlc void main(String arsstl)
134 {
135 SessionFactory lactory = new confi guration0.conflgure0.buildsssionFactory0;
i3s session s5slon = lactory.openSession0;
Page 2 of 31
6khar-hibernat"examples-2.txt 311912013 St47 PM
t3i
Vndor v=(Vndor)session.get(Venclorclass,.lll);
i:{j //step-2
14f Set s = v.Setcustomers0;
141 //step-3
l4;l Customer c4 = nw Customer0;
143 c4.setcuslomerld(504);
.144
c4.setcustomerNarne("CTS");
r45 c4.selCustomerAddress("US");
r46
147 Transaction tx = session.beginTransactlon0;
148 s.add(c4);
149 lx-commito;
150 session.close0;
151 factory.close0;
't 52
)
153 )
154 --------------SeleclClientjava----------------
J5.5 import java.util.t;
't 5s import org.hibernale.';
157 import org.hibernate.cfg..;
158 public class Selectclient
159 {
160 public static void main(strins arssll)
l0i t
102 SessionFactory taclory = new Configuration0.configureO.buildSessionFactoryO;
16rJ session session = factory.openSessiono;
164 Vendor v= (Vendor)session.get(Vendor.class,lI1);
165 System.oul.println("Vendor nam = "+v.getvendorName0);
156 Set s = v.getcustomers0;
167 Iterator it = s.itrato{;
",tif) while(it.hasl,lextO)
{
170 object o= irnex0i
'lf1 Customer c =(Customer)o;
1t2 System.out.println{c.getCustomerld0+" "+c.getcustomerName0
'i?-1 +" ..+c.SetCustomerAdd.ess0);
174 )
lt5 session.close0i
'176 factory.close0;
177 )
1?8 )
't 79
-----------"DeleleClienl
180 import org.hibernate.*i
181 import .org.hibe.nate.cfg.';
142 public class Deletecl;ent
181 {
184 pubric stalic vojd main{Strins arsstl)
is5 (
186 SessionFactory factory=new Configuraflon().configure0.buitdSessionFactory();
187 Session session -factoryopenSesston0;
188 Vendor v=(Vendor)session.get(Vendor.ctass,l.t.t);
189 Transaction tx = session.beginTransactton0;
19{) session.derete(v);
191 tx.commit0j
192 session.close0;
factory.clos0;
194 l
'| 95
,
196
't97 Application-1 5(ManrTo-One Example)
198
199
---------vndor.ja
/Parent POJO
200
201 publlc class Vendor
202 t
203 private intvendorld;
204 private String vendorName;
Pags 3 of 31
sekhar-hibernate-examples-2.Od 311912013gtd7 PM
244
lpublic
void setcustomerName(String customrName) {
?45 this.customerName = cUstomerName;
246 )
publlc void setcustomerAddress(String customerAddress)
(
:49 thls.custome.Address=customerAddress:
2SiJ )
?5i public Sking getCustomerAddress0
2t2 {
t53 return customerAddress;
?54 )
255 )
:56 -__---____-_vendor.hbm.xml
?5? <IDOCTYPE hibernate-mapptng PUBLTC "-//Hibernate/Hibernate Mapping DTD 3.0//EN'.
2ri8 "htto:/i hibemate.so ">
;tss <l- vndo..hbm.xml ->
260 <hibemate-mapping>
261 <class name="Vendor" table="vendor,,>
i6? <id name="vendorld" column="vid'.>
:63 <generator class="assi gned../>
264
265 <property name="vendorName" cotumn=..vname'' tength=,'10../>
266
267 </hibemato-mappinE>
268
269 <IDOCTYPE hlbeinate-mapping PUBLIC "-//H;bernate/Hlbernate MappinE DTD 3.0//EN..
270 ' hltp:/hibemate.sou ,.>
271 <l- customer.hbm.xml ->
272 <hlbemate-mapping>
Pag6 4 of 31
sei(har-hibernate-e4lmples:2 txl 3/'19/2013 9:47 PM
litl ----------DeleteClint.lava--------------
tt12 import org.hibernate.*;
343 import org.hibernate.cfg.';
344 public class Deleteclient
345 {
346 public statlc void maln(String argsll)
347 {
348 Session Factory factory = 6slv Configuration0.configure0.buildSession Factory{);
34S Session session = factory.opensesslon0;
350 Customer c =(Custome.)session.get(Customer.class,50'l );
351 Transaction tx = session.beginTransactlon{);
352 session.delete(c);
353 tx.commitO;
354 session.close(h
355 factoryclose0;
356 )
357
358
35t
' Appllcation-'l 6(0ne-To-Many Bi-dkectional Example)
360 vendoriava--_---
361 //Parent POJO
362
363 lmportjava.util.*;
364 public class Vendor
365 {
366 pdvare intvendorld;
367 private String vendorName;
364 privaie Set customers;
389 public Set getcustomers0 (
3i0 return custcmers:
)
j72 public void setcustomers(Set customers) {
373 this.customers = cuslomers;
374 )
public int getvendorld0 {
376 retum vendorld,
)
378 public void sewendorld(int vendorld) (
379 this.vendorld = vendorld;
380 )
public strins setvendorNameo {
roturn vendorName;
383 )
384 publicvoid sewendorName(StringvendorName){
this.vendorName = vendorName;
386 )
387 )
-----------customer.java--------------.--
389 //chitd PoJo
3S0 /Customerjava
391 public class Customr
{
393 private int customerld;
394 private Siring customerName;
395 prlvate String customerAddress;
396 pdvate Vendor vendor;
397 public void sewendor(Vendor vendor)
398 (
39S this.vendor=vendor;
400 )
401 public Vendor gewendoo
402 (
403 return vendor;
401 I
405 p!bllc lnt EetCustomerld0 {
406 ret0rn customerld;
407 l
/t08 public void setcustomerld(int customerld) {
Page 6 oI 31
sekhar-hibernate-examples-2.txt 3h912013 g:47 PM
lhis.customerld = customerld;
)
iir" public String getcustomerNameo {
return customerName;
)
41,{ public void setcuEtomerName(String customerName) {
415 this.customerName = customerName;
416
public void setcustomerAddress(String customerAddress)
417
'
418 t
4i9 this.customerAddre6s=customerAddress;
420 )
421 public String getCustomerAddress0
422 {
tx2x return customerAddress;
424 l
427 <IDOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate tvtapping DTD 3.0//EN..
428 "http J/hibernate.sourceforoe.neuhibernate-maooinq-3.0.dtd">
4?9 <!- vendor.hbm-xml ->
430 <hibernate-mapping>
4J1 <class name= Vendor" table="vendor">
432 <id name='vendorld" column="vid">
,t33 <generator class:"assigned"/>
434
,i35 <p.operty name="vendorName" column="vnahe.. tength:'.10../>
436 <set name= customers" cascade="all" lazy='true'. inverse="true..>
'137
<key column=''venid',/>
rllB <one{o-many class="Customer,./>
l1-a
l4ir
4.{1 </hibernate-mapping>
442 ------------customer.hbm.
443 <!DOCTYPE hibernate-mapping PUBLTC .L/Hibernate/Hjbernare Mapping DTD 3.0/EN'.
41!i "httpJ/hibernate.sourceforqe,neuhibernate-maooinq-3.0.dtd">
4-1! <l-- customer.hbm-xml
->
44rj <hibernate-mapping>
<class name= Customea' tabte="custome/'>
<id name="customerld" column="custid >
449 <generator class="assigned'l>
45t
45r <property name=rrcustomerName- column="custname.. tength=..10"/>
<property name="customerAddress" column= custadd'. tength:"10,,/>
453 <many-lo-one name="vendor" class="Vendor" cotumn="venia.' cascade:-afi,,
45.: lazy= proxy''/>
455 </class>
45ij </hibernate-mapping>
4c: ------------lnsedctient.java--------------
45u import java.util.*;
459 import org.hibernate."i
4L;C import o.g.hibernate.cfg..i
ilB i public class lnsertclint
482 |
463 public stalic void mah(Strins arsslt)
4$4 (
465 SessionFactory faclory = new Confi guration0.confi gureo.buitdSssionFactoM);
46{i Session session = factoryopenSession0;
467 //Parent ob.ject
46li Vendor v=new Vendoro;
469 v. stVendorld( 1 1 'l ):
470 v.setvendorName("lBM");
//Child object-1
472 Customer c1 = new Customer{);
473 c'l.setcustomerld{501);
c1-setcustomerName("lNFY");
475 cl.setcustomerAdd106s("HYD");
476 ,Child object -2
Page 7 of 3l
sekhar-hibernatFer 311912c139.41PM
rir;' Customer c2 = new Custome4;
1,T i! c2.setcustomerld(502);
c2.setcustomerName("TCS");
48{l c2.setcustomerAcldress{"HYD");
481 //Child object -3
4&2 Customer c3 = new Customer0;
483 c3.setcustomorld(503);
484 c3.setcustomerName("VERIZON");
485 c3.selCustomerAddress("US");
486
487 cl .setvendor(v);
488 c2.setvendo.(v);
48S c3.sewendo(v);
490
491
492 Set s=new Hashseto;
493 s.add(ci);
4lr4 s.add(c2);
495 s.add(c3);
ds6 llstep2
497 v.setcustomers(s);
498 Transaclion tx = sesslon.besinTransactlon0;
499 session.save{cl); I 6@'l'a tavt( vt
500 tx.commil0;
501
502 factoryclose0;
503
504
505
506 Application-1 7(ManrTo-Many Example)
5U7 -------------sludent.iava-----"-------
50B importjava.util.';
509 public class Student
510 {
51'l Pnvate int studentld;
p.ivate String studentName;
5i3 private Sking studentcrp;
5i4 private Set courses;
515 public Set getcourses0 {
516 return courses;
5'17 )
518 public void setcourses(Set courses) (
519 this.courses = courses;
520 )
public String getstudentcrp0 |
return studentGrp;
523 )
524 public void setStudentGrp(string studentGrp) {
525 this.studentcrp = stuctenlcrp;
i26 )
5?7 public jnt getstudentld(l {
518 return studentld;
5t9 )
530 public void setstudentld(int studenfld) {
53i this.studentld = studenild;
)
public String getstudentName() (
return studantName;
l
5it public void setstudentName(String studentName) {
537 this.sludentName = studentName;
538 )
540
541 importjava.util.';
542 publicclass Course
543 {
544 private int courseld;
Page 8 of 31
t-
9e!har-hi!ernate-eIan!ples-2.lxt 3h9/2013 9:47 PM
.ti' private Sking courseName;
:r' private int aluration;
. privale Sel students;
54.i public intgetcourseld0 {
5:i" return courceld;
5ri )
55i public void setcourseld(int courseld) {
:r. this.courseld = courseld;
5i3 )
554 public Siring getcourseName0 {
555 return courseName;
55i )
531' pulrlic void setcourseName(String cou$eName) {
551 this.courseName = courseName;
559 )
56fl public int getDuratlon0 {
561 return duration;
16:r )
Ji,ll iublicvold setDuration(int duration) {
I this.duralion = durationi
i1:j )
lli$ public Set getstudents0 {
return sludenls;
54s )
5il publicvoidsetstudents(Setstudents)(
57.i this.studenls = studenb;
57r l
lii.r l
.. _--_---_--_student.hbm.xmt--------____
:i,i <!DOCTYPE hibernate-mapplng PUBLIC '1l/Hibernate/Hibernale Mapping DTD 3.0//EN"
"htto J/hibernate.sourceforqe.net/hibernate-mapoino-3.0.dld">
<!- student.hbm.xml ->
<hibernate-mapping>
<class name="Student" table= student >
ti!r <id name="studentld" column="sld"/>
:i;t: <properly nams="studentName" column="sname' len gth="1 0"/>
<prcperty name="studentGrp' column="grp" len gth="1 0"/>
<set name="courses" table="students_courses" cascade:"all">
<key column="sid_lk"/>
<man!fto-many class="Course" column="cid ft "/>
5ii ) </hibernate-mapping>
Sail course.hbm.rmL--------------
;lir <IDOCTYPE hlbernate-mapping PUBLIC "-//Hibernate/Hibernate t apping OTD 3.0//EN"
"hltp://hibernal6.sourceforqe.neUhibe.nate-mapoinq-3.0.dtd">
<!-- course.hbm.xml ->
i:5: <hibernale-mapping>
5S:ii <class name="Course" table="course">
<id narne="courseld" column="cid"/>
5,1:i <proper{y name=ircourseName" column= cname" length="10,,F
<property name="duratlon"/>
ifl: <sel nams="students" table="students_courses" cascade=,,atl,i>
<ky column="cid_fl('Y>
iari <many-to-manyclas="Student" column="sid ft"/>
6C{;
6il i
6a: </hibernat-mapping>
601 -------------lnsertclientiava-------------
604 import org.hlbernate.r;
605 imporl org.hibrnate.ctq.r;
6C6 imporl java. util,';
607 public class lnsertclient
60! {
609 public static void main(Strlng args[ ])
611l {
,611 SessionFactory lactoryanew Configuratlon0.configure0.buildsesstonFactory0;
61: Sesslon session = factory.openSession{);
Pase 9 of 31
311912013 9t4TPM
//Student obj-1
ll i,l Student s1 = new Student0;
sl.setstudentld(1001);
51rj sl.setstudentName("aaa");
t"1 s'l.setstudentcrp("BTech");
alt /Student obj - 2
619 Student s2=new Student0;
6:{} s2.setstudentld('1002);
621 s2.setstudentName("bbb");
622 s2.6etsludentcrp("MCA");
623 //Gourse obj -I
624 Course c'l = new Courseo;
625 cl .setcourseld(901);
6?6 c1 -setcourseName('lava");
627 cl.setDuration(150);
6:8 //Course obj - 2
629 Course c2 = new Courseo;
630 c2.setcourseld(902);
631 c2.setcourseName("oraclo");
6ll2 c2.setDuration(100);
631 Set set = new Hashset0;
634 set.add(c1);
635 set.add(c2);
636 sl.setcourses(set);
637 s2.setcourses(set);
638 Transaction tx = session.beginTransaction0;
639
64rl session.save(s2);
64'l tx.commit0;
64.: session.close0;
543 factory.close0;
644
.i la l
a4ri --------------additionatcourseJava-
647 importorg.hibernate.';
64S importo.g.hibernate.cfg..;
f,.1 ! import java.util.'.
n5{} publicclass Additionalcourse
i:51 (
65? public static void maln(String argsll)
653 (
f5.t Sess ion Factory factory=new ConRguration0.configure0.buldSe6sionFacrory0;
e55 session session =fuctory.opensession0;
65S
657 Student s=(Student)session.get(Student.class,l 001)i
658
659 set set = s.Setcourses0;
660
l:F1 Course c3 = new Cour6e0;
iiG2 c3.setcourseld(903);
663 c3.setcourseName("Cpp");
Lta4 c3.setDuratlon(50);
ii6$ //step-4
it6{i Transaction tx = session.beginTransaction0;
n67 set.add(c3);
n68 tx.commitO;
669 session.close0;
670 factoryclose0;
671 )
672 I
1173 -------------------Deletecourse.
674 import org.hibernate.';
675 import org.hibernate.cfg..;
676 importjava.util.';
677 public class Deletecource
678 (
679 public static void main(Strlng a.gtl)
680 {
Pag'10 ot 31
a-
sekhar-hibernate-examples-2.lxt 311912013 9:47 PM
)
public void setperson(person person)
this,person=person;
)
public Person getpercono
; iil|
, l_i !
pelson.hbm.xmt------
<!DOCTY_PE hibernate-mapping pUBLtC ..-//Hibernate/Hibernate
. Mapplng DTD 3.0//EN.'
::.1 "httpJ/hib.eJnate.sourcetoro;.neuhibernate_mappinq-3.0.dtd.>
<!-- person.hbm.xmt
<hibrnate-mapping>
->
<class name= porson" table="Derson..>
<id name='.persontd,. cotum;=..pid../>
<proprty name=,,personName.. cotumn=,,pname,,
.. tength=,,10"/>
</hibernate-mapping>
---*------license.hbm.xmt____*____,__
ii <IDOCTYPE hibernate-mapptng pUBLtC
"J/Hibernate/Hibernale Mapping DTD 3.0//EN,,
ibe.nare-maopi nq-3. 0.dtd
<,"hlits4bD-;eLr-Ele.se.s:ceforo;.neuh
<hibernate-mapping>
<class name:'.Liconse- table=,,license">
<id name=..ticensetd'. cotumn=.. d,7>
<property name=..tssuedDate" cotumn=..idate../>
<property namo=lexpireDate" cotumn=..e.,are,,/>
<manFto-one nam6=-persoh,, class=.,person-
column="perrid.' untque=,,true,, noGnufl=,,true" cascado=..a .,A
</class>
</hibernat-mapping>
------------lnsrtclinl java_-______-____-___-_
import org.hibernate..;
import org.hibemate.ctE.";
class lnsertcttent
t
pubtic static void mainlstring0 args)
t
SessionFactorv facroftE new c6ntisuration0.configurc0.buildSessionFactoryl,r
Sssion session = factory.opensession{);
//Person object
Person p=new Person0;
p.setPerson td(1 i 0 t );
p.setPrsonName(.'ABC");
//License obiect
.:'
License ti= now Licenseo;
ll.setLjcensetd{1010)i
ll.settssuedDare(new Dat0);
.';ti tl.setEj(pireDate(new Date{));
/- License t2= new License0;
I2.setLicnstd(101.t );
l2.settssuedDate(new Datel)t:
1!! t2.setExpirDate(new Date{iir./
6'1t ll.selp6rson{p);
8r1 // l2.setPercon(p);
112 Transacllon tx = sescion.beginTransaction0;
;'ll session.save(tt);
!J4 //session.save(t2);
!i5 tx.commit0;
sesslon.close0;
Page 12 of 3l
seft har-hibernale-examples-2.txt 3/19/2013 9:.r7 PM
l/" factoryclose0;
.115
I ;i)
fr?0
3rl Application-ig(One-To-One with Primary koy)
822 ----------Personjava
823
324 public clas6 Person
e25 (
426 private int pe.sonld;
427 private String personName;
824 public void setPersonld(int personld)
829 {
830 thls.personld=personld;
831 )
public int getPersonldo
833 (
834 relum personld;
835 )
836 public void setPersonName(Shlng perronName)
{
this.porsonName=personName;
839 )
840 publlc Slring getPersonName0
841 (
$42 retum personName;
843 )
844 );
845 ---------Licensejava---------
846 //License.java
84? import java-utll.r;
8{n public class Llcense
849 {
850 private int licenseld;
i51 private Date lssu6dDate;
452 private Date expireDate;
B5ll private Person person;
854 public void setlicenseld(int licenseld)
8s5 (
856 thls.llcenseld=licnseld;
Page 13 of 3l
99k!qt-l !ib-9!!!!_ j9!3!!'q!e-. j?.!4 3/'19/2013 9:47rPM
:lir <idname="prsonld"column="pid"/>
r.:4 <propertyname="per5onName" column="pnarhe" length="i0'D
i::ri </hibernate-mapping>
------"------license.hbm.rml---------------
<!DOCfiPE hibernate-mapping PUBLIC 1/Hibernate/Hibernate Mapping DTO 3.0/EN"
"http;//hibernate.sourceforoe.neUhibernate-maoolnd-3.o-dtd">
<j.- license.hbm.xml ->
<hibernate-mapplng>
<class name="Licenso" table="licnse">
<ld name="licenseld" column="lid">
<generator class="foreign">
<param name="property'5person</param>
</generaior>
</hibernate-mapplng>
--------------jnserrc ent.java__---------
import java.util.*;
import org.hibernate.'l
import org.hibernate.clg.*;
class lnsertclient
i public static void main(Stringfl args)
t
SessionFactory factorF new Configuration0.configureO.buildSessionFactorl);
Session session = factory.opensessiono;
//Pe.son olrject
\'- t Person p=new Person(l'
tii(: p.setPersonld{1 I 0'l );
:j 27 p.setPersonName("ABC");
1?at //License objecr
l?9 License l= new Licens0;
t3i) l.setlssuedoat(new Date{));
.r l1 l.setExp'reDa.te(new Date0);
l.setPerson(p)i
Transaction tx = session.beSinTransaction0;
:134 session.save(l);
935 tx.commito;
tl$ sesslon.close0;
factory.close0;
:': l
94!
j' Application-2o(component mapping example)
!r"i? ----------Person.ja
'!43
94,r import java.utll.*;
lzi5 p0blic class Person
946 {
347 priwte lnt personldi
948 p vate PName pname;
145 privato Dato dob;
e50 public void setPersonld(int personld)
t;41
{
t52 thls.personld:personld;
Page 14 of 31
l-
seldarifibernate-examples-2.txt 3/'19/2013 9:47 PM
95:i: )
,.i54: public int getPersonld0
s35 {
d56 return personld;
s51 l
95S publlc vold setPname(PName pnade)
95S {
96{l this.pname=pname;
96r )
962 public PName setPname0
963 {
S64 return pname:
965 )
966 publlc void setDob(Dale clob)
967 I"
S6S this.dob=dob;
969 )
970 public Date getDobo
971 {
972 return dob;
971 )
974 );
975 -----------PName.java-------------
976 //PName.java
977 public class PName
978 {
979 private char initial;
980 p vate Stdnq firstName;
S81 privale Shlng lastName;
$8t public void setlnitial(char initial)
063 {
984 this.inirial=initial;
s85 )
986 public char setlnilial{)
987 {
S88 return inltial;
gnr )
irt, publicvoldsetFirslName(StringfirstName)
{i91 {
9S?
,)93 l lhis.firstName=llrstName;
9S4 public String getFirstName0
;95 {
996 return firstName;
Page l5 of 31
a-
sekhar-hibelnate-examples-2.txt 311912013 9t47,PM
</hibernate-mappinq>
Pag6 16 of 31
sei(har-hibernate-examples-2.txi 311912013 9:47 PM
Page 17 ol 31
sekhar-hibernate-examoles-2.txt 3/19/2013 9:47?1,
Page l8 of 31
l-
sekhaFhibernate-examples-2.t,(t 3/19/2013 9:47 PM
-----------Payment.j
import javax.persistence.';
12itl @Entity
@Table(name="PAYMENT")
@lnheritance(strategFlnheritanceType.JOlNED)
1i1l public class Payment
'i 23i (
@td
l?34 @Column(name="payld")
i235 private lnteger P4,mentld;
r216 @Column{name="amount"}
1237 private Double amount;
public Double setAmount0 {
1?39 relurn amount;
12llit l
1?4 ! publlc void setAmount(Double amount) (
this.amoht = amount;
l?lri )
public lnteger getPaymentld() (
l)tj, return paymentld;
12,16 l
t712 public void setPaymentld(lnteger payrnentld) (
124n this.paymentld = paymentld;
ti24i )
1_r:n )
t?tl ----------CreditCardPayment.java----
j-
't2t //CreditcardPaymentjava
import iavax.persistence.';
1?:1,' @Entity
@Table{name="cREDlT_TABLE")
@PrimaryKeyJoincolumn(nam:"pid")
public class CreditcardPayment extendE Payment
?5rr {
't7.tt @Golumn(name="cctypo",length=f 0)
private String cardType;
public strins setcardType0 {
:]..,.j. return cardType;
li,i )
public void setcardType(String cardType) {
this.cardType = cardType;
)
'il;$n l-----.--------ChequePaymentjava---
'i?t! //ChequePalmentjava
??ir import javax.persistence.";
' 17i @Entity
:.ri'l @Table(name:"CHEQUE_TABLE'J
:r': @PrimaryKeyJoinColumn{name="p_id")
,2 ',1 public class ChequePaymenl xtnds Payment
itirj {
iiiiii @Golumn(name="chtype",length='10)
: t) private String chequeType;
i !i. pu blic String getchequeType0 (
jLllr return chequeType;
r!1{r }
1,:l: publicvoidsetchequeType(StringchequeTyp)(
,o this.chequeType = chequeTypei
i;:tir l
12tt4 |
I ?61
-------------lnsertclientjava----
1?86 import org.hibernate.*;
1?34 importorg.hibernate.cfg.";
i288 publicclass lnsertclieni
i289 {
1?9t publicstatic void main(String0 arys)
'-l (
?lj2
'|
Sesslon Faclory factory = new Configuration0.configure().bulldsesslonFactory0i
Page 19 of 31
l-
sekhar-hibernate-e!9mples-2.lrl 3/19/2013 S:47FM
Session session=factory.openSession0;
CredilcardPayment ccp = new CreditcardPayment0;
illl: ccp-setPayrnentld(1 01 );
l-t!a ccp.setAmount(5000.0);
tr97 ccp.setcardType("vlsA");
i;98 ChequePayment cp:new ChequePaymento;
12S9 cp.stPaymentld('l 02);
130,i cp.stAmountl8000.0);
1:j0'l cp.setchequeType("ORDER");
1301: Transaction tx = session.besinTransaclion0;
1303 session.save(ccp);
1;104
1305 tx.cornmit0;
130{t session.close0;
1307 factory.c'ose0;
1308
1309
r:J.l{)
1311 Application-24(One-To-Many Relatlonshlp using Annotations)
131ii ---------------Vendorj
131i //Parent PoJo
13i 4
1315 import javax,persistence.';
1316 lrnportjava.util.';
'i317 @Entity
1318 @rable(name= vendor")
13i 9 public class Vendor
1']?l I
1!21 @td
1722 @column(name="vid")
'1323 private int vendorld;
@column{name="vname",lensth=10)
!32r: private Slring vendorName;
1li?6 @OneToMany(targetEntitFcustomer.class,cascade=CascadeType.ALL)
1327 @Joincolumn(name="venid",refercncedcolumnName="vid")
132? private Set cuslomersi
:12:t public Set getc!slomers0 {
r33ir rturn customers;
133t )
public void setcustomers(Set customers) {
1:i3 3 this.customers = customers;
1334 )
133 5 public int getvendorld() {
1:36 return vendorld;
1337 I
1338 public void setvendorld(int vendorld) (
1339 this.vendorld = vendorld;
134ii )
1341 public String getvendorNameo {
i:42 return vendorName;
1343 )
r!4,1 public void setvendorName(String vendorName) (
134ri this.vendorNamo = vendorName;
1346 )
1ta4l )
1348 ---------------customerjava---------------
134\ //chird PoJo
1350
1351 import javax.persistence,';
'1352 @Enlity
1353 @Table(name="customer")
1354 public class Customer
{
't356 @td
@Column(name="cu6tid-)
1353 private int customerld;
1359 @Column(name="custname",length=10)
1i6{) private Strinq customorName;
Page 20 of 31
l-
sdkhar.hiben'!ate-exaEpLes-2.lxt 3h912013 9:47 PM
@Column(name="custadd",length=1 0)
pfivate String customerAddress;
public int getcustomerldo (
return cLrstomerld;
)
public void setcustomerld(int customerld) (
: rti this.customerld = customerld;
)
riri! public String getcustomerName0 (
1'i l) return customerName;
1j.tI )
public void setCustomerName(String customerName) (
1 ..,-! ] this.customerName = customerName;
)
plblic void setcustomerAddress(String customerAddress)
t
this.customerAddress=cutomerAddress;
)
public Stnng getcustomerAddress0
l ri.til (
return cuslomerAddress;
)
i:,1:l
1384 )
--'-'------.--hibrnate.cfg.xml--------------------
<!DOCTYPE hibernat-configuration PUBLIC
'LI/Hibernate/Hibernate Confi guration DTD 3.0//EN"
"httoJ/www.hibernate.orq/dtd/hibernate-confi quration-3.0.dtd">
<l-- hibernate.cfg.xml ->
r!11 <hibernat-confi guration>
<session-facloryz
<l-- connection properties ->
<property name=r'connection.ddver_cl:ss">o.acle.jdbc.OracleDfi ver</property>
It!.i <properly name=rrconnection.url >idbc:oraclelhin:@localhost 1521 :satva</properly>
1.!.5 <properlyname="connection.username">cott</propetf>
, r11: <propertyname="connection.password">tiger</propertf>
<!- hibemate properties ->
';ll <property name:"dialect '>o.g.hibern ate.dialect.OracleDlalect<propertf,
r'i';i <propertynamo:"show_sqt">true</propertf>
'i:,r,1 <propertyname="hbm2ddt.auto">update</propertf>
iirll <l-- mapping ctasses ->
l l|r <mapplng class="Vendor"/>
<mapping class="customer"/>
1,!0,1 </session-factor]r>
l0$ </hibernat-configuration>
") . ------.------tnsertCtient.java------__
1,rt7 import java.util.';
! i lr:: import org.hibernate.*;
i,ttll import org.hibernate.cfq.*;
14lt
- ,r1
public class lnsertclient
{
id:; public slatlc void main(String args[])
r',tj I (
i , r-l SesslonFactory factory = new Configuration0.configure0.buitdsesstonFactorl);
i ri i .t Session session = factory. opensssion0;
'141t.t /Parent object
.11i Vendor v=new Vendor0;
I v.selvendorld(l l )l 'l
14,$ v.sowendorNane{"lBM");
142r /Child oblect-1
1421 Customer c'1 =new Custome i
''422 cl.setcustomerld{501);
14?3 cl.setcustomerName("lNFY );
1:i24 cl.setcustomerAddrss("HyD ');
1425 //Child ob.iect -2
i4?6 Customer c2 = new Customer{);
14?1 c2.setcustomerld(502);
r?L c2.setcuslomerName("Tcs"):
Page 2'l of 3 t
. .-:!--
iiiS
t' this-customerAddress=customerAddress;
)
publlc String getcustomerAddress0
15 l8 {
'1: l9 return customerAddrss;
1t?t) )
1ti2x ,
15?:l ------'-----hibeinate.cfg.xml
,
', <:DOCTYPE hibernate-configuration PUBLIC
i52.1 "'//Hibemate/Hlbernate ConRguration DTD 3.0/EN"
i.i:ta "hltp:/www.hibernat '5
rr,i.lil <!- hibemate.ctE.xml ->
r';?7 <hibernate-configuration>
Page 23 of 31
t-
sekhar-hibernate-examples-2.txt 311912013 9:47PM
c2-setcustomerAddress("HYD");
//Child object -3
Customer c3 = new Custome();
'I iti)l c3.setcustomedd(503);
155i1 c3.selcustomerName("VERIZON");
c3.setcustomerAddres("US");
'i5i i //add parent object to child objects
'ls?: cl.sewendo(v);
1573 c2.setvendo(v);
iJ;4 c3.setvendo(v);
1575 Transaction tx = session.besinTransactlon0i
1576 session.save(c'l);
1!;7 4 sesslon.save(c2);
1578 sesslon,save(c3l;
157$ tx.commilO;
1ti! session.close0;
1fa1 factoryclose0;
li8.l
158!
1i$,':
1585 Applicalion-26(Many-To-Many using Annotations)
rSBS Item java------------------
1587
1588 imporl java(.psrsistence.';
158t import java. util.';
1ig[l @Entity
1591 @Table(name="items")
119? public class ltem
l5t 3 {
1i94 @td
i535 @column(name="irem-id")
1-!!i private int itemld;
lirjl @Column(name:"itsm-nams",length=1 0)
1:ti{ prlvate String itemName;
i:,lJl @ManyToMany(targetErrlity=Caiegoryclass,mappedBlF'items")
Private Sst calegories;
public set setcaresories() (
ili!i; rturn categories;
I'dU3 )
'l(i04 public void selcalegories(Set categorles) {
'i6s5 this.categories = categories;
1ti06 )
public int getltemldo {
160: return itemld:
l
t6 ii) public void setltemld(int itemld) (
15t l this.itemld = itemld;
Itl t )
iatl public String getltemName0 (
1614 return itemName;
1615 )
i(r16 public void setltemName(String itemName) (
this,itemName = ltemName;
i618 )
jLi 19 )
1520 -------*-catsoryjava____-_--_-__
tt21 /Categoryjava
'1471 import javax,p6rsislence.t;
1t23 lmportjava.util.';
1e?4 @Entity
1625 @Table(name="catesorios")
prblic class Calegory
1627 {
1628 @td
r629 @Column(name="cat_id")
1630 private int calegoryld;
1e31 @Cdumn(name="cat_name",length=1 0)
10:? private Strlng categoryName;
Pase 24 ol 31
sekhar-hibernate-examples-2.txt 311912013 9:47 PM
r'ti3 @ManyToMany(targetEntitFltem.class,cascade=CascadeType.ALL)
@JoinTable(name="catesories_items",
1e35 iolnColuln:=@JoinColumnlname="cat_id_ft .,referencedCotomnName= .cal-id"),
r636 inverseJoinColumns=@JoinColumnlname=..item,id ft ",referencedCotumnName="item id))
1437 p vate set items;
1638 public int getcategoryldo {
1639 return categoryld:
1640 )
1641 public void setcategoryld(lnt categoryld) {
1642 this.categoryld = categoryld;
1643 )
1644 public Set gelltems0 {
1645 return items;
'l64ri
1647 public void setltems(Set items) {
1648
' this.items = items;
1649 )
1650 public Slring getcategoryName0 (
165tr return categoryName;
'1652 )
1553 public void setcategoryN:me(String categoryname) (
1654 this.categoryName = categoryname;
1655 )
1656 )
1657 -----_----hibemate.cfg.xmt---_____.
1658 <!DOCTYPE hibernate-confi guration PUBLI;
'I659 'LI/Hibernal/Hibernate Confi guration DTD 3.0//EN"
1460 "htto://www.hibernate. .>
166.1 <hibernate-confi guration>
166?
'1tG3 <property name="hibernate.con nection.driver_ctass..>oracte.jdbc.dr'ver.OractDriver</propert}r>
1ri04 <property name="hibernate.connection.u rt,.>idbc: oracte:th in:@tocathost:1 52 j :satva</proprty>
'1665 <property name="hibernate.connection.username..>scott</propert]r>
16$6 <property name="hibemale.connection.password..>tiger</propert}r>
1637 <property name="show_sql">true </property>
I {i0e <property name="hbm2ddt.auto">update</propertt.>
1e8S <property name=rrdialect'5org.h ibern ate.diatect.Oracte9Diatect</p.opert}r>
'i6il) <mapping class="Category"/>
16?1 <mapping class="ltem'/>
Page 25 of 31
sekhar-hibernate-xamples-2.txt 3h912O13 9.47 PM
ses.ave(cl);
ses.save(c2);
tr.commitO;
ses.close0;
:15
\14{,
Page 27 ol 31
sekhal-hibernate-exam
I
1a1i
\t,42
184:i
1844
1845 import java.utit.*;
1846 lrnport lavax.persistence..:
1847 @Entity
1848 @Table(narhe="persons..)
1849 public class Person
1850
1851
t
@rd
1852 @Colunn(name=..pid..)
private int persontd;
i854 @Embedded
1855 private PName pname:
1E5S
@Cdumn(name=..dob"l
1857 prlvate Dats dob:
1858 pubtic void setpersontd(int personld)
1859
186U this.persontd=persontd;
1861 )
1862 publtc iht getpersontd0
1863
1864 retlrn persontd;
1865
i866
)
public vojd setpname(pName pname)
l8e7
'r6{i!
this.pname=pname;
I8ri! )
1B?J publlc PNamo getpname0
1271
187ii retum pname;
1lir3
'it; )
'{ publlc void setDob(Dato dob)
1i] 15
1876 this.dob=dob:
1877 I
18?8 publlc Dale gerDob0
187S
18e0 relurn dob;
1881 )
1882 );
't883
184 //PName.java
1886 lmpon javax.persisrence_r:
1886 @Embeddabte
1887 pubtic ctass pName
1888 {
l::: @cotulnn(name="r",tensth=1)
private char initiat:
l::1
:-":'
@corumn(name=..rnarne..,rensrh=r0)
pnvate Shing firstName:
jiij 3i:',:T,l.ffffi1ffifr:;'|ensth=io)
;;; - ?otr's,v(,id ,. nrtiat(char initiat)
1897 ris.inltiat=iniUal:
1898 I
1899 pubtic char oetniti.xl
1900 ( -
1901 retum initi6t;
1902 )
1903 public void setFirstName(Strlng
1904
frstName)
{
Page 28 of 3t
l-
,99tb3t!&9Mq!e-exam ptes-z.txt
311912013 9:47 pM
lhis.fi rstName=firstName:
l'{1{i I
iiLl I public String getFhsrName0
r'uir
1909 return firsrName;
1914 )
l91 i public void setlastName(String tastName)
19i 3 this.lastName=tastName;
1914
1915 publjc String getLastNane0
1916
1917 return tastName;
1S18
1919 )
)
_-____-r,ibernate.cfs.xmt-__-_
lli9 -:-:
t;:;'-f ,il,i:.lHfi il::J"ti;"T#1i1,:,',."".f,",.,*",
'"'.,-iM=
r:-2! <hjbernare-conn;uration>
<sesslon-facrdD
:??l <r-- conn'ection proDertis _>
lYrB <propertyname='.con;eciioh.d;
iili'ifu;flsllsss$;gss;q;pffiruro;rr-,"*
;;;l jf'f,",}--1:-.'t-lection.passwo.a"'tigerad.ode;;
:"^: 1_ nrDernate properltes _>
<propertyname="diatect">org-hibernate.diatect.OracteDialect</oroDe.r!.>
:]l <prooerryname=.,show_sqt..>rrue</properrp
::: <property.name="hbm2aar.auto"'r,poaie.riroperrv,
:;;- !j_ mapPtng fit6s _>
,_':l <mappjng class=..person"/>
ll," <mappingctass=..pNam../>
ir3r </session-factorv>
1']10 </hibernate-confi;uraflon>
^'i /I :--* ------crientjava--._'---------------__-
rmport java.utit..;
",a r import orq.hihernare..:
1i,44 import org.hibernate.cfd_r:
ic45 class Ctienr
is46 {
public slatic void nain(Stringll arss'
i948 t
1C49 SssionFactory factory= 6gw grr6.
,{ 950
rtrrl
s"""i- = r"cio,y.;;;;;:#;;1"0 "onnsureo
buirdsessionFactory0:
PName """"iln pNameo.
p=new
lBi? p.serhiriat(,S.);
1r.t53 p.setFirstName(..Abc..):
iri54 p.setLastName(.,X,2"t:
195$ Person pr= new person0i
t!5(i pr.serpersontd(111);
'1357
pr serDob(new Date0);
1:ri6 //assign pNarhe obje;t prson
1ii5rl
to
pr.setpname(p);
ii4AJ Transaction Lr = session.begihTransaction0i
1S$1 sessron.save(pr);
r96.? tx.commir0;
.i{!63
sessjon.ctose0;
1964 factoryctose{);
1tr65 l
1966 )
Page 29 of 31
sekhaFhibernatg-xlqp!99r1.txt -- 3/19/2013 9:47"M
privale int employeeld;
privaie String employeeName;
privale int employeeSal:
private int deptNumber;
1.! t7 public int gelDeptNumber0 (
return deptNumber;
19t!r )
'19i;i' public void setOeptNumbe(int deptNumbe4 {
198',r th ls-deptNumbr = deplNumber;
1S8t )
l58r public String getEmployeeName0 {
1984 return employeeName;
1985 l
1986 public void stEmploteName(String employeeName) (
1537 this.employeeName = emploleeName;
1988 )
1C89 public int getEmployeeld0 {
rg9r return employeeld;
1991 )
ir.tl? public void setEmployeeld(int employeeld) {
1!!:i this.employeeld = employeeld;
1994 )
1iE5 public int getEmployeeSal0 (
1931 return employeeSal;
1$S7 )
19qe public void setEmployeSal(int employeeSal) {
1_49-q this.employeeSal = employeeSal;
zLtJ.i )
2r8n I
?,)ti: ------------"-----employee.hbm.xml
:a1l <!DOCTYPE hibe.nate-mapping PUBLIC "-/Hibernate,/Hibernate Mapping DTD 3.0//EN'.
"htlp://hibernate.sourceforqe.neUhlbernate-maipino-3.0.dtd >
l,.Lir <!- employee.hbm.xml
liiiiii <hibernate-mapping> ->
it{)'' <class name='Employee" table=,,emptoyoe.'>
u.:ritl <cache usage="read-only''/>
<id name="employeld" column="empno"/>
<properly name="employeeName" column="ename'y>
<property name="employeeSal" colunm=!tsat'./>
?,.j i;: <property name="deptNumber" column="deptno.,/>
i </hibernate-mapping>
.llt1
l': ------------,-,---hibernate.cfg.xrnt---
'lr
i9lrl <!DOCTYPE hibernate-configuratlon PUBLIC
''-l/Hibernate/Hibernate Confi guration DTD 3.o//EN,
le lr
i " httpJ/www. hibernate.orq/dtd/hibern ate-confiou ration-3.0.dtd ">
:al! <!- hibernate.cfo.xml-->
: ail, <hibernate-confisuration>
,t\j l't <session-factory>
?t::2 <!-- connection properties ->
1'12 J <property name="connection.driver_class..>oractejdbc.OracteDriver</property>
lir:lr <property name="connection.urllill9i9E9!9ltbi!.1@lqeaL!99;lljzlsaly3</propertf>
.lliii <proprtyname=iiconnection.username">scott</property>
:t::r! <propertyname="conneclion.password..>tiger</property>
?{\21 <!-- hibernate propedies ->
2l2i <propertyname="dialect">org.hibernate.diatect.OracteDiatect</property>
729 <propertyname="show_sqt'>true</property>
ii;l:fl <proprty name="hbm2ddl.auto,,>update</properttA
e
l: : <property name="hibrnale.cache.provjder-class">org.hjbernare.cachs.EhcacheProvtder</DroDerlp ,P- rL-
lu r" <!-- mrpping fifes
=\: l,.c^4./ ba.v.e.-t V,b4!-.dve. U19_ jec^J - \e'!e .e-.!-;t)^4ai"4an:-'.',
?iJ33 <mapping resource="emptoyee-hbm.xmt..D z.( p,t4f-t t7t
2034 </session-factory> +ru.p
2035 </hibernate-configuration>
:0-ql //clientjava
?952 import org.hibernate.'i
;1053 import org.hlbernate.ctg.*;
205t publlc class cllent
2r)55 {
;:056 public static void main(String args0)
2C57 t
JDJJ} SessionFaclory factory=new Confisuration0.confisu re().buildSessionFactory0;
?0t-c
:{rtiil Session sesl = factoryopensession{);
?01i1 session ses2 = factoryopensessionO;
?r62 Session ses3=factoryopsnSession0;,
r:063
2r64 Employee e1={Employee)sesl.gel(Employee.class,7876);
2065 System.out.println(ol.getEmployeeName0);
:00ri sesl.crear0;
?067 System.out.println("ossioni cleared");
?&68 el:(Employee)sosl.get(Employee.clas6,7876);
,ia\l System.out.p.intln(e'l.getEmployeeName0);
;i)7al S!6tem.out.println("==============='l;
lry
-t':'u t
Thread.sleep(6000);
ltti 4
2:i7+
'catch(Exceptlon e)
tl
:,'r! Employee e2=(EmployGe)sss2.get(EmFloyee.cla6s,7876);
SFtem.out.println{e2.gstEmployeeName{));
,i)11 S)'stem.out.ptintln("==========-==");
tital
I'J8? trv
?!81 {
Thread.sleep(6000);
r85 )
')4t6 catch(Exception e)
nlttt {}
:it1li8
it.it,i Employee e3=(Employee)ses3.get(Employee.class,7876);
il.l9{r System.out.println(e3.getEmployeeNameo);
2!-q: ses1.close0;
?rlgi.l 3es2.close0;
,:ii9i ses3.closs0;
?n94 factory.close0;
]t;5
?096
!097
Pase 3'l of 3l
I would try to update our site JavaEra.com everyday with various interesting
facts, scenarios and interview questions. Keep visiting regularly.....
Thanks and I wish all the readers all the best in the interviews.
www.JavaEra.com
A Perfect Place for All Java Resources