SDO doesn't require validation at any particular time, so it's up to the
implementation. The primary use of the createFromString() and
convertToString() methods is to support XML deserialization and
serialization respectively. We don't want to slow down load performance if
we don't need to, and since the SDO Month type's instanceClass is
java.lang.String, we simply assume it's valid and return the same string
in createFromString - see ModelFactoryImpl.createMonthFromString().
Frank
"Amita Vadhavkar" <[EMAIL PROTECTED]> wrote on 11/06/2007 08:01:49
AM:
> Object convertedObj =
> org.apache.tuscany.sdo.util.SDOUtil.createFromString(
> TypeHelper.INSTANCE.getType("commonj.sdo", "Month") , "abcd");
> System.out.println("conv month "+convertedObj+",
> "+convertedObj.getClass().getName());
>
> Is the above supposed to throw some sort of exception as "abcd" is not
in
> following "--"mm zz? pattern?
>
> I tried it and it simply gives "abcd" String with no exceptions. Trying
to
> understand what is the expected behavior.
>
> Regards,
> Amita
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]