Codota Logo
ComparisonExpression$LikeExpression
Code IndexAdd Codota to your IDE (free)

How to use
ComparisonExpression$LikeExpression
in
org.apache.activemq.artemis.selector.filter

Best Java code snippets using org.apache.activemq.artemis.selector.filter.ComparisonExpression$LikeExpression (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: wildfly/wildfly

public static BooleanExpression createLike(Expression left, String right, String escape) {
 if (escape != null && escape.length() != 1) {
   throw new RuntimeException("The ESCAPE string literal is invalid.  It can only be one character.  Literal used: " + escape);
 }
 int c = -1;
 if (escape != null) {
   c = 0xFFFF & escape.charAt(0);
 }
 return new LikeExpression(left, right, c);
}
origin: wildfly/wildfly

/**
 */
LikeExpression(Expression right, String like, int escape) {
  super(right);
  StringBuffer regexp = new StringBuffer(like.length() * 2);
  regexp.append("\\A"); // The beginning of the input
  for (int i = 0; i < like.length(); i++) {
   char c = like.charAt(i);
   if (escape == (0xFFFF & c) && shouldEscapeNext(like, i, c)) {
     i++;
     char t = like.charAt(i);
     regexp.append("\\x");
     regexp.append(Integer.toHexString(0xFFFF & t));
   } else {
     append(regexp, c);
   }
  }
  regexp.append("\\z"); // The end of the input
  likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL);
}
origin: wildfly/wildfly

/**
 * @see org.apache.activemq.filter.Expression#evaluate(Filterable)
 */
@Override
public Object evaluate(Filterable message) throws FilterException {
  Object rv = this.getRight().evaluate(message);
  if (rv == null) {
   return null;
  }
  if (!(rv instanceof String)) {
   return Boolean.FALSE;
   // throw new RuntimeException("LIKE can only operate on String
   // identifiers. LIKE attempted on: '" + rv.getClass());
  }
  return likePattern.matcher((String) rv).matches() ? Boolean.TRUE : Boolean.FALSE;
}
origin: org.apache.activemq/artemis-selector

 @Override
 public boolean matches(Filterable message) throws FilterException {
   Object object = evaluate(message);
   return object == Boolean.TRUE;
 }
}
origin: apache/activemq-artemis

 @Override
 public boolean matches(Filterable message) throws FilterException {
   Object object = evaluate(message);
   return object == Boolean.TRUE;
 }
}
origin: apache/activemq-artemis

public static BooleanExpression createLike(Expression left, String right, String escape) {
 if (escape != null && escape.length() != 1) {
   throw new RuntimeException("The ESCAPE string literal is invalid.  It can only be one character.  Literal used: " + escape);
 }
 int c = -1;
 if (escape != null) {
   c = 0xFFFF & escape.charAt(0);
 }
 return new LikeExpression(left, right, c);
}
origin: org.jboss.eap/wildfly-client-all

 @Override
 public boolean matches(Filterable message) throws FilterException {
   Object object = evaluate(message);
   return object == Boolean.TRUE;
 }
}
origin: org.apache.activemq/artemis-jms-client-all

 @Override
 public boolean matches(Filterable message) throws FilterException {
   Object object = evaluate(message);
   return object == Boolean.TRUE;
 }
}
origin: org.jboss.eap/wildfly-client-all

public static BooleanExpression createLike(Expression left, String right, String escape) {
 if (escape != null && escape.length() != 1) {
   throw new RuntimeException("The ESCAPE string literal is invalid.  It can only be one character.  Literal used: " + escape);
 }
 int c = -1;
 if (escape != null) {
   c = 0xFFFF & escape.charAt(0);
 }
 return new LikeExpression(left, right, c);
}
origin: org.jboss.eap/wildfly-client-all

/**
 * @see org.apache.activemq.filter.Expression#evaluate(Filterable)
 */
@Override
public Object evaluate(Filterable message) throws FilterException {
  Object rv = this.getRight().evaluate(message);
  if (rv == null) {
   return null;
  }
  if (!(rv instanceof String)) {
   return Boolean.FALSE;
   // throw new RuntimeException("LIKE can only operate on String
   // identifiers. LIKE attempted on: '" + rv.getClass());
  }
  return likePattern.matcher((String) rv).matches() ? Boolean.TRUE : Boolean.FALSE;
}
origin: apache/activemq-artemis

/**
 * @see org.apache.activemq.filter.Expression#evaluate(Filterable)
 */
@Override
public Object evaluate(Filterable message) throws FilterException {
  Object rv = this.getRight().evaluate(message);
  if (rv == null) {
   return null;
  }
  if (!(rv instanceof String)) {
   return Boolean.FALSE;
   // throw new RuntimeException("LIKE can only operate on String
   // identifiers. LIKE attempted on: '" + rv.getClass());
  }
  return likePattern.matcher((String) rv).matches() ? Boolean.TRUE : Boolean.FALSE;
}
origin: apache/activemq-artemis

/**
 * @see org.apache.activemq.filter.Expression#evaluate(Filterable)
 */
