Re: number to id
Christoph Guse <[email protected]>
| Newsgroups | gmane.comp.cms.opengroupware.xmlrpc.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Helge, I try to explain why a full enterprise ID would be convenient for me. I have a JAVA ValueObject (OgoEnterpriseVO) and a POJO (OgoEnterprise) which can insert this VO. In the OgoEnterpriseVO there is an ArrayList in which are all persons which belong to the enterprise. If I insert a completely new OgoEnterpriseVO, the XML-RPC call doesn't insert the assigned persons automatically, I have to do that manually. In the method I use to link/unlink the persons to the enterprise I use enterprise.getById and not enterprise.getByNumber. Thats why for me a full enterprise ID would be convenient. But if you say it is not possible I trust you and I have to change my source. Greets Christoph Helge Hess wrote: > On 24. Mai 2005, at 11:46 Uhr, Christoph Guse wrote: >> in my project I use enterprise.insert to insert a new Enterprise. >> This works fine and as result I get the unique number of the >> enterprise. The number is an integer and it is correct, but in my >> case it is necessary to get a full ID, i.e. "skyrix://renner.flex/ >> renner/33710" . > > Why is this necessary? All xmlrpcd actions should work fine with just > the primary key (they treat them as a relative URL to "skyrix:// > renner.flex/renner"). > >> I tried to use system.getHostName to construct the ID by myself, but >> the result of system.getHostName is "renner.flex". > > The id is _not_ the hostname, thats just the default (you need to > change it if you are running multiple instances on one machine). The > instance ID is set using the "skyrix_id" default. > >> Is the part "skyrix://" in every installation the same? > > Currently yes. It might change in future versions (to ogo:// or sth > like this ...) > >> Is the part "/renner/" always the first part of system.getHostName? > > No. > >> Is there any way to get the full ID automatically with >> enterprise.insert? > > No. You would need to fetch it. > > Maybe it makes sense to add an action which returns the instance ID, > though I fail to see what _you_ need it for. > > Greets, > Helge -- **************************************** Christoph Guse LöhstraÃe 34 41747 Viersen Tel. 0 21 62 / 50 24 066 Mobil 01 72 / 160 74 84 VoIP 0 12 12 / 39 64 48 831 **************************************** -- OpenGroupware.org XML-RPC [email protected] http://mail.opengroupware.org/mailman/listinfo/xmlrpc