OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

sdo message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [sdo] SDO-27: Proposed API with generics and deprecated typedaccessors.

Hi Blaise,


Very interesting idea.  It’s a little more ambitious than my proposal, but it has the advantage of cleaning up the list of methods seen during code completion.  My comments:


We actually only need the methods that take common.sdo.Data as a parameter:  since DataObject extends this interface, it can be all DataObjects can be used wherever Data is used.


I’m a little disturbed that since everything that *returns* a DataObject remains unchanged, the only way to create a Data is to cast. 


The direction seems to be to (slowly) deprecate DataObject in favor of Data.


Why don’t we go a step further, and create a package “commonj.sdo3” with the clean DataObject, and with Helpers (and XMLDocument) referening this clean interface.   The package “commonj.sdo” contains interfaces that extend the classes in the sdo3 package, adding the deprecated methods.   The trick is that in Java5, subinterfaces can redefine methods in the superinterface, refining the return type.  So commonj.sdo3.helpers.DataFactory create can return a commonj.sdo3.DataObject, but commonj.sdo.helpers.DataFactory create an commonj.sdo.DataObject.  I think.  The implication is that users should remove the deprecated calls from their code, and then update their imports.  New applications start with the new packages, and never see getString and his friends.


Talk to you later,




From: Blaise Doughan [mailto:blaise.doughan@oracle.com]
Sent: Dienstag, 2. März 2010 16:27
To: Barack, Ron
Cc: sdo@lists.oasis-open.org
Subject: Re: [sdo] SDO-27: Proposed API with generics and deprecated typed accessors.


Hi Ron,

Attached is an alternate approach.  In this version the clean version of DataObject (called Data) is the super interface.  Methods that take DataObject as a a parameter now overloaded to also take Data as a parameter.


Barack, Ron wrote:

Hi Everyone,


Here is the Java API with the generic methods added, and the old typed accessors pulled up into to a deprecated super-interface.  I also pulled up the other deprecated methods.  In this version, I haven’t introduced a package named “deprecated”, the new class is simply in common.sdo, but I think we can decide to do this refactoring (or not) in the call, without completely generating the API again.


I’ve also applied the modifications (from issues 151 and 54) to XSDHelper.


Best Regards,





To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail.  Follow this link to all your TCs in OASIS at:

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]