@Override
public Object evaluate(Filterable message) throws FilterException {
  Object rv = this.getRight().evaluate(message);
  if (rv == null) {
   return null;
  }
  if (!(rv instanceof String)) {
   return Boolean.FALSE;
   // throw new RuntimeException("LIKE can only operate on String
   // identifiers. LIKE attempted on: '" + rv.getClass());
  }
  return likePattern.matcher((String) rv).matches() ? Boolean.TRUE : Boolean.FALSE;
}
origin: org.apache.activemq/artemis-jms-client-all

/**
 * @see org.apache.activemq.filter.Expression#evaluate(Filterable)
 */
@Override
public Object evaluate(Filterable message) throws FilterException {
  Object rv = this.getRight().evaluate(message);
  if (rv == null) {
   return null;
  }
  if (!(rv instanceof String)) {
   return Boolean.FALSE;
   // throw new RuntimeException("LIKE can only operate on String
   // identifiers. LIKE attempted on: '" + rv.getClass());
  }
  return likePattern.matcher((String) rv).matches() ? Boolean.TRUE : Boolean.FALSE;
}
origin: org.apache.activemq/artemis-jms-client-all

public static BooleanExpression createLike(Expression left, String right, String escape) {
 if (escape != null && escape.length() != 1) {
   throw new RuntimeException("The ESCAPE string literal is invalid.  It can only be one character.  Literal used: " + escape);
 }
 int c = -1;
 if (escape != null) {
   c = 0xFFFF & escape.charAt(0);
 }
 return new LikeExpression(left, right, c);
}
origin: org.apache.activemq/artemis-selector

/**
 * @see org.apache.activemq.filter.Expression#evaluate(Filterable)
 */
@Override
public Object evaluate(Filterable message) throws FilterException {
  Object rv = this.getRight().evaluate(message);
  if (rv == null) {
   return null;
  }
  if (!(rv instanceof String)) {
   return Boolean.FALSE;
   // throw new RuntimeException("LIKE can only operate on String
   // identifiers. LIKE attempted on: '" + rv.getClass());
  }
  return likePattern.matcher((String) rv).matches() ? Boolean.TRUE : Boolean.FALSE;
}
origin: apache/activemq-artemis

 @Override
 public boolean matches(Filterable message) throws FilterException {
   Object object = evaluate(message);
   return object == Boolean.TRUE;
 }
}
origin: org.apache.activemq/artemis-selector

/**
 */
LikeExpression(Expression right, String like, int escape) {
  super(right);
  StringBuffer regexp = new StringBuffer(like.length() * 2);
  regexp.append("\\A"); // The beginning of the input
  for (int i = 0; i < like.length(); i++) {
   char c = like.charAt(i);
   if (escape == (0xFFFF & c) && shouldEscapeNext(like, i, c)) {
     i++;
     char t = like.charAt(i);
     regexp.append("\\x");
     regexp.append(Integer.toHexString(0xFFFF & t));
   } else {
     append(regexp, c);
   }
  }
  regexp.append("\\z"); // The end of the input
  likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL);
}
origin: apache/activemq-artemis

public static BooleanExpression createLike(Expression left, String right, String escape) {
 if (escape != null && escape.length() != 1) {
   throw new RuntimeException("The ESCAPE string literal is invalid.  It can only be one character.  Literal used: " + escape);
 }
 int c = -1;
 if (escape != null) {
   c = 0xFFFF & escape.charAt(0);
 }
 return new LikeExpression(left, right, c);
}
origin: apache/activemq-artemis

/**
 */
LikeExpression(Expression right, String like, int escape) {
  super(right);
  StringBuffer regexp = new StringBuffer(like.length() * 2);
  regexp.append("\\A"); // The beginning of the input
  for (int i = 0; i < like.length(); i++) {
   char c = like.charAt(i);
   if (escape == (0xFFFF & c) && shouldEscapeNext(like, i, c)) {
     i++;
     char t = like.charAt(i);
     regexp.append("\\x");
     regexp.append(Integer.toHexString(0xFFFF & t));
   } else {
     append(regexp, c);
   }
  }
  regexp.append("\\z"); // The end of the input
  likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL);
}
origin: apache/activemq-artemis

/**
 */
LikeExpression(Expression right, String like, int escape) {
  super(right);
  StringBuffer regexp = new StringBuffer(like.length() * 2);
  regexp.append("\\A"); // The beginning of the input
  for (int i = 0; i < like.length(); i++) {
   char c = like.charAt(i);
   if (escape == (0xFFFF & c) && shouldEscapeNext(like, i, c)) {
     i++;
     char t = like.charAt(i);
     regexp.append("\\x");
     regexp.append(Integer.toHexString(0xFFFF & t));
   } else {
     append(regexp, c);
   }
  }
  regexp.append("\\z"); // The end of the input
  likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL);
}
org.apache.activemq.artemis.selector.filterComparisonExpression$LikeExpression

Most used methods

  • <init>
  • append
  • evaluate
  • getRight
  • shouldEscapeNext

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
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