Class PBaseString<R,T>

Type Parameters:
R - the root query bean type
All Implemented Interfaces:
io.ebean.Query.Property<T>
Direct Known Subclasses:
PCidr, PClass, PCurrency, PInet, PInetAddress, PLocale, PTimeZone, PUri, PUrl, PZoneId, PZoneOffset

public abstract class PBaseString<R,T> extends PBaseComparable<R,T>
Base for property types that store as String Varchar types.
  • Method Details

    • equalToType

      @Deprecated(forRemoval=true) public final R equalToType(T value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      migrate to PBaseValueEqual.eq(Object).

      Is equal to. The same as eq but uses the strong type as argument rather than String.

      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • notEqualToType

      @Deprecated(forRemoval=true) public final R notEqualToType(T value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      migrate to PBaseValueEqual.ne(Object).

      Is not equal to. The same as ne but uses the strong type as argument rather than String.

      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • eq

      public final R eq(String value)
      Equal to.
      Parameters:
      value - the bind value
      Returns:
      the root query bean instance
    • ne

      public final R ne(String value)
      Not equal to.
      Parameters:
      value - the bind value
      Returns:
      the root query bean instance
    • gt

      public final R gt(String value)
      Greater than.
      Parameters:
      value - the bind value
      Returns:
      the root query bean instance
    • gtOrNull

      public final R gtOrNull(String value)
      Greater than OR Null.
      Parameters:
      value - the bind value
      Returns:
      the root query bean instance
    • ge

      public final R ge(String value)
      Greater than or Equal to.
      Parameters:
      value - the bind value
      Returns:
      the root query bean instance
    • geOrNull

      public final R geOrNull(String value)
      Greater than or Equal to OR Null.
      Parameters:
      value - the bind value
      Returns:
      the root query bean instance
    • lt

      public final R lt(String value)
      Less than.
      Parameters:
      value - the bind value
      Returns:
      the root query bean instance
    • ltOrNull

      public final R ltOrNull(String value)
      Less than OR Null.
      Parameters:
      value - the bind value
      Returns:
      the root query bean instance
    • le

      public final R le(String value)
      Less than or Equal to.
      Parameters:
      value - the bind value
      Returns:
      the root query bean instance
    • leOrNull

      public final R leOrNull(String value)
      Less than or Equal to OR null.
      Parameters:
      value - the bind value
      Returns:
      the root query bean instance
    • inRange

      public final R inRange(String lower, String upper)
      Greater or equal to lower value and strictly less than upper value.

      This is generally preferable over Between for date and datetime types as SQL Between is inclusive on the upper bound (<= ) and generally we need the upper bound to be exclusive (< ).

      Parameters:
      lower - the lower bind value (>= )
      upper - the upper bind value (< )
      Returns:
      the root query bean instance
    • between

      public final R between(String lower, String upper)
      Between lower and upper values.
      Parameters:
      lower - the lower bind value
      upper - the upper bind value
      Returns:
      the root query bean instance
    • ieq

      public final R ieq(String value)
      Case-insensitive is equal to.
      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • iequalTo

      public final R iequalTo(String value)
      Case-insensitive is equal to.
      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • like

      public final R like(String value)
      Like - include '%' and '_' placeholders as necessary.
      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • startsWith

      public final R startsWith(String value)
      Starts with - uses a like with '%' wildcard added to the end.
      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • endsWith

      public final R endsWith(String value)
      Ends with - uses a like with '%' wildcard added to the beginning.
      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • contains

      public final R contains(String value)
      Contains - uses a like with '%' wildcard added to the beginning and end.
      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • ilike

      public final R ilike(String value)
      Case-insensitive like.
      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • istartsWith

      public final R istartsWith(String value)
      Case-insensitive starts with.
      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • iendsWith

      public final R iendsWith(String value)
      Case-insensitive ends with.
      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance
    • icontains

      public final R icontains(String value)
      Case-insensitive contains.
      Parameters:
      value - the equal to bind value
      Returns:
      the root query bean instance