Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy
In directory sc8-pr-cvs1:/tmp/cvs-serv947/hibernate/proxy
Modified Files:
HibernateProxyHelper.java LazyInitializer.java
Log Message:
* fixed a bug in SQLExpression
* fixed a bug in Expression.ge()
* improved proxy handling
* fixed problems with select new
* reworked import mechanism
* added <any> mappings
Index: HibernateProxyHelper.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy/HibernateProxyHelper.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** HibernateProxyHelper.java 13 Mar 2003 03:16:01 -0000 1.6
--- HibernateProxyHelper.java 29 Mar 2003 04:08:48 -0000 1.7
***************
*** 4,27 ****
import net.sf.cglib.Enhancer;
- import net.sf.hibernate.HibernateException;
- import net.sf.hibernate.engine.SessionImplementor;
-
public final class HibernateProxyHelper {
-
- /**
- * Initializes the proxy if necessary!
- */
- public static Object unproxy(Object object, SessionImplementor session) throws HibernateException {
-
- if ( object instanceof HibernateProxy ) {
- HibernateProxy proxy = (HibernateProxy) object;
- LazyInitializer li = getLazyInitializer(proxy);
- li.setSession(session);
- return li.getImplementation(); //initialize + unwrap the object
- }
- else {
- return object;
- }
- }
public static LazyInitializer getLazyInitializer(HibernateProxy proxy) {
--- 4,8 ----
Index: LazyInitializer.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/proxy/LazyInitializer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LazyInitializer.java 22 Jan 2003 13:09:19 -0000 1.5
--- LazyInitializer.java 29 Mar 2003 04:08:48 -0000 1.6
***************
*** 5,9 ****
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
- import java.sql.SQLException;
import org.apache.commons.logging.LogFactory;
--- 5,8 ----
***************
*** 35,39 ****
}
! public void initialize() throws HibernateException, SQLException {
if (target==null) {
if ( session==null ) {
--- 34,38 ----
}
! public void initialize() throws HibernateException {
if (target==null) {
if ( session==null ) {
|