private void checkQueries(StructuredQueryDefinition... queries) { if (queries != null) { for (StructuredQueryDefinition query: queries) { checkQuery(query); } } } private void checkQuery(StructuredQueryDefinition query) {
private void checkQueries(StructuredQueryDefinition... queries) { if (queries != null) { for (StructuredQueryDefinition query: queries) { checkQuery(query); } } } private void checkQuery(StructuredQueryDefinition query) {
/** * Defines an AND NOT query combining a positive and negative * query. You can use an AND or OR query over a list of query * definitions as the positive or negative query. * @param positive the positive query definition * @param negative the negative query definition * @return the StructuredQueryDefinition for the AND NOT query */ public AndNotQuery andNot(StructuredQueryDefinition positive, StructuredQueryDefinition negative) { checkQuery(positive); checkQuery(negative); return new AndNotQuery(positive, negative); }
/** * Defines an AND NOT query combining a positive and negative * query. You can use an AND or OR query over a list of query * definitions as the positive or negative query. * @param positive the positive query definition * @param negative the negative query definition * @return the StructuredQueryDefinition for the AND NOT query */ public StructuredQueryDefinition andNot(StructuredQueryDefinition positive, StructuredQueryDefinition negative) { checkQuery(positive); checkQuery(negative); return new AndNotQuery(positive, negative); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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 a query within the substructure contained by an element or JSON property. * @param index the element or JSON property * @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); }
/** * 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 StructuredQueryDefinition propertiesConstraint(String constraintName, StructuredQueryDefinition query) { checkQuery(query); return new PropertiesConstraintQuery(constraintName, query); }
/** * 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); }
/** * 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); }
/** * 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 StructuredQueryDefinition not(StructuredQueryDefinition query) { checkQuery(query); return new NotQuery(query); }
/** * 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 StructuredQueryDefinition documentFragment(StructuredQueryDefinition query) { checkQuery(query); return new DocumentFragmentQuery(query); }
/** * 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); }
/** * @deprecated Matches a query within the substructure of the container specified * by the constraint. * This method is deprecated in favor of the more general * {@link #containerConstraint(String, StructuredQueryDefinition) containerConstraint()} method. * @param constraintName the constraint definition * @param query the query definition * @return the StructuredQueryDefinition for the element constraint query */ @Deprecated public ElementConstraintQuery elementConstraint(String constraintName, StructuredQueryDefinition query) { checkQuery(query); return new ElementConstraintQuery(constraintName, query); }