2008 年文章归档
共 4 篇文章
Hibernate中get和load的一點點區別。
本段是摘自Java Persistence with Hibernate中文版的第299頁。 get()和 load()之間的一個區別在於它們如何表明實例無法被找到。如果数据库中不存在包含給定標識符值的行,get()就返回null。load()方法拋出一個ObjectNotFoundException 。 更重要的是,load()方法可能返回一个代理(proxy),一个占位符,而不命中数据库。这个结果就是稍后你可能得到一个ObjectNotFoundException,一旦你试图访问返回的占位符,就立即强制它初始化。(这也称作延迟加载(lazy loading))。 load()方法始终试图…
2008-12-30 11:17 · Hibernate
A simple Hibernate sample
Some days ago. I bought a book named Java Persistence with Hibernate. Now , I will show a simple sample for everybody who wanna learn the skill of Hibernate. Step one. Create a class named Message,Of course ,you should have created a project in IDE. Message.java package hello; public class Message …
2008-12-23 13:38 · SQL · JDBC · XML · Hibernate · Oracle
在网页上显示系统时间
<html> <head> <title> Show the current time </title> <script> var temp = null; var timeValue = null; function divCon() { temp = document.getElementById('thetime'); temp.innerText = "Time: " + timeValue; } var timerID = null; var timerRunning = false; function stopclock() { if(timerRunning) { clearT…
2008-12-23 08:43 · EXT · .net · F# · Microsoft · Office
周三考过SCJP了
这周三终于完成了自己的一个心愿,就是通过了SUN公司SCJP的考试。结果还不错,93%的通过率,呵呵。考试的时候还真的挺紧张,四周都是摄像头。
2008-12-20 21:44 · SUN