in src/main/java/org/apache/jackrabbit/ocm/manager/objectconverter/impl/ObjectConverterImpl.java [522:545]
private void checkNodeType(Session session, ClassDescriptor classDescriptor) {
String jcrTypeName = null;
try {
//Don't check the primary node type for interfaces. They are only associated to mixin node type
if (classDescriptor.isInterface()) {
String[] mixinTypes = classDescriptor.getJcrMixinTypes();
for (int i = 0; i < mixinTypes.length; i++) {
jcrTypeName = mixinTypes[i];
session.getWorkspace().getNodeTypeManager().getNodeType(jcrTypeName);
}
} else {
jcrTypeName = classDescriptor.getJcrType();
if (jcrTypeName != null && !jcrTypeName.equals("")) {
session.getWorkspace().getNodeTypeManager().getNodeType(jcrTypeName);
}
}
} catch (NoSuchNodeTypeException nsnte) {
throw new JcrMappingException("Mapping for class '" + classDescriptor.getClassName()
+ "' use unknown primary or mixin node type '" + jcrTypeName + "'");
} catch (RepositoryException re) {
throw new org.apache.jackrabbit.ocm.exception.RepositoryException(re);
}
}