com.thinkaurelius.titan.graphdb.query

## Class QueryUtil

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.query.QueryUtil

-     public class QueryUtil
      extends Object

  Utility methods used in query optimization and processing.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `QueryUtil.IndexCall<R>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `adjustLimitForTxModifications(StandardTitanTx tx, int uncoveredAndConditions, int limit)`
    `static <E extends TitanElement> And<E>` | `constraints2QNF(StandardTitanTx tx, List<PredicateCondition<String,E>> constraints)` Prepares the constraints from the query builder into a QNF compliant condition.
    `static InternalRelationType` | `getType(StandardTitanTx tx, String typeName)`
    `static boolean` | `isEmpty(Condition<?> condition)`
    `static boolean` | `isQueryNormalForm(Condition<?> condition)` Query-normal-form (QNF) for Titan is a variant of CNF (conjunctive normal form) with negation inlined where possible
    `static <R> List<R>` | `processIntersectingRetrievals(List<QueryUtil.IndexCall<R>> retrievals, int limit)`
    `static <E extends TitanElement> Condition<E>` | `simplifyQNF(Condition<E> condition)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### QueryUtil

          public QueryUtil()

  - ### Method Detail

    - #### adjustLimitForTxModifications

          public static int adjustLimitForTxModifications(StandardTitanTx tx,
                                          int uncoveredAndConditions,
                                          int limit)

    - #### getType

          public static InternalRelationType getType(StandardTitanTx tx,
                                     String typeName)

    - #### isQueryNormalForm

          public static boolean isQueryNormalForm(Condition<?> condition)

      Query-normal-form (QNF) for Titan is a variant of CNF (conjunctive normal form) with negation inlined where possible
      Parameters:
        `condition` -
      Returns:

    - #### simplifyQNF

          public static final <E extends TitanElement> Condition<E> simplifyQNF(Condition<E> condition)

    - #### isEmpty

          public static boolean isEmpty(Condition<?> condition)

    - #### constraints2QNF

          public static <E extends TitanElement> And<E> constraints2QNF(StandardTitanTx tx,
                                                        List<PredicateCondition<String,E>> constraints)

      Prepares the constraints from the query builder into a QNF compliant condition. If the condition is invalid or trivially false, it returns null.
      Type Parameters:
        `E` -
      Parameters:
        `tx` -
        `constraints` -
      Returns:
      See Also:
        `isQueryNormalForm(com.thinkaurelius.titan.graphdb.query.condition.Condition)`

    - #### processIntersectingRetrievals

          public static <R> List<R> processIntersectingRetrievals(List<QueryUtil.IndexCall<R>> retrievals,
                                                  int limit)

Copyright © 2012–2014. All rights reserved.