Interface QueryMapper.MapperDeleteNameCondition

All Known Subinterfaces:
QueryMapper.MapperDeleteNotCondition
Enclosing interface:
QueryMapper

public static interface QueryMapper.MapperDeleteNameCondition
Represents a delete condition based on a column name in the fluent delete API.

This interface defines the available comparison operations that can be applied to a column when building a delete query. It is reached after specifying a column name using where(String) and allows defining predicates such as equality, pattern matching, range comparisons, and negation.

@Inject
Template template;

template.delete(Book.class)
    .where("author").eq("Ada")
    .execute();
The returned instances are mutable and not thread-safe. Support for specific comparison operations depends on the capabilities of the underlying NoSQL database.
Since:
1.0.0
  • Method Details

    • eq

      <T> QueryMapper.MapperDeleteWhere eq(T value)
      Creates a delete condition where the specified column name equals the provided value.
      template.delete(Book.class)
              .where("author").eq("Ada")
              .execute();
      
      Type Parameters:
      T - the type
      Parameters:
      value - the value for the condition
      Returns:
      the QueryMapper.MapperDeleteWhere
      Throws:
      NullPointerException - when value is null
    • like

      Creates a delete condition where the specified column name is like the provided value.
      template.delete(Book.class)
              .where("author").like("A%")
              .execute();
      
      Parameters:
      value - the value for the condition
      Returns:
      the QueryMapper.MapperDeleteWhere
      Throws:
      NullPointerException - when value is null
    • contains

      Creates a delete condition where the specified column contains the given value. This method is used when you want to delete entities where the column contains the provided substring.
      template.delete(Book.class)
              .where("title").contains("Java")
              .execute();
      
      Parameters:
      value - the substring value to match
      Returns:
      the QueryMapper.MapperDeleteWhere to continue building the query
      Throws:
      NullPointerException - when value is null
    • startsWith

      Creates a delete condition where the specified column starts with the given value. This method is used when you want to delete entities where the column starts with the provided prefix.
      template.delete(Book.class)
              .where("author").startsWith("Ada")
              .execute();
      
      Parameters:
      value - the prefix value to match
      Returns:
      the QueryMapper.MapperDeleteWhere to continue building the query
      Throws:
      NullPointerException - when value is null
    • endsWith

      Creates a delete condition where the specified column ends with the given value. This method is used when you want to delete entities where the column ends with the provided suffix.
      template.delete(Book.class)
              .where("author").endsWith("Lovelace")
              .execute();
      
      Parameters:
      value - the suffix value to match
      Returns:
      the QueryMapper.MapperDeleteWhere to continue building the query
      Throws:
      NullPointerException - when value is null
    • gt

      <T> QueryMapper.MapperDeleteWhere gt(T value)
      Creates a delete condition where the specified column name is greater than the provided value.
      template.delete(Book.class)
              .where("publishedYear").gt(2015)
              .execute();
      
      Type Parameters:
      T - the type
      Parameters:
      value - the value for the condition
      Returns:
      the QueryMapper.MapperDeleteWhere
      Throws:
      NullPointerException - when value is null
    • gte

      <T> QueryMapper.MapperDeleteWhere gte(T value)
      Creates a delete condition where the specified column name is greater than or equal to the provided value.
      template.delete(Book.class)
              .where("publishedYear").gte(2020)
              .execute();
      
      Type Parameters:
      T - the type
      Parameters:
      value - the value for the condition
      Returns:
      the QueryMapper.MapperDeleteWhere
      Throws:
      NullPointerException - when value is null
    • lt

      <T> QueryMapper.MapperDeleteWhere lt(T value)
      Creates a delete condition where the specified column name is less than the provided value.
      template.delete(Book.class)
              .where("publishedYear").lt(2000)
              .execute();
      
      Type Parameters:
      T - the type
      Parameters:
      value - the value for the condition
      Returns:
      the QueryMapper.MapperDeleteWhere
      Throws:
      NullPointerException - when value is null
    • lte

      <T> QueryMapper.MapperDeleteWhere lte(T value)
      Creates a delete condition where the specified column name is less than or equal to the provided value.
      template.delete(Book.class)
              .where("publishedYear").lte(2010)
              .execute();
      
      Type Parameters:
      T - the type
      Parameters:
      value - the value for the condition
      Returns:
      the QueryMapper.MapperDeleteWhere
      Throws:
      NullPointerException - when value is null
    • between

      <T> QueryMapper.MapperDeleteWhere between(T valueA, T valueB)
      Creates a delete condition where the specified column name is between the provided values.
      Type Parameters:
      T - the type
      Parameters:
      valueA - the lower bound of the range
      valueB - the upper bound of the range
      Returns:
      the QueryMapper.MapperDeleteWhere
      Throws:
      NullPointerException - when either valueA or valueB is null
    • in

      Creates a delete condition where the specified column name is in the provided iterable values.
      template.delete(Book.class)
              .where("author").in(List.of("Ada", "Grace", "Alan"))
              .execute();
      
      Type Parameters:
      T - the type
      Parameters:
      values - the values for the condition
      Returns:
      the QueryMapper.MapperDeleteWhere
      Throws:
      NullPointerException - when values is null
    • not

      Creates a NOT delete condition for the specified column name.
      template.delete(Book.class)
              .where("author").not().eq("Ada")
              .execute();
      
      Returns:
      QueryMapper.MapperDeleteNotCondition