Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java 6 RowSet ʹÓÃÍêÈ«ÆÊÎö(3)

Java 6 RowSet ʹÓÃÍêÈ«ÆÊÎö(3)
¹Ø¼ü×Ö: rowset
Çåµ¥ 24. Çåµ¥ 23 ÖеĴúÂëÖ´Ðнá¹û
1 Tom Tom is VIP. 2 Jim null
ÏÂÃæÒ»½ÚÀïÎÒÃǽ«»á¿´µ½ JdbcRowSet ÈçºÎ×÷Ϊһ¸ö RowSet ºÍÆäËûµÄ RowSet Ò»ÆðʹÓá£
ʹÓà JoinRowSet
Ö§³ÖµÄÁªºÏ·½Ê½
JoinRowSet ½Ó¿ÚÖжÔÎåÖÖ²»Í¬µÄÁªºÏ·½Ê½¶¼¶¨ÒåÁ˶ÔÓ¦µÄ³£ÊýºÍÅжϸÃʵÏÖÊÇ·ñÖ§³ÖµÄ·½·¨£¬ÈçϱíËùʾ¡£
±í 5. ÎåÖÖÁªºÏ·½Ê½
ÁªºÏ·½Ê½ ¶ÔÓ¦µÄ³£Êý ÅжÏÊÇ·ñÖ§³ÖµÄ·½·¨£¨·µ»Ø²¼¶ûÖµ£©
ÄÚÁ¬½Ó£¨INNER JOIN£© JoinRowSet.INNER_JOIN supportsInnerJoin()
×óÍâÁ¬½Ó£¨LEFT OUTER JOIN£©  JoinRowSet.LEFT_OUTER_JOIN supportsLeftOuterJoin()
ÓÒÍâÁ¬½Ó£¨RIGHT OUTER JOIN£©  JoinRowSet.RIGHT_OUTER_JOIN supportsRightOuterJoin() 
È«ÍâÁ¬½Ó£¨FULL OUTER JOIN£© JoinRowSet.FULL_JOIN supportsFullJoin()
½»²æÁ¬½Ó£¨CROSS JOIN£©  JoinRowSet.CROSS_JOIN supportsCrossJoin()
ͬʱ»¹ÓÐÁ½¸ö·½·¨£¬getJoinType() ·µ»Øµ±Ç°µÄÁªºÏ·½Ê½£¬setJoinType(int) ÉèÖÃÁªºÏ·½Ê½¡£ÖµµÃ×¢ÒâµÄÊÇ£¬Java 5 ºÍ Java 6 Öж¼Ö§³ÖÄÚÁ¬½Ó (INNER JOIN) ÕâÒ»ÖÖÁªºÏ·½Ê½¡£ÔÚ setJoinType ·½·¨Öд«Èë³ý Inner_Join ÒÔÍâµÄÈκÎÒ»ÖÖÁªºÏ·½Ê½¶¼»áÅ׳ö UnsupportedOperationException µÄÒì³£¡£
ÁíÍâÒ»µãÐèҪעÒâµÄ£¬ËäȻĬÈϵÄÁªºÏ·½Ê½¾ÍÊÇÄÚÁ¬½Ó£¬µ«ÊÇÔÚûÓÐÏÔʾµÄµ÷Óà setJoinType() ֮ǰµ÷Óà getJoinType() »áÅ׳ö ArrayIndexOutOfBoundsException µÄÒì³£¡£ ËùÒÔÒ»°ãÀ´½²£¬ÎÒÃÇ¿ÉÒÔ²»ÐèÒªµ÷ÓÃÕ⼸¸ö·½·¨¶øÖ±½ÓÈÏΪ JoinRowSet ĬÈϲ¢ÇÒÖ»ÔÊÐíµÄÁªºÏ·½Ê½¾ÍÊÇÄÚÁ¬½Ó(INNER JOIN)¡£
ÈçºÎÁªºÏ¸÷ÖÖ RowSet
ÁªºÏ¶à¸ö RowSet µÄ·½·¨Æäʵ¾ÍÊÇÍùÒ»¸ö JoinRowSet Àïµ÷Óà add ·½·¨Ìí¼ÓÆäËû RowSet£¨Õâ¸ö RowSet ¿ÉÒÔÊÇÉÏÃæÌáµ½µÄÎåÖÖ RowSet ÖеÄÈÎÒâÒ»ÖÖ£¬°üÀ¨ÀëÏß²Ù×÷µÄ JdbcRowSet ºÍ JoinRowSet ±¾Éí£©µÄ¹ý³Ì¡£Ìí¼ÓÒ»¸ö RowSet µÄͬʱҲ±ØÐëÖÆ¶¨ÁªºÏʱƥÅäµÄÁС£JoinRowSet ½Ó¿ÚÖÐÌṩÁËÒÔϼ¸¸ö add ·½·¨£º
addRowSet(Joinable rowset)
addRowSet(RowSet[] rowset, int[] columnIdx)
addRowSet(RowSet[] rowset, String[] columnName)
addRowSet(RowSet rowset, int columnIdx)
addRowSet(RowSet rowset, String columnName)
ÏÂÃæÊÇÒ»¸öÁªºÏÒ»¸ö JdbcRowSet ºÍÒ»¸ö CachedRowSet µÄ¼òµ¥Àý×Ó¡£
Çåµ¥ 25. ʹÓà JoinRowSet
// ¹¹ÔìÒ»¸öCachedRowSet²¢ÇÒÌî³äCUSTOMERS±íÖеÄÊý¾Ý¡£
Java´úÂë
C


