As in tuscany-sdo-impl - SDOHelperImpl.createType(HelperContext,...) returns
null
if the type is already created before, result of is null for all 2nd and
later calls to createType(). Also, there is no getType(HelperContext,...) in
(lib)SDOHelper,
(lib)SDOUtil and (impl)SDOHelperImpl, which can just fetch the type already
existing
in ePackage (without creating it). Can this be provided?
Or otherwise,can createType() be modified to act as createOrGet?

If this is not provided, client code will need to do something like below.

Type root = SDOUtil.createType(hc, getDefaultURI(), "DataGraphRoot", false);
if(root == null){
   List lst = SDOUtil.getTypes(hc, uri) ;
   //iterate over the list and match
   //((Type)lst.get(i)).getName() with say "DataGraphRoot"
   //and if it matches use that type
}

Or otherwise, the client will be forced to use a new instance of
HelperContext each
time.

Am I missing something here?

Regards,
Amita

On 7/20/07, kelvin goodson <[EMAIL PROTECTED]> wrote:

Thanks, I'd be happiest to leave it until the middle of next week if that
fits with you.
Kelvin.

On 19/07/07, Raymond Feng <[EMAIL PROTECTED]> wrote:
>
> Hi, Kelvin.
>
> When do you plan to make the changes? I can help on the SCA side.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "kelvin goodson" <[EMAIL PROTECTED]>
> To: "tuscany-dev" <tuscany-dev@ws.apache.org>
> Sent: Thursday, July 19, 2007 6:48 AM
> Subject: [Java SDO, DAS and SCA] alteration to unreleased API
>
>
> > Headline message for SCA (and perhaps DAS)  -- this is notice of a
> change
> > that will require minor updates in order not to break the build
> >
> > ----
> >
> > We have 2 new things in SDO that are of significance to this message
> that
> > have come about since the beta1 release.
> >
> > 1) An improved notion of what embodies a scope for types -- the
> > HelperContext (previously the story was confused because the
TypeHelper
> > was
> > used for this purpose at times)
> > 2) Restructuring of the code so that it is clear what it Tuscany SDO
API
> (
> > i.e. Tuscany extensions as opposed to the SDO API itself)
> >
> > However, the API in the trunk still uses a TypeHelper to be passed
into
> > half
> > a dozen methods to represent the scope.  It would be an awful shame
not
> to
> > fix this,  and it would also look odd to go out with a brand new API
> that
> > already has deprecations. I have altered the API in the SDO release
> branch
> > [1].
> >
> > As far as I can tell from poking around in eclipse, SCA makes about
half
> a
> > dozen calls into the API,  so it's a small job to fix this up.  Can
> > someone
> > is SCA please liaise with me to get this done at our mutual
convenience,
> > thanks.
> >
> > Kelvin.
> >
> > [1]
> >
>
http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/lib/src/main/java/org/apache/tuscany/sdo/api/SDOHelper.java?view=diff&rev=557615&r1=557614&r2=557615
> <
>
http://svn.apache.org/viewvc/incubator/tuscany/branches/sdo-1.0-incubating/impl/src/main/java/org/apache/tuscany/sdo/helper/SDOHelperImpl.java?view=diff&rev=557615&r1=557614&r2=557615
> >
> >
>
>

Reply via email to