You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Michael Yoder <yo...@roguewave.com> on 2007/10/01 19:59:39 UTC

RE: SDO CPP - Help with retrieving the new DataObject set on a Property

Hi Adriano,

I think you should be able to use Sequence::getListIndex to find out
what a list index is, from the setting index.

Michael
Rogue Wave Software, Inc. - yoder@roguewave.com Software Developer -
HydraSDO  

-----Original Message-----
From: adrianocrestani@gmail.com [mailto:adrianocrestani@gmail.com] On
Behalf Of Adriano Crestani
Sent: Saturday, September 29, 2007 12:20 PM
To: tuscany-dev@ws.apache.org; tuscany-user@ws.apache.org
Subject: SDO CPP - Help with retrieving the new DataObject set on a
Property

Hi,

I need to do the following:

I have a settingList of a modified dataObject, there is a setting on it
that isSet=true or isNull=true, meaning that there was no previous
DataObject set on that property, and I want to retrieve the new
DataObject set on it. I can do it invoking
dataObject->getDataObject(setting.getProperty()), but if the
setting.getProperty() is many=true, I need to use dataObject->getList(
setting.getProperty()), however a list of DataObject is returned and not
only one, so how can I know which DataObject was inserted on this list?

Adriano Crestani

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: SDO CPP - Help with retrieving the new DataObject set on a Property

Posted by Adriano Crestani <ad...@apache.org>.
Hi Michael,

Thanks for your help, but I think Sequence::getListIndex would only work for
sequenced Types. I found the method Setting::getIndex that should work for
any many valued property. I took this code from Native SDO Setting
interface:

 /**  getIndex returns the index in a many-valued property
            *
            * Returns the index  of the Setting, if this is many valued
            */

          SDO_API unsigned int getIndex() const;

Thanks,
Adriano Crestani

On 10/1/07, Michael Yoder <yo...@roguewave.com> wrote:
>
> Hi Adriano,
>
> I think you should be able to use Sequence::getListIndex to find out
> what a list index is, from the setting index.
>
> Michael
> Rogue Wave Software, Inc. - yoder@roguewave.com Software Developer -
> HydraSDO
>
> -----Original Message-----
> From: adrianocrestani@gmail.com [mailto:adrianocrestani@gmail.com] On
> Behalf Of Adriano Crestani
> Sent: Saturday, September 29, 2007 12:20 PM
> To: tuscany-dev@ws.apache.org; tuscany-user@ws.apache.org
> Subject: SDO CPP - Help with retrieving the new DataObject set on a
> Property
>
> Hi,
>
> I need to do the following:
>
> I have a settingList of a modified dataObject, there is a setting on it
> that isSet=true or isNull=true, meaning that there was no previous
> DataObject set on that property, and I want to retrieve the new
> DataObject set on it. I can do it invoking
> dataObject->getDataObject(setting.getProperty()), but if the
> setting.getProperty() is many=true, I need to use dataObject->getList(
> setting.getProperty()), however a list of DataObject is returned and not
> only one, so how can I know which DataObject was inserted on this list?
>
> Adriano Crestani
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>