You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2006/10/18 19:55:58 UTC
svn commit: r465350 -
/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java
Author: clombart
Date: Wed Oct 18 12:55:57 2006
New Revision: 465350
URL: http://svn.apache.org/viewvc?view=rev&rev=465350
Log:
code clean-up
Modified:
incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java
Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java?view=diff&rev=465350&r1=465349&r2=465350
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java (original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java Wed Oct 18 12:55:57 2006
@@ -588,37 +588,6 @@
}
}
-// } else if (classDescriptor.usesNodeTypePerHierarchyStrategy() && classDescriptor.hasDiscriminator()) {
-//
-// if (node.hasProperty(PersistenceConstant.DISCRIMINATOR_PROPERTY_NAME)) {
-// if (null == initializedBean) {
-// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());
-// }
-// Value propValue = node.getProperty(propertyName).getValue();
-// AtomicTypeConverter converter = getAtomicTypeConverter(fieldDescriptor, initializedBean, fieldName);
-// Object fieldValue = converter.getObject(propValue);
-// ReflectionUtils.setNestedProperty(initializedBean, fieldName, fieldValue);
-//
-// } else {
-// throw new PersistenceException("Class '" + classDescriptor.getClassName()
-// + "' have not a discriminator property.");
-// }
-// } else {
-// if (node.hasProperty(propertyName)) {
-// Value propValue = node.getProperty(propertyName).getValue();
-// // HINT: lazy initialize target bean - The bean can be
-// // null when it is inline
-// if (null != propValue && null == initializedBean) {
-// initializedBean = ReflectionUtils.newInstance(classDescriptor.getClassName());
-// }
-//
-// AtomicTypeConverter converter = getAtomicTypeConverter(fieldDescriptor, initializedBean, fieldName);
-// Object fieldValue = converter.getObject(propValue);
-// ReflectionUtils.setNestedProperty(initializedBean, fieldName, fieldValue);
-// } else {
-// log.warn("Class '" + classDescriptor.getClassName() + "' has an unmapped property : " + propertyName);
-// }
-// }
}
} catch (ValueFormatException vfe) {
throw new PersistenceException("Cannot retrieve properties of object " + object + " from node " + node, vfe);