it.openutils.spring.rmibernate.server.managers
Class HibernateLazyServiceImpl

java.lang.Object
  extended by it.openutils.spring.rmibernate.server.managers.HibernateLazyServiceImpl
All Implemented Interfaces:
HibernateLazyService

public class HibernateLazyServiceImpl
extends java.lang.Object
implements HibernateLazyService

Server side implementation of remote lazy loading calls

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

Constructor Summary
HibernateLazyServiceImpl()
           
 
Method Summary
 long count(java.lang.String className, java.lang.String propertyName, java.io.Serializable id)
          Get collection size
 java.lang.Object invoke(java.lang.String className, java.lang.String methodName, java.io.Serializable id)
          Invoke remote lazy loading
 java.lang.Object invoke(java.lang.String className, java.lang.String propertyName, java.io.Serializable id, int from, int size)
          Invoke remote lazy loading
 void setSessionFactory(org.hibernate.SessionFactory factory)
          Sets the factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateLazyServiceImpl

public HibernateLazyServiceImpl()
Method Detail

invoke

public java.lang.Object invoke(java.lang.String className,
                               java.lang.String methodName,
                               java.io.Serializable id)
                        throws java.rmi.RemoteException
Invoke remote lazy loading

Specified by:
invoke in interface HibernateLazyService
Parameters:
className - name of parent class
methodName - name of property to load
id - current entity id
Returns:
loaded object / collection
Throws:
java.rmi.RemoteException - error

invoke

public java.lang.Object invoke(java.lang.String className,
                               java.lang.String propertyName,
                               java.io.Serializable id,
                               int from,
                               int size)
                        throws java.rmi.RemoteException
Invoke remote lazy loading

Specified by:
invoke in interface HibernateLazyService
Parameters:
className - name of parent class
propertyName - name of property to load
id - current entity id
from - starting row number
size - max rows to return
Returns:
loaded object / collection
Throws:
java.rmi.RemoteException - error

count

public long count(java.lang.String className,
                  java.lang.String propertyName,
                  java.io.Serializable id)
           throws java.rmi.RemoteException
Get collection size

Specified by:
count in interface HibernateLazyService
Parameters:
className - name of parent class
propertyName - name of property to load
id - current entity id
Returns:
loaded object / collection
Throws:
java.rmi.RemoteException - error

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory factory)
Sets the factory.

Parameters:
factory - the factory to set


Copyright © 2008 Openmind. All Rights Reserved.