@Override public void convertAnother(Object item) { Class<?> targetClass = item.getClass(); while (Enhancer.isEnhanced(targetClass) == true) { targetClass = targetClass.getSuperclass(); } Converter converter = converterLookup.lookupConverterForType(targetClass); Object realItem = HibernateProxyHelper.get(item); if (classMapper.isImmutableValueType(realItem.getClass())) { // strings, ints, dates, etc... don't bother using references. converter.marshal(item, writer, this); } else { Object idOfExistingReference = references.lookupId(realItem); if (idOfExistingReference != null) { writer.addAttribute("reference", idOfExistingReference.toString()); return; } String newId = idGenerator.next(realItem); writer.addAttribute("id", newId); references.associateId(realItem, newId); if (log.isDebugEnabled()) { log.debug("marshalling object " + realItem.getClass() + " to stream"); } converter.marshal(realItem, writer, this); } }
protected Object createReferenceKey(Path currentPath, Object item) { return idGenerator.next(item); }
protected Object createReferenceKey(Path currentPath, Object item) { return idGenerator.next(item); }
protected Object createReferenceKey(Path currentPath, Object item) { return idGenerator.next(item); }
protected Object createReferenceKey(Path currentPath, Object item) { return idGenerator.next(item); }
protected Object createReferenceKey(Path currentPath, Object item) { return idGenerator.next(item); }
protected Object createReferenceKey(Path currentPath, Object item) { return idGenerator.next(item); }
protected Object createReferenceKey(Path currentPath, Object item) { return idGenerator.next(item); }
@Override protected String createReferenceKey(final Path currentPath, final Object item) { return idGenerator.next(item); }
protected Object createReferenceKey(Path currentPath, Object item) { return idGenerator.next(item); }