HibernateDaoSupport的原始碼

2021-05-21 19:53:17 字數 1348 閱讀 2343

package org.springframework.orm.hibernate3.support;

import org.hibernate.hibernateexception;

import org.hibernate.session;

import org.hibernate.sessionfactory;

import org.springframework.dao.dataacces***ception;

import org.springframework.dao.dataaccessresourcefailureexception;

import org.springframework.dao.support.daosupport;

import org.springframework.orm.hibernate3.hibernatetemplate;

import org.springframework.orm.hibernate3.sessionfactoryutils;

public abstract class hibernatedaosupport extends daosupport

protected hibernatetemplate createhibernatetemplate(sessionfactory sessionfactory)

public final sessionfactory getsessionfactory()

public final void sethibernatetemplate(hibernatetemplate hibernatetemplate)

public final hibernatetemplate gethibernatetemplate()

protected final void checkdaoconfig()

}protected final session getsession()

throws dataaccessresourcefailureexception, illegalstateexception

protected final session getsession(boolean allowcreate)

throws dataaccessresourcefailureexception, illegalstateexception

protected final dataacces***ception converthibernateacces***ception(hibernateexception ex)

protected final void releasesession(session session)

}

ConcurrentHashMap的原始碼分析

put final v putval k key,v value,boolean onlyifabsent 在上一步的else if中 f 不為null時,則判斷f的hash值是否為moved,即 1,如果為 1,表示正在擴容 else if fh f.hash moved 協助資料遷移 tab h...

DispatcherServlet的原始碼和流程分析

1 自動配置dispatcherservlet和dispatcherservletregistry 2 註冊dispatcherservlet到servletcontext 3 初始化mvc的元件 handler執行完成後,向dispatcherservlet 返回乙個modelandview物件 ...

AbstractCollection原始碼分析

abstractcollection抽象類提供了collection的骨架實現,collection分析請看 這裡直接看它的 是如何實現的.public abstract iterator iterator 該方法沒有實現.public abstract int size 該方法沒有實現.publi...