jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boni Gopalan \(BioImagene\)" <Bon...@bioimagene.com>
Subject org.apache.jackrabbit.ocm.manager.atomictypeconverter.impl.UndefinedTypeConverterImpl
Date Tue, 23 Sep 2008 14:55:42 GMT
To : Chris Lombart


UndefinedTypeConverterImpl is a very useful class to map Objects of type
java.lang.Object to a property.  I have one suggestion to improve the
getValue method.  At the place where you are comparing
object.getClass() == SomeMappableClass.class if you check for the
instanceof the converter will be usable for a wider variety of mappings.
Specifically there are cases where BufferInputStream need to be mapped
to a binary property. Currently to achive this convertion I am
overriding the getValue() to :


          if (propValue instanceof InputStream)


              return valueFactory.createValue((InputStream) propValue);



Such : the converter become usable for all sort of input streams.





Boni Gopalan
Manager Engineering
BioImagene, Pune



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message