<$BlogRSDUrl$>

Wednesday, December 15, 2004

Castor OR mapper

Alhamdulillah! Semalam, berjaya jumpa dan perbetulkan bugs yg timbul dpd penggunaan or mapper bernama castor, ver 0.9.4.3.

Masalah timbul bila saya ada satu attribute integer, tapi saya nak overload method set kpd attribute integer supaya menerima Object jenis String sekali yg mana dlm method tambahan tu, akan convert String itu kpd nilai integer. Mudah aje, tapi castor complain tentang conversion yg tak leh ia lakukan dari integer ke String semasa nak sumbat nilai2 class tu kembali ke dlm object. Nak masukkan spt insert, tak de masalah. Nak retrieve yg problem. Saya cuba letak lagi satu method set utk attribute integer tu, kali ini dgn parameter java.lang.Integer plak, jadi dah ada 3 method set utk attribute integer tersebut, setXXX(int x), setXXX(String x) dan setXXX(Integer x). Pun tak leh gak! Waduuuhh!!.

Bila fikir balik, mungkin implementation castor ini dlm reflection agak primitive, mungkin dia ambil method set yg pertama dgn parameter jenis Object dan cuba gunanya. So, saya letak method setXXX(Integer x) tu lebih awal dlm source code berbanding setXXX(String x). Walla! Berjaya! :D


Iraq

Antara kata2 menarik dlm video dlm blog entry saya yg sebelum ini:
And to the American soldiers we say, you can also choose to fight tyranny with us. Lay down your weapons, and seek refuge in our mosques, churches and homes. We will protect you. And we will get you out of Iraq , as we have done with a few others before you.

Go back to your homes, families, and loved ones. This is not your war. Nor are you fighting for a true cause in Iraq .

And to George W. Bush, we say, “You have asked us to ‘Bring it on’, and so have we. Like never expected. Have you another challenge?”


Iraqi resistance attacks on US forces. Satu lagi video. Click preview utk tengok video. File ini lagi besar, lebih kurang 17MB.

AK74 site 1

AK74 site 2

Comments: Post a Comment

This page is powered by Blogger. Isn't yours?