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

java´æ´¢¹ý³ÌµÄ´´½¨Óëµ÷ÓÃ

create or replace procedure updateProject is  
begin  
  update project p set p.total_intend_gather =   
  (select sum(ig.gather_sum) from intend_gather ig where ig.project_number=p.project_number);  
    
  update project p set p.total_actual_gather =   
  (select sum(ag.gahter_sum) from actual_gather ag where ag.project_number=p.project_number);  
    
  update project p set p.total_invoice=  
(select sum(invoice.invoice_sum) from invoice invoice  
 where invoice.intend_id in  
 (select ig.intend_id  from intend_gather ig where ig.project_number=p.project_number));  
   
end updateProject; 
Session session = this.getSession();  
Transaction tx =null;  
try {  
    tx = session.beginTransaction();  
    Connection con = session.connection();  
    String procedure = "{call updateproject() }";  
    CallableStatement cstmt = con.prepareCall(procedure);  
    cstmt.executeUpdate();  
    tx.commit();  
 
} catch (Exception e) {  
   tx.rollback();  


Ïà¹ØÎĵµ£º

»ñÈ¡javaµÄ·¾¶

¶ÔÓÚJava³ÌÐò£¬ÎÞÂÛÊÇδ´ò°üµÄ»¹ÊÇ´ò°üµÄJAR»òWARÎļþ£¬ÓÐʱºò¶¼ÐèÒª»ñÈ¡ËüÔËÐÐËùÔÚĿ¼ÐÅÏ¢£¬ÈçºÎ×öµ½ÕâÒ»µãÄØ£¿
ÔÚJava´¦ÀíµÄÎļþϵͳÖУ¬Ä¿Â¼µÄ±íʾ·½Ê½ÓÐÁ½ÖÖ£º
£¨1£©¾ø¶ÔĿ¼£¬ËüÒÔ"/"ΪÆðʼ×Ö·û£¬´ú±í´Ó¸ùĿ¼Ï¿ªÊ¼Ñ°ÕÒ¸ø³öµÄĿ¼£¬Èç/c:/java
£¨2£©Ïà¶Ô·¾¶£¬ËüÒÔ²»´ø“/”µÄĿ¼Ãû±íʾ£¬±íʾÒÔµ±Ç ......

JAVA Á¬½Ó³Ø BoneCP ²âÊÔ£¨2£© with spring 3

¶îÍâJAR°ü£º
org.springframework.expression-3.0.1.RELEASE.jar
org.springframework.asm-3.0.1.RELEASE.jar
org.springframework.beans-3.0.1.RELEASE.jar
p:statementCacheSize="100"
<bean id="masterDataSource" class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"
p:driverClass="com.m ......

javaÖеĶà̬

ÃæÏò¶ÔÏó±à³ÌÓÐÈý¸öÌØÕ÷£¬¼´·â×°¡¢¼Ì³ÐºÍ¶à̬¡£
 
    ·â×°Òþ²ØÁËÀàµÄÄÚ²¿ÊµÏÖ»úÖÆ£¬´Ó¶ø¿ÉÒÔÔÚ²»Ó°ÏìʹÓÃÕßµÄǰÌáϸıäÀàµÄÄÚ²¿½á¹¹£¬Í¬Ê±±£»¤ÁËÊý¾Ý¡£
 
    ¼Ì³ÐÊÇΪÁËÖØÓø¸Àà´úÂ룬ͬʱΪʵÏÖ¶à̬ÐÔ×÷×¼±¸¡£ÄÇôʲôÊǶàÌ¬ÄØ£¿
 
    ·½·¨µÄÖØÐ´ ......

javaÖÐÓë(&)ºÍ»ò(|)ÔËËã

System.out.println(2|0); //0010 0000 =>0010 = 2
System.out.println(2|1); //0010 0001 =>0011 = 3
System.out.println(3|2); //0011 0010 =>0011 = 3
System.out.println(3&2); //0011 0010 =>0010 = 2
/*
  ÔÚjavaÖÐ0´ú±í¼Ù, 1´ú±íÕæ
  00011|0010  ´ÓÓÒµ½×ó±È½Ï0|1 = 1, 1|0 = ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