FileDocCategorySizeDatePackage
SerializableProxy.javaAPI DocHibernate 3.2.52182Fri Feb 03 15:15:20 GMT 2006org.hibernate.proxy.pojo.javassist

SerializableProxy

public final class SerializableProxy extends Object implements Serializable
Serializable placeholder for Javassist proxies

Fields Summary
private String
entityName
private Class
persistentClass
private Class[]
interfaces
private Serializable
id
private Class
getIdentifierMethodClass
private Class
setIdentifierMethodClass
private String
getIdentifierMethodName
private String
setIdentifierMethodName
private Class[]
setIdentifierMethodParams
private org.hibernate.type.AbstractComponentType
componentIdType
Constructors Summary
public SerializableProxy()

public SerializableProxy(String entityName, Class persistentClass, Class[] interfaces, Serializable id, Method getIdentifierMethod, Method setIdentifierMethod, org.hibernate.type.AbstractComponentType componentIdType)

		this.entityName = entityName;
		this.persistentClass = persistentClass;
		this.interfaces = interfaces;
		this.id = id;
		if (getIdentifierMethod!=null) {
			getIdentifierMethodClass = getIdentifierMethod.getDeclaringClass();
			getIdentifierMethodName = getIdentifierMethod.getName();
		}
		if (setIdentifierMethod!=null) {
			setIdentifierMethodClass = setIdentifierMethod.getDeclaringClass();
			setIdentifierMethodName = setIdentifierMethod.getName();
			setIdentifierMethodParams = setIdentifierMethod.getParameterTypes();
		}
		this.componentIdType = componentIdType;
	
Methods Summary
private java.lang.ObjectreadResolve()

		try {
			return JavassistLazyInitializer.getProxy(
				entityName,
				persistentClass,
				interfaces,
				getIdentifierMethodName==null ?
					null :
					getIdentifierMethodClass.getDeclaredMethod(getIdentifierMethodName, null),
				setIdentifierMethodName==null ?
					null :
					setIdentifierMethodClass.getDeclaredMethod(setIdentifierMethodName, setIdentifierMethodParams),
					componentIdType,
				id,
				null
			);
		}
		catch (NoSuchMethodException nsme) {
			throw new HibernateException("could not create proxy for entity: " + entityName, nsme);
		}