SerializableProxypublic final class SerializableProxy extends Object implements SerializableSerializable 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.Object | readResolve()
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);
}
|
|