#27 fix to get typeconvertor to work

closed-accepted
nobody
None
5
2001-01-04
2001-01-03
Anonymous
No

net.sourceforge.osage.convertor.TypeConvertorFactory
was accessing
net.sourceforge.osage.convertor.TypeConvertorInfo
using package scope. When I created my own
TypeConvertorFactory in a different package,
I changed the TypeConvertorInfo to public scope.

Also changed
net.sourceforge.osage.util.builder.ClassBuilder
so that unrecognized field mapping types are
considered custom types instead of throwing an
unknown type exception.

Note that an xml type convertor must also be
specified in the mapping to be able to convert
AddressType <-> String.

Below is a sample mapping where com.AddressType
is an enumerated type. TypeConvertorFactory
implements the following convertors:
AddressType->Integer
AddressType->BigDecimal
AddressType->String
Integer->AddressType
BigDecimal->AddressType
String->AddressType

<field name="addressType" type="com.AddressType"
convertor="com.osage.TypeConvertorFactory">
<sql type="numeric" length="4"/>
<xml convertor="com.osage.TypeConvertorFactory"/>
</field>

Discussion

  • None

     
    Attachments
    • status: open-accepted --> closed-accepted