Interface LikeOption

All Known Implementing Classes:
LikeOption.Escape, LikeOption.Infix, LikeOption.None, LikeOption.Prefix, LikeOption.Suffix

public interface LikeOption
Represents the option about the LIKE operator.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
    static class 
     
    static class 
     
    static class 
     
    static class 
     
    static interface 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final char
    The default escape character
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Accepts a visitor.
    static LikeOption
    Indicates that the option escapes the LIKE operand with the default escape character $.
    static LikeOption
    escape(char escapeChar)
    Indicates that the option escapes the LIKE operand with escapeChar.
    static LikeOption
    Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the start and the end.
    static LikeOption
    infix(char escapeChar)
    Indicates that the option escape the LIKE operand with escapeChar and concatenates a wildcard at the start and the end.
    static LikeOption
    Indicates that the option does nothing.
    static LikeOption
    Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the end.
    static LikeOption
    prefix(char escapeChar)
    Indicates that the option escape the LIKE operand with escapeChar and concatenates a wildcard at the end.
    static LikeOption
    Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the start.
    static LikeOption
    suffix(char escapeChar)
    Indicates that the option escape the LIKE operand with escapeChar and concatenates a wildcard at the start.
  • Field Details

    • DEFAULT_ESCAPE_CHAR

      static final char DEFAULT_ESCAPE_CHAR
      The default escape character
      See Also:
  • Method Details

    • none

      static LikeOption none()
      Indicates that the option does nothing.
      Returns:
      the option
    • escape

      static LikeOption escape()
      Indicates that the option escapes the LIKE operand with the default escape character $.
      Returns:
      the option
    • escape

      static LikeOption escape(char escapeChar)
      Indicates that the option escapes the LIKE operand with escapeChar.
      Parameters:
      escapeChar - the escape character
      Returns:
      the option
    • prefix

      static LikeOption prefix()
      Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the end.

      For example, a%b_ will be converted to the a a$%b$_.

      Returns:
      the option
    • prefix

      static LikeOption prefix(char escapeChar)
      Indicates that the option escape the LIKE operand with escapeChar and concatenates a wildcard at the end.

      For example, a%b_ is converted to the a a$%b$_.

      Parameters:
      escapeChar - the escape character
      Returns:
      the option
    • infix

      static LikeOption infix()
      Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the start and the end.

      For example, a%b_ is converted to the a %a$%b$_%.

      Returns:
      the option
    • infix

      static LikeOption infix(char escapeChar)
      Indicates that the option escape the LIKE operand with escapeChar and concatenates a wildcard at the start and the end.

      For example, a%b_ is converted to the a %a$%b$_%.

      Parameters:
      escapeChar - the escape character
      Returns:
      the option
    • suffix

      static LikeOption suffix()
      Indicates that the option escape the LIKE operand with the default escape character $ and concatenates a wildcard at the start.

      For example, a%b_ is converted to the a %a$%b$_.

      Returns:
      the option
    • suffix

      static LikeOption suffix(char escapeChar)
      Indicates that the option escape the LIKE operand with escapeChar and concatenates a wildcard at the start.

      For example, a%b_ is converted to the a %a$%b$_.

      Parameters:
      escapeChar - the escape character
      Returns:
      the option
    • accept

      void accept(LikeOption.Visitor visitor)
      Accepts a visitor.
      Parameters:
      visitor - a visitor