private ObjectQuery createObjectQuery(TupleQuery query) { return new ObjectQuery(this, query); }
/** * Creates a new query that returns object(s). */ public ObjectQuery prepareObjectQuery(String query) throws MalformedQueryException, RepositoryException { return new ObjectQuery(this, prepareTupleQuery(query)); }
/** * Creates a new query that returns object(s). */ public ObjectQuery prepareObjectQuery(QueryLanguage ql, String query, String baseURI) throws MalformedQueryException, RepositoryException { return new ObjectQuery(this, prepareTupleQuery(ql, query, baseURI)); }
/** * Creates a new query that returns object(s). */ public ObjectQuery prepareObjectQuery(QueryLanguage ql, String query) throws MalformedQueryException, RepositoryException { return new ObjectQuery(this, prepareTupleQuery(ql, query)); }
public ObjectQuery createQuery(PropertySetFactory factory) throws RepositoryException { synchronized (queries) { ObjectQuery query = queries.remove(factory); if (query != null) return query; } Class<?> type = factory.getPropertyType(); Map<String, String> properties = mapper.findEagerProperties(type); if (properties == null) return null; // TODO this should be a static string String sparql = buildQuery(properties, factory); try { TupleQuery tuples = connection.prepareTupleQuery(SPARQL, sparql); return new ObjectQuery(connection, tuples); } catch (MalformedQueryException e) { throw new RepositoryException(e); } }
public ObjectQuery createQuery(PropertySetFactory factory) throws RepositoryException { synchronized (queries) { ObjectQuery query = queries.remove(factory); if (query != null) return query; } Class<?> type = factory.getPropertyType(); Map<String, String> properties = mapper.findEagerProperties(type); if (properties == null) return null; // TODO this should be a static string String sparql = buildQuery(properties, factory); try { TupleQuery tuples = connection.prepareTupleQuery(SPARQL, sparql); return new ObjectQuery(connection, tuples); } catch (MalformedQueryException e) { throw new RepositoryException(e); } }