Interface SingleRestriction

All Superinterfaces:
Restriction
All Known Implementing Classes:
MultiColumnRestriction, MultiColumnRestriction.EQRestriction, MultiColumnRestriction.INRestriction, MultiColumnRestriction.InRestrictionWithMarker, MultiColumnRestriction.InRestrictionWithValues, MultiColumnRestriction.NotNullRestriction, MultiColumnRestriction.SliceRestriction, SingleColumnRestriction, SingleColumnRestriction.AnnRestriction, SingleColumnRestriction.ContainsRestriction, SingleColumnRestriction.EQRestriction, SingleColumnRestriction.INRestriction, SingleColumnRestriction.InRestrictionWithMarker, SingleColumnRestriction.InRestrictionWithValues, SingleColumnRestriction.IsNotNullRestriction, SingleColumnRestriction.LikeRestriction, SingleColumnRestriction.SliceRestriction

public interface SingleRestriction extends Restriction
A single restriction/clause on one or multiple column.
  • Method Details

    • isSlice

      default boolean isSlice()
    • isEQ

      default boolean isEQ()
    • isLIKE

      default boolean isLIKE()
    • isIN

      default boolean isIN()
    • isContains

      default boolean isContains()
    • isANN

      default boolean isANN()
    • isEqualityBased

      default boolean isEqualityBased()
      Returns:
      true if this restriction is based on equality comparison rather than a range or negation
    • isNotNull

      default boolean isNotNull()
    • isMultiColumn

      default boolean isMultiColumn()
    • hasBound

      default boolean hasBound(Bound b)
      Checks if the specified bound is set or not.
      Parameters:
      b - the bound type
      Returns:
      true if the specified bound is set, false otherwise
    • isInclusive

      default boolean isInclusive(Bound b)
      Checks if the specified bound is inclusive or not.
      Parameters:
      b - the bound type
      Returns:
      true if the specified bound is inclusive, false otherwise
    • mergeWith

      SingleRestriction mergeWith(SingleRestriction otherRestriction)
      Merges this restriction with the specified one.

      Restriction are immutable. Therefore merging two restrictions result in a new one. The reason behind this choice is that it allow a great flexibility in the way the merging can done while preventing any side effect.

      Parameters:
      otherRestriction - the restriction to merge into this one
      Returns:
      the restriction resulting of the merge
    • appendTo

      MultiCBuilder appendTo(MultiCBuilder builder, QueryOptions options)
      Appends the values of this SingleRestriction to the specified builder.
      Parameters:
      builder - the MultiCBuilder to append to.
      options - the query options
      Returns:
      the MultiCBuilder
    • appendBoundTo

      default MultiCBuilder appendBoundTo(MultiCBuilder builder, Bound bound, QueryOptions options)
      Appends the values of the SingleRestriction for the specified bound to the specified builder.
      Parameters:
      builder - the MultiCBuilder to append to.
      bound - the bound
      options - the query options
      Returns:
      the MultiCBuilder