Ïà¹ØÎĵµ£º

ubuntu ϵÄjava°²×°ÅäÖÃ

´ò¿ªÖÕ¶Ë£¬Ö´ÐÐÒÔÏÂÃüÁ»òʹÓÃAdept/ÐÂÁ¢µÃÈí¼þ¹ÜÀíÆ÷£¬ÔÚÆäÖзֱðËÑË÷"sun-java6-jre"ºÍ"sun-java6-jdk"²¢±ê¼Ç°²×°¡£
sudo apt-get install sun-java6-jre
Èç¹û¿Õ¼ä¸»Ô££¬½¨Òé°²×°Ò»¸öJDK¡£
sudo apt-get install sun-java6-jdk
Ìáʾ£º°²×°¹ý³ÌÖÐÐèÒªÄã»Ø´ðÊÇ·ñͬÒâʹÓÃЭÒ飨ÖÕ¶ËÖкìÀ¶É«µÄÌ ......

Java Serializable(ÐòÁл¯£©µÄÀí½âºÍ×ܽá

1¡¢ÐòÁл¯ÊǸÉʲôµÄ£¿
       ¼òµ¥Ëµ¾ÍÊÇΪÁ˱£´æÔÚÄÚ´æÖеĸ÷ÖÖ¶ÔÏóµÄ״̬£¨Ò²¾ÍÊÇʵÀý±äÁ¿£¬²»ÊÇ·½·¨£©£¬²¢ÇÒ¿ÉÒ԰ѱ£´æµÄ¶ÔÏó״̬ÔÙ¶Á³öÀ´¡£ËäÈ»Äã¿ÉÒÔÓÃÄã×Ô¼ºµÄ¸÷ÖÖ¸÷ÑùµÄ·½·¨À´±£´æobject states£¬µ«ÊÇJava¸øÄãÌṩһÖÖÓ¦¸Ã±ÈÄã×Ô¼ººÃµÄ±£´æ¶ÔÏó״̬µÄ»úÖÆ£¬ÄǾÍÊÇÐòÁл¯¡£
2¡¢Ê²Ã´Çé¿öÏ ......

Ò»¸öJava³ÌÐòÔ±Ó¦¸ÃÕÆÎÕµÄ10Ïî¼¼ÄÜ

Ò»¸öJava³ÌÐòÔ±Ó¦¸ÃÕÆÎÕµÄ10Ïî¼¼ÄÜ
1¡¢Óï·¨£º±ØÐë±È½ÏÊìϤ£¬ÔÚд´úÂëµÄʱºòIDEµÄ±à¼­Æ÷¶ÔijһÐб¨´íÓ¦¸ÃÄܹ»¸ù¾Ý±¨´íÐÅÏ¢ÖªµÀÊÇʲôÑùµÄÓï·¨´íÎó²¢ÇÒÖªµÀÈκÎÐÞÕý¡£
2¡¢ÃüÁ±ØÐëÊìϤJDK´øµÄһЩ³£ÓÃÃüÁî¼°Æä³£ÓÃÑ¡ÏÃüÁîÖÁÉÙÐèÒªÊìϤ£ºappletviewer¡¢ HtmlConverter¡¢jar¡¢ java¡¢javac¡¢javadoc¡¢javap¡¢javaw¡¢nati ......

Java classpathµÄÉèÖÃ

½ö½öÊÇÒ»¸ö΢СµÄÎÊÌâ¶øÒÑ£º
1.¿ÉÒÔÉèÖÃÒ»¸ösetcp.batµÄÎļþ£¬ÄÚÈÝÈçÏÂ
      set classpath=.;D:\StudyWorkSpace\lib\sqljdbc.jar;D:\StudyWorkSpace\lib\jfreechart-1.0.10.jar;D:\StudyWorkSpace\jfreechart\jcommon-1.0.13.jar;
ÿ´Î±àÒëJavaÎļþµÄʱºò¶¼ÒªÏÈÔËÐдËÎļþ£¬¿ÉÒÔÔÚ»·¾³±äÁ¿Àï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