You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Jan Lendholt <jl...@hotmail.com> on 2007/08/01 10:34:26 UTC

Open interface

Hey Folks, it's me again with yet another question.

I've got a Windows CE 5 mobile device. There's no discussion about getting 
other devices being able to run java apps.
So I have to deal with VB .Net / C# .NET.

I would like to do some synchronisation stuff between the mobile device and 
my cayenne app. Herefore I would like to write a web service delivering on 
demand  data to the client.
I read about the Remote funcitonality in cayenne but I guess it is not 
possible to connect this service to .Net.

Is there any open xml interface or stuff like that so I cann access the 
objects cayenne would deliver me?
Or do I have to write the protocol on my own?

Thanks again,

Jan

_________________________________________________________________
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit 
Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu! 
http://desktop.msn.de/ Jetzt gratis downloaden!


Re: Distinct

Posted by Andrus Adamchik <an...@objectstyle.org>.
Cayenne strips DISTINCT if the ResultSet contains one of the  
following columns (since most databases will not tolerate combination  
of DISTINCT and those types) : Types.BLOB, Types.CLOB,  
Types.LONGVARBINARY, Types.LONGVARCHAR


> Or is there a memory-based distinction?

Absolutely right - if DISTINCT was requested, but Cayenne had to  
strip it from the generated SQL, it would do an in memory removal of  
duplicates based on ObjectId comparison:

http://svn.apache.org/repos/asf/cayenne/main/trunk/framework/cayenne- 
jdk1.4-unpublished/src/main/java/org/apache/cayenne/access/util/ 
DistinctResultIterator.java

Andrus



On Aug 2, 2007, at 6:17 PM, Jan Lendholt wrote:
> Hey all, it's me again.
>
> i tried to set up a statement like this:
>
> SelectQuery q_catering = new SelectQuery 
> (ServiceKundeLocation.class, ExpressionFactory.matchExp 
> (ServiceKundeLocation.LID_PROPERTY, buchung.getToEvent().getLid()));
> q_catering.setDistinct(true);
>
> List caterings = Application.getApp().getContext().performQuery 
> (q_catering);
>
> Instead of getting a DISTINCT operator in the executed sql it is  
> msssing.
>
> Is there a special trick to activate the distinct clause? Or is  
> there a memory-based distinction?
>
> Thanks in advance,
>
> Jan

Distinct

Posted by Jan Lendholt <jl...@hotmail.com>.
Hey all, it's me again.

i tried to set up a statement like this:

SelectQuery q_catering = new SelectQuery(ServiceKundeLocation.class, 
ExpressionFactory.matchExp(ServiceKundeLocation.LID_PROPERTY, 
buchung.getToEvent().getLid()));
q_catering.setDistinct(true);

List caterings = Application.getApp().getContext().performQuery(q_catering);

Instead of getting a DISTINCT operator in the executed sql it is msssing.

Is there a special trick to activate the distinct clause? Or is there a 
memory-based distinction?

Thanks in advance,

Jan

_________________________________________________________________
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit 
Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu! 
http://desktop.msn.de/ Jetzt gratis downloaden!


Re: Open interface

Posted by Andrus Adamchik <an...@objectstyle.org>.
I see two ways to go about it.

1. First, quick and dirty, is to not use ROP. Just create your own  
web service with specific query methods, and serialize the results to  
XML via Cayenne XML package (or some other way).

2. Second is what Ari just described. Objective C client is using  
Hessian protocol (just as Java). You may use that or try to build  
upon the ROP-WSDL done as a part of Summer of Code 2006 by a student:

    http://svn.apache.org/repos/asf/cayenne/soc/trunk/cayenne-ropwsdl/

This exposes ROP server as a WSDL, so this is sort of a standard  
extension protocol and it may (or may not?) be easier to get the  
client going.


First option should work for most apps, as long as the client logic  
is not too complex and you do not need to commit object graphs from  
the client. The second option provides maximum client power, but  
would also require some serious dedication to implement.

Andrus





On Aug 1, 2007, at 1:27 PM, Aristedes Maniatis wrote:
>
> On 01/08/2007, at 6:34 PM, Jan Lendholt wrote:
>
>> I read about the Remote funcitonality in cayenne but I guess it is  
>> not possible to connect this service to .Net.
>
> Someone has already done some work to write a ROP Cayenne client in  
> Objective C, and Cayenne has as a design goal that other clients  
> are certainly possible. The place to start would be to look at  
> Hessian and dig up one of the many implementations of it for  
> different platforms. That is the serialisation layer and is needed  
> to get the http data stream back into objects at the remote end.
>
> After that, you'll need to examine what Cayenne ROP does (or dig up  
> that Objective C implementation) and implement that for your chosen  
> platform. IMO such a project would be welcomed by a great many  
> people and offers great promise for remote rich GUI applications.
>
> Ari Maniatis
>
>
> -------------------------->
> Aristedes Maniatis
> phone +61 2 9660 9700
> PGP fingerprint 08 57 20 4B 80 69 59 E2  A9 BF 2D 48 C2 20 0C C8
>
>


Re: Open interface

Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 01/08/2007, at 6:34 PM, Jan Lendholt wrote:

> I read about the Remote funcitonality in cayenne but I guess it is  
> not possible to connect this service to .Net.

Someone has already done some work to write a ROP Cayenne client in  
Objective C, and Cayenne has as a design goal that other clients are  
certainly possible. The place to start would be to look at Hessian  
and dig up one of the many implementations of it for different  
platforms. That is the serialisation layer and is needed to get the  
http data stream back into objects at the remote end.

After that, you'll need to examine what Cayenne ROP does (or dig up  
that Objective C implementation) and implement that for your chosen  
platform. IMO such a project would be welcomed by a great many people  
and offers great promise for remote rich GUI applications.

Ari Maniatis


-------------------------->
Aristedes Maniatis
phone +61 2 9660 9700
PGP fingerprint 08 57 20 4B 80 69 59 E2  A9 BF 2D 48 C2 20 0C C8