it.openutils.spring.rmibernate.client.aspects
Class HibernateLazyLoaderAspect

java.lang.Object
  extended by it.openutils.spring.rmibernate.client.aspects.HibernateLazyLoaderAspect
All Implemented Interfaces:
java.io.Serializable, net.sf.cglib.proxy.Callback, net.sf.cglib.proxy.LazyLoader

public class HibernateLazyLoaderAspect
extends java.lang.Object
implements net.sf.cglib.proxy.LazyLoader, java.io.Serializable

Aspect that does remote lazy loading on cglib proxy

Version:
$Id: HibernateLazyLoaderAspect.java 716 2008-03-03 14:35:57Z fcarone $
Author:
mmolaschi
See Also:
Serialized Form

Constructor Summary
HibernateLazyLoaderAspect(java.lang.String className, java.lang.String fieldName, java.io.Serializable id, HibernateLazyService hibernateLazyService)
          Constructor
 
Method Summary
 java.lang.Object loadObject()
          
static void resetPagination()
          Disable pagination for next calls in current thread
static void setPagination(int from, int size)
          Set pagination for next calls in current thread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateLazyLoaderAspect

public HibernateLazyLoaderAspect(java.lang.String className,
                                 java.lang.String fieldName,
                                 java.io.Serializable id,
                                 HibernateLazyService hibernateLazyService)
Constructor

Parameters:
className - parent class name
fieldName - field to be lazy loaded
id - id of current entity
Method Detail

setPagination

public static void setPagination(int from,
                                 int size)
Set pagination for next calls in current thread

Parameters:
from - starting row number
size - max number of rows

resetPagination

public static void resetPagination()
Disable pagination for next calls in current thread


loadObject

public java.lang.Object loadObject()
                            throws java.lang.Exception

Specified by:
loadObject in interface net.sf.cglib.proxy.LazyLoader
Throws:
java.lang.Exception


Copyright © 2008 Openmind. All Rights Reserved.