static private void writeQueryList(XMLStreamWriter serializer, StructuredQueryDefinition... queries) throws Exception { if (queries == null) { return; } for (AbstractStructuredQuery query: convertQueries(queries)) { query.innerSerialize(serializer); } } static private void writeQuery(XMLStreamWriter serializer,
/** * Defines an OR query over the list of query definitions. * @param queries the query definitions * @return the StructuredQueryDefinition for the OR query */ public OrQuery or(StructuredQueryDefinition... queries) { checkQueries(queries); return new OrQuery(queries); }
/** * Associates a query with the content of documents (as opposed to * the properties of documents). * @param query the query definition * @return the StructuredQueryDefinition for the document fragment query */ public DocumentFragmentQuery documentFragment(StructuredQueryDefinition query) { checkQuery(query); return new DocumentFragmentQuery(query); }
/** * Specifies a geospatial region as a circle, * supplying a point for the center. * @param center the point defining the center * @param radius the radius of the circle * @return the definition of the circle */ public Circle circle(Point center, double radius) { return new Circle(center.getLatitude(), center.getLongitude(), radius); }
/** * Specifies a geospatial region as a circle, * supplying a point for the center. * @param center the point defining the center * @param radius the radius of the circle * @return the definition of the circle */ public Circle circle(Point center, double radius) { return new CircleImpl(center.getLatitude(), center.getLongitude(), radius); }
/** * Defines a NEAR query over the list of query definitions * with default parameters. * @param queries the query definitions * @return the StructuredQueryDefinition for the NEAR query */ public NearQuery near(StructuredQueryDefinition... queries) { checkQueries(queries); return new NearQuery(queries); }
/** * Associates a query with the properties of documents (as opposed to * the content of documents). * @param query the query definition * @return the StructuredQueryDefinition for the properties query */ public PropertiesQuery properties(StructuredQueryDefinition query) { checkQuery(query); return new PropertiesQuery(query); }
/** * Defines an AND query over the list of query definitions. * @param queries the query definitions * @return the StructuredQueryDefinition for the AND query */ public AndQuery and(StructuredQueryDefinition... queries) { checkQueries(queries); return new AndQuery(queries); }
/** * Matches a query within the substructure contained by an element or JSON key. * @param index the element or JSON key * @param query the query over the contained substructure * @return the StructuredQueryDefinition for the container query */ public StructuredQueryDefinition containerQuery(ContainerIndex index, StructuredQueryDefinition query) { checkQuery(query); return new ContainerQuery(index, query); }
/** * Matches a query within the substructure of the container specified * by the constraint. * @param constraintName the constraint definition * @param query the query definition * @return the StructuredQueryDefinition for the element constraint query */ public StructuredQueryDefinition containerConstraint(String constraintName, StructuredQueryDefinition query) { checkQuery(query); return new ContainerConstraintQuery(constraintName, query); }
/** * Matches the container specified by the constraint * whose geospatial point appears within one of the criteria regions. * @param constraintName the constraint definition * @param regions the possible regions containing the point * @return the StructuredQueryDefinition for the geospatial constraint query */ public GeospatialConstraintQuery geospatialConstraint(String constraintName, Region... regions) { checkRegions(regions); return new GeospatialConstraintQuery(constraintName, regions); }
/** * Defines a NOT query for a query definition. To negate * a list of query definitions, define an AND or * OR query over the list and define the NOT query over * the AND or OR query. * @param query the query definition * @return the StructuredQueryDefinition for the NOT query */ public NotQuery not(StructuredQueryDefinition query) { checkQuery(query); return new NotQuery(query); }
/** * Associates a query with the properties of documents (as opposed to * the content of documents) with the specified constraint. * @param constraintName the constraint definition * @param query the query definition * @return the StructuredQueryDefinition for the properties constraint query */ public PropertiesConstraintQuery propertiesConstraint(String constraintName, StructuredQueryDefinition query) { checkQuery(query); return new PropertiesConstraintQuery(constraintName, query); }
/** * Associates a query with durable locks on documents (as opposed to * the content or properties of documents). Such lock fragments are * created with xdmp:lock-acquire(). * @param query the query definition * @return the StructuredQueryDefinition for the locks query */ public LocksQuery locks(StructuredQueryDefinition query) { checkQuery(query); return new LocksQuery(query); }
/** * Matches an element, element pair, element attribute, pair, or path * specifying a geospatial point that appears within one of the criteria regions. * @param index the container for the coordinates of the geospatial point * @param regions the possible regions containing the point * @return the StructuredQueryDefinition for the geospatial query */ public StructuredQueryDefinition geospatial(GeospatialIndex index, Region... regions) { checkRegions(regions); return new GeospatialQuery(index, null, regions, null); } /**
/** * Matches an element, element pair, element attribute, pair, or path * specifying a geospatial point that appears within one of the criteria regions. * @param index the container for the coordinates of the geospatial point * @param regions the possible regions containing the point * @return the StructuredQueryDefinition for the geospatial query */ public StructuredQueryDefinition geospatial(GeospatialIndex index, Region... regions) { checkRegions(regions); return new GeospatialPointQuery(index, null, regions, null); } /**
static private void writeQueryList(XMLStreamWriter serializer, StructuredQueryDefinition... queries) throws XMLStreamException { if (queries == null) { return; } for (AbstractStructuredQuery query: convertQueries(queries)) { query.innerSerialize(serializer); } } static private void writeQuery(XMLStreamWriter serializer,
/** * Defines a NEAR query over the list of query definitions * with default parameters. * @param queries the query definitions * @return the StructuredQueryDefinition for the NEAR query */ public StructuredQueryDefinition near(StructuredQueryDefinition... queries) { checkQueries(queries); return new NearQuery(queries); }
/** * Associates a query with the properties of documents (as opposed to * the content of documents). * @param query the query definition * @return the StructuredQueryDefinition for the properties query */ public StructuredQueryDefinition properties(StructuredQueryDefinition query) { checkQuery(query); return new PropertiesQuery(query); }
/** * Defines an AND query over the list of query definitions. * @param queries the query definitions * @return the StructuredQueryDefinition for the AND query */ public StructuredQueryDefinition and(StructuredQueryDefinition... queries) { checkQueries(queries); return new AndQuery(queries); }