Friday, May 5, 2017

JSInterop for Lovefield database


I'm working on Lovefield bindings for JSInterop. While the basic stuff (init, insert, ...) works with the elemental2-promise-beta quite well, I'd like to have bindings for the Lovefield query mechanism as well.

Sadly I don't know how to write the matching Java classes. Consider the following code (adapted from

var infoCard = db.getSchema().table('InfoCard');
(infoCard.lang, lf.Order.ASC).

Here are the (stripped) Java classes so far:

@JsType(isNative = true)
public class QueryBuilder {
public native QueryBuilder from(Table table);
public native QueryBuilder orderBy(???);

@JsType(isNative = true)
public class Table {

Instances of QueryBuilder and Table are created via factories. What would be the right implementation of orderBy. As you can see the parameter has to be the property of the Table object. As far as I know, Java doesn't provid such "pointers".

Another interesting aspect would be around search conditions ( Seems like they are realized via some kind of function pointers.

Is this even possible with JSInterop or do I have to write some amount of glue code in JS-land?

Thanks in advance

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment