javaµÄ(PO,VO,TO,BO,DAO,POJO)½âÊÍ
O/R Mapping ÊÇ Object Relational Mapping£¨¶ÔÏó¹ØϵӳÉ䣩µÄËõд¡£Í¨Ë׵㽲£¬¾ÍÊǽ«¶ÔÏóÓë¹ØϵÊý¾Ý¿â°ó¶¨£¬ÓöÔÏóÀ´±íʾ¹ØϵÊý¾Ý¡£ÔÚO/R MappingµÄÊÀ½çÀÓÐÁ½¸ö»ù±¾µÄÒ²ÊÇÖØÒªµÄ¶«¶«ÐèÒªÁ˽⣬¼´VO£¬PO¡£
¡¡¡¡VO£¬Öµ¶ÔÏó(Value Object)£¬PO£¬³Ö¾Ã¶ÔÏó(Persisent Object)£¬ËüÃÇÊÇÓÉÒ»×éÊôÐÔºÍÊôÐÔµÄgetºÍset·½·¨×é³É¡£´Ó½á¹¹ÉÏ¿´£¬ËüÃDz¢Ã»ÓÐʲô²»Í¬µÄµØ·½¡£µ«´ÓÆäÒâÒåºÍ±¾ÖÊÉÏÀ´¿´ÊÇÍêÈ«²»Í¬µÄ¡£
£±£®VOÊÇÓÃnew¹Ø¼ü×Ö´´½¨£¬ÓÉGC»ØÊյġ£
¡¡¡¡POÔòÊÇÏòÊý¾Ý¿âÖÐÌí¼ÓÐÂÊý¾Ýʱ´´½¨£¬É¾³ýÊý¾Ý¿âÖÐÊý¾ÝʱÏ÷³ýµÄ¡£²¢ÇÒËüÖ»ÄÜ´æ»îÔÚÒ»¸öÊý¾Ý¿âÁ¬½ÓÖУ¬¶Ï¿ªÁ¬½Ó¼´±»Ïú»Ù¡£
£²£®VOÊÇÖµ¶ÔÏ󣬾«È·µã½²ËüÊÇÒµÎñ¶ÔÏó£¬ÊÇ´æ»îÔÚÒµÎñ²ãµÄ£¬ÊÇÒµÎñÂ߼ʹÓõģ¬Ëü´æ»îµÄÄ¿µÄ¾ÍÊÇΪÊý¾ÝÌṩһ¸öÉú´æµÄµØ·½¡£
¡¡¡¡POÔòÊÇÓÐ״̬µÄ£¬Ã¿¸öÊôÐÔ´ú±íÆ䵱ǰµÄ״̬¡£ËüÊÇÎïÀíÊý¾ÝµÄ¶ÔÏó±íʾ¡£Ê¹ÓÃËü£¬¿ÉÒÔʹÎÒÃǵijÌÐòÓëÎïÀíÊý¾Ý½âñ²¢ÇÒ¿ÉÒÔ¼ò»¯¶ÔÏóÊý¾ÝÓëÎïÀíÊý¾ÝÖ®¼äµÄת»»¡£
£³£®VOµÄÊôÐÔÊǸù¾Ýµ±Ç°ÒµÎñµÄ²»Í¬¶ø²»Í¬µÄ£¬Ò²¾ÍÊÇ˵£¬ËüµÄÿһ¸öÊôÐÔ¶¼Ò»Ò»¶ÔÓ¦µ±Ç°ÒµÎñÂß¼ËùÐèÒªµÄÊý¾ÝµÄÃû³Æ¡£
¡¡¡¡POµÄÊôÐÔÊǸúÊý¾Ý¿â±íµÄ×Ö¶ÎÒ»Ò»¶ÔÓ¦µÄ¡£
PO¶ÔÏóÐèҪʵÏÖÐòÁл¯½Ó¿Ú¡£
-------------------------------------------------
POÊdz־û¯¶ÔÏó£¬ËüÖ»Êǽ«ÎïÀíÊý¾ÝʵÌåµÄÒ»ÖÖ¶ÔÏó±íʾ£¬ÎªÊ²Ã´ÐèÒªËü£¿ÒòΪËü¿ÉÒÔ¼ò»¯ÎÒÃǶÔÓÚÎïÀíʵÌåµÄÁ˽âºÍñîºÏ£¬¼òµ¥µØ½²£¬¿ÉÒÔ¼ò»¯¶ÔÏóµÄÊý¾Ýת»»ÎªÎïÀíÊý¾ÝµÄ±à³Ì¡£VOÊÇʲô£¿ËüÊÇÖµ¶ÔÏó£¬×¼È·µØ½²£¬ËüÊÇÒµÎñ¶ÔÏó£¬ÊÇÉú»îÔÚÒµÎñ²ãµÄ£¬ÊÇÒµÎñÂß¼ÐèÒªÁ˽⣬ÐèҪʹÓõģ¬ÔÙ¼òµ¥µØ½²£¬ËüÊǸÅÄîÄ£ÐÍת»»µÃµ½µÄ¡£
Ê×ÏÈ˵POºÍVO°É£¬ËüÃǵĹØϵӦ¸ÃÊÇÏ໥¶ÀÁ¢µÄ£¬Ò»¸öVO¿ÉÒÔÖ»ÊÇPOµÄ²¿·Ö£¬Ò²¿ÉÒÔÊǶà¸öPO¹¹³É£¬Í¬ÑùÒ²¿ÉÒÔµÈͬÓÚÒ»¸öPO£¨µ±È»ÎÒÊÇÖ¸ËûÃǵÄÊôÐÔ£©¡£ÕýÒòΪÕâÑù£¬PO¶ÀÁ¢³öÀ´£¬Êý¾Ý³Ö¾Ã²ãÒ²¾Í¶ÀÁ¢³öÀ´ÁË£¬Ëü²»»áÊܵ½ÈκÎÒµÎñµÄ¸ÉÉæ¡£ÓÖÕýÒòΪÕâÑù£¬ÒµÎñÂß¼²ãÒ²¶ÀÁ¢¿ªÀ´£¬Ëü²»»áÊܵ½Êý¾Ý³Ö¾Ã²ãµÄÓ°Ï죬ҵÎñ²ã¹ØÐĵÄÖ»ÊÇÒµÎñÂß¼µÄ´¦Àí£¬ÖÁÓÚÔõô´æÔõô¶Á½»¸ø±ðÈË°É£¡²»¹ý£¬ÁíÍâÒ»µã£¬Èç¹ûÎÒÃÇûÓÐʹÓÃÊý¾Ý³Ö¾Ã²ã£¬»òÕß˵ûÓÐʹÓÃhibernate£¬ÄÇôPOºÍVOÒ²¿ÉÒÔÊÇͬһ¸ö¶«Î÷£¬ËäÈ»Õâ²¢²»ºÃ¡£
----------------------------------------------------
javaµÄ(PO,VO,TO,BO,DAO,POJO)½âÊÍ
PO(persistant object) ³Ö¾Ã¶ÔÏó
ÔÚo/rÓ³ÉäµÄʱºò³öÏֵĸÅÄÈç¹ûûÓÐo/rÓ³É䣬ûÓÐÕâ¸ö¸ÅÄî´æÔÚÁË¡£Í¨³£¶ÔÓ¦Êý¾ÝÄ£ÐÍ(Êý
Ïà¹ØÎĵµ£º
Ëõ·ÅͼÏñµÄ»ù±¾ÔÀíÊÇ´´½¨Ò»¸öÄ¿±ê´óСµÄ»²¼£¬È»ºó¶ÁȡԴͼÏñ£¬²¢½«¸ÃͼÏñ»æÖÆÕâ¸ö»²¼ÉÏ¡£ÎªÁËʹ³ÌÐòͨÓã¬Ô´Í¼ÏñºÍËõ·ÅºóµÄÄ¿±êͼÏñÓ¦Ó÷ֱðʹÓà InputStreamºÍOutputStreamÀ´±íʾ£¬´úÂëÈçÏ£º
public static void scaleImage(InputStream imgInputStrea ......
ÔÚstylesheet±êÇ©ÀïÉùÃ÷ÃüÃû¿Õ¼äºÍµ÷Ó÷½·¨£º
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:proc="${path}/packageName" exclude-result-prefixes="proc">
......
<xsl:value-of select="proc:className.methodName(param)"/>
${path}Ëæ±ãÔõÑùд¶¼¿ÉÒÔ£¬¼´Ê¹ÊǸ ......
¿Í»§¶Ë:
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.awt.*;
public class ClientPoint extends JFrame implements ActionListener,KeyListener{
static int SERVERPORT=8088;
sta ......
Javaͨ¹ýjava.lang.ThreadÀàÍê³É¶àÏ̡߳£ÎÒÃÇͨ¹ýͬһ¸öÀý×Ó£¬¿´Ï̵߳ÄÁ½ÖÖ´´½¨·½·¨£¬ÒÔ¼°ÔËÐз½·¨£º
(1)Ò»ÖÖÊÇÉùÃ÷ Thread µÄ×ÓÀ࣬ÖØÔØ Thread ÀàµÄ·½·¨ run£¨Extend java.lang.Thread and override the run method£©
public class MyThread extends Thread
{
&nb ......