Time of Update: 2018-12-07
JTA實現兩階段交易認可,全域事務,對多個資料庫起作用JDBC是本地事務,只對單一資料庫起作用 Hibernate基本映射實體類 –〉表實體類中的普通屬性
Time of Update: 2018-12-07
Session flush測試:Session flush方法主要做了兩件事情:清理緩衝:執行SQL: session在什麼情況下執行flush預設在事務提交時顯示的調用flush在執行查詢前,如:iterate 在uuid情況下:save時不會發sql語句(與native不同)執行flush會立刻發出SQL,臨時集合會清理掉 資料庫隔離等級:隔離等級是否髒讀是否存在不可重複讀取是否存在幻讀Read Uncommited是是是Read commited否是是Repeatable
Time of Update: 2018-12-07
一對多關聯映射(單向Classes---àStudent): t_classesid | name1 | 尚學堂t_studentid | name | classesid1 | 10 | 12 | 祖兒 |
Time of Update: 2018-12-07
對話一:“你好,有線電視服務中心嗎?”“你好,是的,什麼可以幫到你?”“我的電視現在看不了,映像全是馬賽克,請問是什麼問題?”“我們派師傅上門檢查一下吧,可能是機頂盒壞了!”對話二:“師傅我的電視看不了是什麼情況?”“經過我的檢查是機頂盒壞了。”對話三:“你的機頂盒壞了,換這個電路版要100元,換不換?”......我有的選擇嗎?我能不換嗎?“換...換吧!”你生氣嗎?你以前看電視,除了電視機本身有問題外,會為了其它的因素而付費嗎?如果一個機頂盒兩年壞一次,一次就按照這個費用100元,那我們要為
Time of Update: 2018-12-07
多對多關聯映射單向 t_userid | name1 | 102 | 祖兒3 | 杰倫t_roleid | name1 | 資料錄入人員2 | 商務主管 3 | 大區經理t_user_roleuserid | roleid1 | 11 | 22 | 22 | 33 | 13 | 23 | 3
Time of Update: 2018-12-07
Lazy採用CGLIB可以對類進行代理用在Class: 可以取值true,false,預設trueProperty:
Time of Update: 2018-12-07
component映射 在hibernate中,component是某個實體的邏輯組成部分,它與實體的根本區別是沒有oid,component可以成為是值對象(DDD) 採用component映射的好處:它實現了物件模型的細粒度劃分,層次會更分明,複用率會更高 <class name="com.bjsxt.hibernate.User" table="t_user"> <id name="id">
Time of Update: 2018-12-07
樂觀鎖 大多數基於資料版本記錄機制(version)實現,一般是在資料庫表中加入一個version欄位讀取資料時將版本號碼一同讀出,之後更新資料時版本號碼加一,如果提交資料時版本號碼小於或等於資料表中的版本號碼,則認為資料是到期的,否則給予更新 優點:並發性比較好 T_inventory1001 nao 1000- 800 0 - 1使用者1itemNo = 1001itemName= naoquantity=1000-200=800version=0使用者2itemNo = 1001
Time of Update: 2018-12-07
hibernate抓取策略(單端代理的批量抓取) 保持預設,同fetch="select",如:<many-to-one name="classes" column="classesid" fetch="select"/> fetch="select",另外發送一條select語句抓取當前對象關聯實體或集合 使用join其實集合的lazy已經失效 hibernate抓取策略(單端代理的批量抓取) 設定fetch="join",如:<many-to-one
Time of Update: 2018-12-07
<hibernate-mapping package="com.bjsxt.drp.business.itemmgr.model"> <class name="DataDict" table="t_data_dict"> <id name="id"> <generator class="assigned"/> </id>
Time of Update: 2018-12-07
1、spring依賴庫 * SPRING_HOME/dist/spring.jar * SPRING_HOME/lib/jakarta-commons/commons-logging.jar * SPRING_HOME/lib/log4j/log4j-1.2.14.jar
Time of Update: 2018-12-07
1、spring的普通屬性注入 參見:spring文檔3.3章節 什麼是屬性編輯器,作用? * 自訂屬性編輯器,spring設定檔中的字串轉換成相應的對象進行注入 spring已經有內建的屬性編輯器,我們可以根據需求自己定義屬性編輯器 * 如何定義屬性編輯器? *
Time of Update: 2018-12-07
spring Bean的範圍: scope可以取值: * singleton:每次調用getBean的時候返回相同的執行個體 * prototype:每次調用getBean的時候返回不同的執行個體 根據名稱自動裝配<beans xmlns="http://www.springframework.org/schema/beans"
Time of Update: 2018-12-07
public class SecurityHandler implements InvocationHandler { private Object targetObject; public Object newProxy(Object targetObject) { this.targetObject = targetObject; return
Time of Update: 2018-12-07
//取毫秒級時間精度(方法一): var t1,t2:int64; r1:int64; begin t1:=GetTickCount;//擷取開始計數 WINDOWS API sleep(1000);{do...}//執行要計時的代碼 t2:=GetTickCount;//擷取結束計數值 r1:=t2-t1;//取得計時時間,單位毫秒(ms) showmessage(inttostr(r1)); end; //取毫秒級時間精度(方法二): //use DateUtils;
Time of Update: 2018-12-07
Normal 0 7.8 磅 0 2 MicrosoftInternetExplorer4
Time of Update: 2018-12-07
package junit.test;import static org.junit.Assert.*;import org.junit.After;import org.junit.AfterClass;import org.junit.Before;import org.junit.BeforeClass;import org.junit.Test;public class AnDemo { //define a test method @Test public void add() {
Time of Update: 2018-12-07
外文網站:蘋果官方開發網址iPhone Dev SDK ForumiPhone Dev Forums外文部落格:http://icodeblog.com/中文網站:cocoa china 開發討論區編譯資源:The Ultimate Toolbox for iPhone Development29 iPhone App & Website Development Resources And Tutorials
Time of Update: 2018-12-07
成功學習英語的訣竅就是那麼簡單,目標明確,多學多練,按部就班,堅持到底。5個上網免費塊學英文方案,幫你親子共學做手工,親近ABC Kizclub.com翻繪本,看書好有趣 StarFall.com聽故事,單詞好好記 BritishCouncil.org/kids打遊戲,練生活用語 FunSchool.kaboose.com看新聞,提升閱讀力 timeforkids.com/TFK/teachers七個網上免費快學英文方案,幫你循序漸進辯發音,練基本功
Time of Update: 2018-12-07
最近客戶要求在貨品資料中產生商品條碼(即EAN13,國際商品條碼),雖然系統中有商品條碼產生的工具,但是對不上號,根本無法使用,客戶的貨品資料已經有部分有條碼,更重要的是客戶要求產生商品條碼的貨品無法正常篩選出來(比如:GW開頭,或者是GM開頭,而且要求的是GW和GM後面全是數位貨品才要求產生),客戶又急著用,沒有辦法的情況下,就自己動手寫了一個小工具,雖然客戶無法使用,但是對於維護客戶的商品條碼產生,確是相當的方便,現記錄下,以便將來查看:產生EAN13條碼的SQL函數代碼:create