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: AW: AW: [sdo] SDO 3 API Cleanup - first step



Hi Ron,

To confirm, I think you meant to use the code below to traverse the instance properties of an DataObject.

List instProps = aDataObject.getInstanceProperties();
for (int i=0; i<instProps.size(); i++) {
    // Traverse all the instance properties
    aDataObject.get(i);
}


Without get(int) method, one can do the same thing like the code below.  Not as pretty as the one above but is this the only use scenario?  I personally never used interger indexed property for retrieving some specific property value because I have no way of knowing it up front.  I don't know what others' experiences are.

List instProps = aDataObject.getInstanceProperties();
for (int i=0; i<instProps.size(); i++) {
    // Traverse all the instance properties
    aDataObject.get(((Property)instProps.get(i)).getName());
}

Fuhwei Lwo



"Barack, Ron" <ron.barack@sap.com>

03/18/2008 07:54 AM

To
"Frank Budinsky" <frankb@ca.ibm.com>, <sdo@lists.oasis-open.org>
cc
Subject
AW: AW: [sdo] SDO 3 API Cleanup - first step





Hi Frank,

The generic forms of the getters are not simply convenience methods, they represent significant functionality: data type conversion, namely.

By a "toString" method, I meant anything where you want to iterate over the (instance) properties of an object.  This is not something you can do with get(String,...) methods.

Ron


-----Ursprüngliche Nachricht-----
Von: Frank Budinsky [mailto:frankb@ca.ibm.com]
Gesendet: Dienstag, 18. März 2008 15:04
An: sdo@lists.oasis-open.org
Betreff: Re: AW: [sdo] SDO 3 API Cleanup - first step

Hi Ron,

I'd like to make the core DataObject interface as simple as possible to
start with (that's the interface I sent out), and have a discussion about
whether any of the rest of the methods are really needed. I'd be happy to
add them back, before this exercise is complete, but I think it's
important to go through the exercise and really convince ourselves that we
need a lot of the methods that I believe are very rarely used.

I see SDO3 as an opportunity similar to what happened with EJB3 -
simplify! I think the answer to backward compatibility is to make sure the
2.1 and 3.0 interfaces don't conflict, as I mention in the doc file I sent
in my previous email.

> Can you provide some clarifications why the index accessors are removed?
> Is this something that you feel is not used in SDO 2.1?

Other than samples, I've never seen anyone use them.

> I notice that get(Property) is there, but there is no T
get(Property,Class<T>). > Is this intentional?

My logic is that they are simply convenience methods (with a significant
performance implication). The property methods are really there for
performance reasons (otherwise, why not always use the string methods?),
so they seem like a contradiction. I'm very open to be convinced
otherwise.

Can you explain what you mean by using the index methods to "implement
some kind of toString method"?

Thanks,
Frank




"Barack, Ron" <ron.barack@sap.com>
03/17/2008 07:52 PM

To
Frank Budinsky/Toronto/IBM@IBMCA, <sdo@lists.oasis-open.org>
cc

Subject
AW: [sdo] SDO 3 API Cleanup - first step






Hi Frank,

Can you provide some clarifications why the index accessors are removed?
Is this something that you feel is not used in SDO 2.1?

I notice that get(Property) is there, but there is no <T> T
get(Property,Class<T>).  Is this intentional?  When you are putting in
generics, it's bad form to force people to cast.

Since we don't yet have a solution for namespaces in XPaths, I'm not so
comfortable with removing the Property based interface, and I think the
index based interface is useful too, for instance, when implementing some
kind of toString() method.

Ron


________________________________

Von: Frank Budinsky [mailto:frankb@ca.ibm.com]
Gesendet: Mo 17.03.2008 21:28
An: sdo@lists.oasis-open.org
Betreff: [sdo] SDO 3 API Cleanup - first step



Hi guys,

I've taken a pass at defining a new SDO 3 version of DataObject. You may
hardly recognize it :-) It's gone down from 119 to 24 methods (one of
which is new). The main changes are:

1) move from package commonj.sdo to org.oasis.sdo
2) use Java 5 generics
3) deprecate/remove int-based accessors and a couple of other methods
4) rename some methods to avoid name collisions with SDO 2.1 and static
SDOs

I've attached the new proposed interface, and a short doc file that
includes a table that shows all the changes being proposed.

If possible, I would like to spend 20 min or so of tomorrow's call talking
about this.

Thanks,
Frank







---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail.  You may a link to this group and all your TCs in OASIS
at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php


---------------------------------------------------------------------
To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail.  You may a link to this group and all your TCs in OASIS
at:
https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php




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