All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sysunite.weaver.connector.Query Maven / Gradle / Ivy

package com.sysunite.weaver.connector;

import java.util.Collection;
import java.util.List;

/**
 * Created by gijs on 03/06/16.
 */
public interface Query {
  void literalQuery(String q);

  //        query.find().then(function (result) { ... })
  List> find();

  void getValueProperties(String objectID);

  //        query.first().then(function (row) { ... })
  List first();

  //        query.count().then(function (number) { ... })
  int count();

  /*
    Below are methods specified by the original weaver connector interface. These
    are heavily based on the use of a virtuoso database however, which is not an
    abstraction.
     */
  //query.select('rel1', 'rel2')
  void filter();

  //query.filter([filters])
  void filter(Collection filters);

  //query.equalTo('rel1', 'value')
  void equalTo();

  //query.linksTo('rel1', 'toId')
  void linksTo();

  //query.ascending('rel1')
  void ascending();

  void descending();

  //        query.limit(limit)
  void limit();

  //       query.skip(skip)
  void skip();
}