In addition I do not know how to do a list mapping in the best way:

 Query ObjectList(ObjectType As %Integer, ReferencedObject As %Integer,
Reference As %Integer) As %SQLQuery(CONTAINID = 1)
{
    SELECT GAS.Object.ID, GAS.Object.NameDe FROM GAS.Object,
GAS.ObjectReference
... here is only SQL allowed (proxy must be done later ?
}

<CSP:QUERY with the "base object class" ...


how to map result set to the proxy class ?

use a Object-Loop and call the Proxy Class for every Item ...

hm ...

would be happy on any hints !

werner



"Dipl.-Ing. Werner Riegler" <[EMAIL PROTECTED]> schrieb
im Newsbeitrag news:[EMAIL PROTECTED]
> Hi Peter,
>
> I have a question to your idea with the proxy classes:
>
> how can I use them in cps with
>  <CSP:OBJECT NAME="station" CLASSNAME="GAS.DisplayObject" OBJID="10014">
>
> as there is no %OpenId
>
> I know that I can also use
>  <script language="cache" runat="server">
>
> but this a little less confortable ?
>
> do you see any chance to use the csp:object tag ?
>
> by the way I messed around some time with the parameter ObjectID=
> I found in the cache book - do you know if this has any other meaning as a
> miss-typing ?
>
> brg
> werner
>
> "Peter Cooper" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]
> > Werner
> >
> > I have not tried the various things that Marvin has done in 5.0.5 for
> > various reasons I am on 5.0.4 for a while
> >
> > For the transforms you could look at making your own datatype and
> > writing a custom XSDToLogical and LogicalToXSD functions
> >
> > What are you doing with XML?
> > SOAP/Web Services or something else?
> >
> > I suspect from your questions you will end up doing proxy classes -
> > Marvin and his team do an amazing job but they are producing a general
> > purpose structure and I suspect that you will require something more
> > specific
> >
> > So some more detail on the Proxy classes
> >
> > make them registered, descended from %XML.Adaptor
> > if you have a many side (children) make these a list - not a
> > relationship, relationships are only supported by persistent classes
> >
> > and then make a getData method
> >
> > something like
> >
> > Class ClassA Extends %RegisteredObject,%XML.Adaptor
> > property p1 as %String;
> > properyt p2 as %String;
> > properyt p3 as ClassB [collection=list];
> > ===
> >
> > Class ClassB  Extends %RegisteredObject,%XML.Adaptor
> > property p1 as %String;
> > properyt p2 as %String;
> >
> > ====
> > this is a classmethod of ClassA
> > ClassMethod getData(inOBJID) as ClassA
> > set oData=##class(TheDataClass).%OpenId(inOBJID)
> > set out=..%New()
> > set out.p1=oData.SomeProp
> > set out.p2=oData.SomeOtherProp
> >
> > for i=1:1:some_counter
> > {
> >   set oLine=##class(classB).%New()
> >   set oLine.p1=Some_Data
> >   set oLine.p2=Some_Other_Data
> >   do out.p3.Insert(oLine)
> > }
> >
> >  quit out
> > ======
> > And then in a web service
> >
> > ClassMethod getTheData(inOBJID) as ClassA [Webmethod]
> > quit ##class(ClassA).getData(inOBJID)
> > ===
> >
> > this will result in a XML file that looks like
> >
> > <classA>
> > <p1>data</p1>
> > <p2>data</p2>
> > <p3>
> >    <p1>data</p1>
> >    <p2>data</p2>
> > </p3>
> > <p3>
> >    <p1>data</p1>
> >    <p2>data</p2>
> > </p3>
> > <p3>
> >    <p1>data</p1>
> >    <p2>data</p2>
> > </p3>
> > ... repeats for however many lines there are
> > and you have complete control over it
> > </classA>
> >
> > if you then need a different structure but based on the same
> > persistent data just make a new proxy to represent the structure and a
> > new getData to populate it
> >
> > you also have complete control over the projection in the proxy class
> > just make
> > property p1 as %String[xmlprojection=Attribute]
> >
> > will produce
> > <classA p1="data">
> > <p2>data</p2>
> > <p3>
> > ....
> >
> > Have fun
> >
> > Peter
> >
> > PS typed this from scratch so there will be typos but you get the idea
> >
> >
>
>



Reply via email to