}
private Object readResolve() throws ObjectStreamException {
// replace the main proxy object
if(proxyObject instanceof CatalogInfo) {
CatalogInfo replacement = replaceCatalogInfo((CatalogInfo) proxyObject);
if(replacement != null) {
proxyObject = unwrap(replacement);
}
}
// any dirty property value
if(properties != null) {
for (Entry<String, Object> property : properties.entrySet()) {
Object value = property.getValue();
if(value instanceof CatalogInfo) {
CatalogInfo replacement = replaceCatalogInfo((CatalogInfo) value);
if(replacement != null) {
property.setValue(unwrap(replacement));
}
} else if(value instanceof Collection) {
Collection clone = cloneCollection((Collection) value);