Codota Logo
InvalidRqlExpressionException
Code IndexAdd Codota to your IDE (free)

How to use
InvalidRqlExpressionException
in
org.eclipse.ditto.model.base.exceptions

Best Java code snippets using org.eclipse.ditto.model.base.exceptions.InvalidRqlExpressionException (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: eclipse/ditto

  @Override
  protected InvalidRqlExpressionException doBuild(final DittoHeaders dittoHeaders, final String message,
      final String description, final Throwable cause, final URI href) {
    return new InvalidRqlExpressionException(dittoHeaders, message, description, cause, href);
  }
}
origin: org.eclipse.ditto/ditto-model-base

/**
 * Constructs a new {@code InvalidRqlExpressionException} object with the exception message extracted from the
 * given JSON object.
 *
 * @param jsonObject the JSON to read the {@link JsonFields#MESSAGE} field from.
 * @param dittoHeaders the headers of the command which resulted in this exception.
 * @return the new InvalidRqlExpressionException.
 * @throws org.eclipse.ditto.json.JsonMissingFieldException if the {@code jsonObject} does not have the {@link
 * JsonFields#MESSAGE} field.
 */
public static InvalidRqlExpressionException fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders) {
  return new Builder()
      .dittoHeaders(dittoHeaders)
      .message(readMessage(jsonObject))
      .description(readDescription(jsonObject).orElse(DEFAULT_DESCRIPTION))
      .href(readHRef(jsonObject).orElse(null))
      .build();
}
origin: eclipse/ditto

@Override
public Void visitNor(final Stream<Void> negativeDisjoints) {
  if (norIsForbidden) {
    final String message = String.format("The filter operation 'not' is not available in API versions >= %d. " +
        "Please rephrase your search query without using 'not'.", getForbiddenSchemaVersion());
    throw InvalidRqlExpressionException.fromMessage(message, dittoHeaders);
  } else {
    // force the stream to evaluate criteria on children
    negativeDisjoints.count();
    return null;
  }
}
origin: eclipse/ditto

  private Criteria mapCriteria(final String filter, final DittoHeaders dittoHeaders) {
    try {
      final ParameterPredicateVisitor visitor =
          new ParameterPredicateVisitor(criteriaFactory, fieldExpressionFactory);

      final RootNode rootNode = rqlPredicateParser.parse(filter);
      visitor.visit(rootNode);

      final Criteria criteria;
      if (visitor.getCriteria().size() > 1) {
        criteria = criteriaFactory.and(visitor.getCriteria());
      } else if (visitor.getCriteria().size() == 1) {
        criteria = visitor.getCriteria().get(0);
      } else {
        criteria = criteriaFactory.any();
      }
      return criteria;
    } catch (final ParserException | IllegalArgumentException e) {
      throw InvalidRqlExpressionException.newBuilder()
          .message(e.getMessage())
          .cause(e)
          .dittoHeaders(dittoHeaders)
          .build();
    }
  }
}
origin: eclipse/ditto

/**
 * Constructs a new {@code InvalidRqlExpressionException} object with the exception message extracted from the
 * given JSON object.
 *
 * @param jsonObject the JSON to read the {@link JsonFields#MESSAGE} field from.
 * @param dittoHeaders the headers of the command which resulted in this exception.
 * @return the new InvalidRqlExpressionException.
 * @throws org.eclipse.ditto.json.JsonMissingFieldException if the {@code jsonObject} does not have the {@link
 * JsonFields#MESSAGE} field.
 */
public static InvalidRqlExpressionException fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders) {
  return new Builder()
      .dittoHeaders(dittoHeaders)
      .message(readMessage(jsonObject))
      .description(readDescription(jsonObject).orElse(DEFAULT_DESCRIPTION))
      .href(readHRef(jsonObject).orElse(null))
      .build();
}
origin: org.eclipse.ditto/ditto-model-base

  @Override
  protected InvalidRqlExpressionException doBuild(final DittoHeaders dittoHeaders, final String message,
      final String description, final Throwable cause, final URI href) {
    return new InvalidRqlExpressionException(dittoHeaders, message, description, cause, href);
  }
}
org.eclipse.ditto.model.base.exceptionsInvalidRqlExpressionException

Javadoc

Thrown if an RQL expression is invalid.

Most used methods

  • <init>
  • fromMessage
    Constructs a new InvalidRqlExpressionException object with given message.
  • newBuilder
    A mutable builder for a InvalidRqlExpressionException.
  • readDescription
  • readHRef
  • readMessage

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now