it.openutils.spring.rmibernate.server.aspects
Class SerializationInterceptor

java.lang.Object
  extended by it.openutils.spring.rmibernate.server.aspects.SerializationInterceptor
All Implemented Interfaces:
net.sf.cglib.proxy.Callback, net.sf.cglib.proxy.MethodInterceptor

public class SerializationInterceptor
extends java.lang.Object
implements net.sf.cglib.proxy.MethodInterceptor

Proxy object with EntitySerializer and Intercept writeReplace calls

Version:
$Id: SerializationInterceptor.java 716 2008-03-03 14:35:57Z fcarone $
Author:
mmolaschi

Method Summary
static void clean()
          Cleans the processed beans cache
static java.lang.Object getEnhancedObject(java.lang.Object o, org.hibernate.SessionFactory sessionFactory)
          Get proxy object intercepting writeReplace calls
static java.lang.Object getEnhancedObject(java.lang.Object o, org.hibernate.SessionFactory sessionFactory, LazyReference lazyRef)
          Get proxy object intercepting writeReplace calls
static HibernateLazyService getHibernateLazyService()
          Returns the hibernateLazyService.
 int hashCode()
          
 java.lang.Object intercept(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] args, net.sf.cglib.proxy.MethodProxy proxy)
          
static void setHibernateLazyService(HibernateLazyService hibernateLazyService)
          Sets the hibernateLazyService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clean

public static void clean()
Cleans the processed beans cache


getEnhancedObject

public static java.lang.Object getEnhancedObject(java.lang.Object o,
                                                 org.hibernate.SessionFactory sessionFactory)
Get proxy object intercepting writeReplace calls

Parameters:
o - object to be proxied
sessionFactory - hibernate sessionfactory
Returns:
proxied object

getEnhancedObject

public static java.lang.Object getEnhancedObject(java.lang.Object o,
                                                 org.hibernate.SessionFactory sessionFactory,
                                                 LazyReference lazyRef)
Get proxy object intercepting writeReplace calls

Parameters:
o - object to be proxied
sessionFactory - hibernate sessionfactory
lazyRef - reference to a lazy field
Returns:
proxied object

intercept

public java.lang.Object intercept(java.lang.Object obj,
                                  java.lang.reflect.Method method,
                                  java.lang.Object[] args,
                                  net.sf.cglib.proxy.MethodProxy proxy)
                           throws java.lang.Throwable

Specified by:
intercept in interface net.sf.cglib.proxy.MethodInterceptor
Throws:
java.lang.Throwable

setHibernateLazyService

public static void setHibernateLazyService(HibernateLazyService hibernateLazyService)
Sets the hibernateLazyService.

Parameters:
hibernateLazyService - the hibernateLazyService to set

getHibernateLazyService

public static HibernateLazyService getHibernateLazyService()
Returns the hibernateLazyService.

Returns:
the hibernateLazyService

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object


Copyright © 2008 Openmind. All Rights Reserved.