FileDocCategorySizeDatePackage
ProxyFactory.javaAPI DocHibernate 3.2.52315Fri Feb 03 15:15:20 GMT 2006org.hibernate.proxy

ProxyFactory

public interface ProxyFactory
Contract for run-time, proxy-based lazy initialization proxies.
author
Gavin King

Fields Summary
Constructors Summary
Methods Summary
public HibernateProxygetProxy(java.io.Serializable id, org.hibernate.engine.SessionImplementor session)
Create a new proxy instance

param
id The id value for the proxy to be generated.
param
session The session to which the generated proxy will be associated.
return
The generated proxy.
throws
HibernateException Indicates problems generating the requested proxy.

public voidpostInstantiate(java.lang.String entityName, java.lang.Class persistentClass, java.util.Set interfaces, java.lang.reflect.Method getIdentifierMethod, java.lang.reflect.Method setIdentifierMethod, org.hibernate.type.AbstractComponentType componentIdType)
Called immediately after instantiation of this factory.

Essentially equivalent to contructor injection, but contracted here via interface.

param
entityName The name of the entity for which this factory should generate proxies.
param
persistentClass The entity class for which to generate proxies; not always the same as the entityName.
param
interfaces The interfaces to expose in the generated proxy; {@link HibernateProxy} is already included in this collection.
param
getIdentifierMethod Reference to the identifier getter method; invocation on this method should not force initialization
param
setIdentifierMethod Reference to the identifier setter method; invocation on this method should not force initialization
param
componentIdType For composite identifier types, a reference to the {@link org.hibernate.type.ComponentType type} of the identifier property; again accessing the id should generally not cause initialization - but need to bear in mind mappings.
throws
HibernateException Indicates a problem completing post instantiation initialization.