All Downloads are FREE. Search and download functionalities are using the official Maven repository.

info.archinnov.achilles.generated.dsl.EntityForAggregate_Select Maven / Gradle / Ivy

There is a newer version: 6.1.0
Show newest version
package info.archinnov.achilles.generated.dsl;

import com.datastax.driver.core.querybuilder.QueryBuilder;
import com.datastax.driver.core.querybuilder.Select;
import info.archinnov.achilles.generated.meta.entity.EntityForAggregate_AchillesMeta;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelect;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectColumns;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectColumnsTypeMap;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectFrom;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectFromJSON;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectFromTypeMap;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectWhere;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectWhereJSON;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectWherePartition;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectWherePartitionJSON;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectWherePartitionTypeMap;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectWhereTypeMap;
import info.archinnov.achilles.internals.entities.EntityForAggregate;
import info.archinnov.achilles.internals.metamodel.AbstractEntityProperty;
import info.archinnov.achilles.internals.metamodel.functions.FunctionCall;
import info.archinnov.achilles.internals.options.CassandraOptions;
import info.archinnov.achilles.internals.runtime.RuntimeEngine;
import info.archinnov.achilles.type.SchemaNameProvider;
import info.archinnov.achilles.validation.Validator;
import java.lang.Class;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ArrayUtils;

public final class EntityForAggregate_Select extends AbstractSelect {
  protected final EntityForAggregate_AchillesMeta meta;

  protected final Class entityClass = EntityForAggregate.class;

  public EntityForAggregate_Select(RuntimeEngine rte, EntityForAggregate_AchillesMeta meta) {
    super(rte);
    this.meta = meta;
  }

  /**
   * Generate a SELECT ... partition ... */
  public final EntityForAggregate_Select.Cols partition() {
    select.column("partition");
    return new EntityForAggregate_Select.Cols(select);
  }

  /**
   * Generate a SELECT ... clustering ... */
  public final EntityForAggregate_Select.Cols clustering() {
    select.column("clustering");
    return new EntityForAggregate_Select.Cols(select);
  }

  /**
   * Generate a SELECT ... stringval ... */
  public final EntityForAggregate_Select.Cols stringVal() {
    select.column("stringval");
    return new EntityForAggregate_Select.Cols(select);
  }

  /**
   * Generate a SELECT ... doubleval ... */
  public final EntityForAggregate_Select.Cols doubleVal() {
    select.column("doubleval");
    return new EntityForAggregate_Select.Cols(select);
  }

  /**
   * Use this method to call a system or user-defined function.
All the system functions are accessible from the {@link info.archinnov.achilles.generated.function.SystemFunctions} class
All the user-defined functions and aggregates are accessible from the {@link info.archinnov.achilles.generated.function.FunctionsRegistry} class
System and user-defined functions accept only appropriate type. To pass in an entity field as function argument, use the generated manager.COLUMNS class which exposes all columns with their appropriate type
Example:

   *   {@literal @}Table
   *   public class MyEntity {
   *
   *       ...
   *
   *       {@literal @}Column("value_column")
   *       private String value;
   *
   *       {@literal @}Column("list_of_string")
   *       private List strings;
   *
   *       ...
   *
   *   }
   *
   *   {@literal @}FunctionsRegistry
   *   public interface MyFunctions {
   *
   *        String convertListToJson(List strings);
   *
   *   }
   *
   *
   *   ...
   *
   *
   *   manager
   *      .dsl()
   *      .select()
   *      // This call will generate SELECT cast(writetime(value_column) as text) AS writetimeOfValueAsString, ...
   *      .function(SystemFunctions.castAsText(SystemFunctions.writetime(manager.COLUMNS.VALUE)), "writetimeOfValueAsString")
   *      ...
   *
   *   manager
   *      .dsl()
   *      .select()
   *      // This call will generate SELECT convertlisttojson(list_of_string) AS strings_as_json, ...
   *      .function(FunctionsRegistry.convertListToJson(manager.COLUMNS.STRINGS), "strings_as_json")
   *      ...
   *
   * 
*
* @param functionCall the function call object * @param alias mandatory alias for this function call for easier retrieval from the ResultSet * @return a built-in function call passed to the QueryBuilder object */ public final EntityForAggregate_Select.ColsTM function(final FunctionCall functionCall, final String alias) { functionCall.addToSelect(select, alias); return new EntityForAggregate_Select.ColsTM(select); } /** * Generate ... * FROM ... */ public final EntityForAggregate_Select.F allColumns_FromBaseTable() { final Select.Where where = select.all().from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where(); return new EntityForAggregate_Select.F(where, new CassandraOptions()); } /** * Generate ... * FROM ... using the given SchemaNameProvider */ public final EntityForAggregate_Select.F allColumns_From(final SchemaNameProvider schemaNameProvider) { final String currentKeyspace = lookupKeyspace(schemaNameProvider, meta.entityClass); final String currentTable = lookupTable(schemaNameProvider, meta.entityClass); final Select.Where where = select.all().from(currentKeyspace, currentTable).where(); return new EntityForAggregate_Select.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider)); } /** * Generate ... * FROM ... */ public final EntityForAggregate_Select.F_J allColumnsAsJSON_FromBaseTable() { final Select.Where where = select.json().all().from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where(); return new EntityForAggregate_Select.F_J(where, new CassandraOptions()); } /** * Generate ... * FROM ... using the given SchemaNameProvider */ public final EntityForAggregate_Select.F_J allColumnsAsJSON_From(final SchemaNameProvider schemaNameProvider) { final String currentKeyspace = lookupKeyspace(schemaNameProvider, meta.entityClass); final String currentTable = lookupTable(schemaNameProvider, meta.entityClass); final Select.Where where = select.json().all().from(currentKeyspace, currentTable).where(); return new EntityForAggregate_Select.F_J(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider)); } public class Cols extends AbstractSelectColumns { public Cols(Select.Selection selection) { super(selection); } /** * Generate a SELECT ... partition ... */ public final EntityForAggregate_Select.Cols partition() { selection.column("partition"); return this; } /** * Generate a SELECT ... clustering ... */ public final EntityForAggregate_Select.Cols clustering() { selection.column("clustering"); return this; } /** * Generate a SELECT ... stringval ... */ public final EntityForAggregate_Select.Cols stringVal() { selection.column("stringval"); return this; } /** * Generate a SELECT ... doubleval ... */ public final EntityForAggregate_Select.Cols doubleVal() { selection.column("doubleval"); return this; } /** * Use this method to call a system or user-defined function.
All the system functions are accessible from the {@link info.archinnov.achilles.generated.function.SystemFunctions} class
All the user-defined functions and aggregates are accessible from the {@link info.archinnov.achilles.generated.function.FunctionsRegistry} class
System and user-defined functions accept only appropriate type. To pass in an entity field as function argument, use the generated manager.COLUMNS class which exposes all columns with their appropriate type
Example:

     *   {@literal @}Table
     *   public class MyEntity {
     *
     *       ...
     *
     *       {@literal @}Column("value_column")
     *       private String value;
     *
     *       {@literal @}Column("list_of_string")
     *       private List strings;
     *
     *       ...
     *
     *   }
     *
     *   {@literal @}FunctionsRegistry
     *   public interface MyFunctions {
     *
     *        String convertListToJson(List strings);
     *
     *   }
     *
     *
     *   ...
     *
     *
     *   manager
     *      .dsl()
     *      .select()
     *      // This call will generate SELECT cast(writetime(value_column) as text) AS writetimeOfValueAsString, ...
     *      .function(SystemFunctions.castAsText(SystemFunctions.writetime(manager.COLUMNS.VALUE)), "writetimeOfValueAsString")
     *      ...
     *
     *   manager
     *      .dsl()
     *      .select()
     *      // This call will generate SELECT convertlisttojson(list_of_string) AS strings_as_json, ...
     *      .function(FunctionsRegistry.convertListToJson(manager.COLUMNS.STRINGS), "strings_as_json")
     *      ...
     *
     * 
*
* @param functionCall the function call object * @param alias mandatory alias for this function call for easier retrieval from the ResultSet * @return a built-in function call passed to the QueryBuilder object */ public final EntityForAggregate_Select.ColsTM function(final FunctionCall functionCall, final String alias) { functionCall.addToSelect(selection, alias); return new EntityForAggregate_Select.ColsTM(select); } /** * Generate a ... FROM xxx ... */ public final EntityForAggregate_Select.F fromBaseTable() { final Select.Where where = selection.from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where(); return new EntityForAggregate_Select.F(where, new CassandraOptions()); } /** * Generate a ... FROM xxx ... using the given SchemaNameProvider */ public final EntityForAggregate_Select.F from(final SchemaNameProvider schemaNameProvider) { final String currentKeyspace = lookupKeyspace(schemaNameProvider, meta.entityClass); final String currentTable = lookupTable(schemaNameProvider, meta.entityClass); final Select.Where where = selection.from(currentKeyspace, currentTable).where(); return new EntityForAggregate_Select.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider)); } } public class ColsTM extends AbstractSelectColumnsTypeMap { public ColsTM(Select.Selection selection) { super(selection); } /** * Generate a SELECT ... partition ... */ public final EntityForAggregate_Select.ColsTM partition() { selection.column("partition"); return this; } /** * Generate a SELECT ... clustering ... */ public final EntityForAggregate_Select.ColsTM clustering() { selection.column("clustering"); return this; } /** * Generate a SELECT ... stringval ... */ public final EntityForAggregate_Select.ColsTM stringVal() { selection.column("stringval"); return this; } /** * Generate a SELECT ... doubleval ... */ public final EntityForAggregate_Select.ColsTM doubleVal() { selection.column("doubleval"); return this; } /** * Use this method to call a system or user-defined function.
All the system functions are accessible from the {@link info.archinnov.achilles.generated.function.SystemFunctions} class
All the user-defined functions and aggregates are accessible from the {@link info.archinnov.achilles.generated.function.FunctionsRegistry} class
System and user-defined functions accept only appropriate type. To pass in an entity field as function argument, use the generated manager.COLUMNS class which exposes all columns with their appropriate type
Example:

     *   {@literal @}Table
     *   public class MyEntity {
     *
     *       ...
     *
     *       {@literal @}Column("value_column")
     *       private String value;
     *
     *       {@literal @}Column("list_of_string")
     *       private List strings;
     *
     *       ...
     *
     *   }
     *
     *   {@literal @}FunctionsRegistry
     *   public interface MyFunctions {
     *
     *        String convertListToJson(List strings);
     *
     *   }
     *
     *
     *   ...
     *
     *
     *   manager
     *      .dsl()
     *      .select()
     *      // This call will generate SELECT cast(writetime(value_column) as text) AS writetimeOfValueAsString, ...
     *      .function(SystemFunctions.castAsText(SystemFunctions.writetime(manager.COLUMNS.VALUE)), "writetimeOfValueAsString")
     *      ...
     *
     *   manager
     *      .dsl()
     *      .select()
     *      // This call will generate SELECT convertlisttojson(list_of_string) AS strings_as_json, ...
     *      .function(FunctionsRegistry.convertListToJson(manager.COLUMNS.STRINGS), "strings_as_json")
     *      ...
     *
     * 
*
* @param functionCall the function call object * @param alias mandatory alias for this function call for easier retrieval from the ResultSet * @return a built-in function call passed to the QueryBuilder object */ public final EntityForAggregate_Select.ColsTM function(final FunctionCall functionCall, final String alias) { functionCall.addToSelect(selection, alias); return this; } /** * Generate a ... FROM xxx ... */ public final EntityForAggregate_Select.F_TM fromBaseTable() { final Select.Where where = selection.from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where(); return new EntityForAggregate_Select.F_TM(where, new CassandraOptions()); } /** * Generate a ... FROM xxx ... using the given SchemaNameProvider */ public final EntityForAggregate_Select.F_TM from(final SchemaNameProvider schemaNameProvider) { final String currentKeyspace = lookupKeyspace(schemaNameProvider, meta.entityClass); final String currentTable = lookupTable(schemaNameProvider, meta.entityClass); final Select.Where where = selection.from(currentKeyspace, currentTable).where(); return new EntityForAggregate_Select.F_TM(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider)); } } public class F extends AbstractSelectFrom { F(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... */ public final EntityForAggregate_Select.W_Partition where() { return new EntityForAggregate_Select.W_Partition(where, cassandraOptions); } /** * Generate a SELECT statement without the WHERE clause */ public final EntityForAggregate_Select.E without_WHERE_Clause() { return new EntityForAggregate_Select.E(where, cassandraOptions); } } public class F_TM extends AbstractSelectFromTypeMap { F_TM(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... */ public final EntityForAggregate_Select.W_TM_Partition where() { return new EntityForAggregate_Select.W_TM_Partition(where, cassandraOptions); } /** * Generate a SELECT statement without the WHERE clause */ public final EntityForAggregate_Select.E_TM without_WHERE_Clause() { return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } } public class F_J extends AbstractSelectFromJSON { F_J(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... */ public final EntityForAggregate_Select.W_J_Partition where() { return new EntityForAggregate_Select.W_J_Partition(where, cassandraOptions); } /** * Generate a SELECT statement without the WHERE clause */ public final EntityForAggregate_Select.E_J without_WHERE_Clause() { return new EntityForAggregate_Select.E_J(where, cassandraOptions); } } public final class W_Partition extends AbstractSelectWherePartition { public W_Partition(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } public final EntityForAggregate_Select.W_Partition.Relation partition() { return new EntityForAggregate_Select.W_Partition.Relation(); } public final EntityForAggregate_Select.W_Partition.Token tokenValueOf_partition() { return new EntityForAggregate_Select.W_Partition.Token(); } public final class Relation { /** * Generate a SELECT ... FROM ... WHERE ... partition = ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.W_Clustering Eq(Long partition) { where.and(QueryBuilder.eq("partition", QueryBuilder.bindMarker("partition"))); boundValues.add(partition); encodedValues.add(meta.partition.encodeFromJava(partition, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.W_Clustering(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... partition IN ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.W_Clustering IN(Long... partition) { Validator.validateTrue(ArrayUtils.isNotEmpty(partition), "Varargs for field '%s' should not be null/empty", "partition"); where.and(QueryBuilder.in("partition",QueryBuilder.bindMarker("partition"))); final List varargs = Arrays.asList((Object[])partition); final List encodedVarargs = Arrays.stream((Long[])partition).map(x -> meta.partition.encodeFromJava(x, Optional.of(cassandraOptions))).collect(Collectors.toList()); boundValues.add(varargs); encodedValues.add(encodedVarargs); return new EntityForAggregate_Select.W_Clustering(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... partition = fromJson(?) */ public final EntityForAggregate_Select.W_Clustering Eq_FromJson(String partition) { where.and(QueryBuilder.eq("partition", QueryBuilder.fromJson(QueryBuilder.bindMarker("partition")))); boundValues.add(partition); encodedValues.add(partition); return new EntityForAggregate_Select.W_Clustering(where, cassandraOptions); } } public final class Token { /** * Generate a SELECT ... FROM ... WHERE ... token(partition) = ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Eq(Long tokenValue) { where.and(QueryBuilder.eq("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) > ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gt(Long tokenValue) { where.and(QueryBuilder.gt("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) >= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gte(Long tokenValue) { where.and(QueryBuilder.gte("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Lt(Long tokenValue) { where.and(QueryBuilder.lt("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Lte(Long tokenValue) { where.and(QueryBuilder.lte("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) > ? AND token(partition) < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gt_And_Lt(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gt("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lt("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) > ? AND token(partition) <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gt_And_Lte(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gt("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lte("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) >= ? AND token(partition) < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gte_And_Lt(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gte("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lt("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) >= ? AND token(partition) <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gte_And_Lte(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gte("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lte("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E(where, cassandraOptions); } } } public final class W_Clustering extends AbstractSelectWhere { public W_Clustering(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } @Override protected final EntityForAggregate_Select.W_Clustering getThis() { return this; } @Override protected final AbstractEntityProperty getMetaInternal() { return meta; } @Override protected final Class getEntityClass() { return entityClass; } @Override protected final RuntimeEngine getRte() { return rte; } @Override protected final CassandraOptions getOptions() { return cassandraOptions; } @Override protected final List getBoundValuesInternal() { return boundValues; } @Override protected final List getEncodedValuesInternal() { return encodedValues; } /** * Generate a SELECT ... FROM ... WHERE ... LIMIT :limit */ public final EntityForAggregate_Select.W_Clustering limit(final Integer limit) { where.limit(QueryBuilder.bindMarker("lim")); boundValues.add(limit); encodedValues.add(limit); return this; } public final EntityForAggregate_Select.W_Clustering.Relation clustering() { return new EntityForAggregate_Select.W_Clustering.Relation(); } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering ASC */ public final EntityForAggregate_Select.W_Clustering orderByClusteringAscending() { where.orderBy(QueryBuilder.asc("clustering")); return this; } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering DESC */ public final EntityForAggregate_Select.W_Clustering orderByClusteringDescending() { where.orderBy(QueryBuilder.desc("clustering")); return this; } public final class Relation { /** * Generate a SELECT ... FROM ... WHERE ... clustering = ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Eq(Integer clustering) { where.and(QueryBuilder.eq("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering IN ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E IN(Integer... clustering) { Validator.validateTrue(ArrayUtils.isNotEmpty(clustering), "Varargs for field '%s' should not be null/empty", "clustering"); where.and(QueryBuilder.in("clustering",QueryBuilder.bindMarker("clustering"))); final List varargs = Arrays.asList((Object[])clustering); final List encodedVarargs = Arrays.stream((Integer[])clustering).map(x -> meta.clustering.encodeFromJava(x, Optional.of(cassandraOptions))).collect(Collectors.toList()); boundValues.add(varargs); encodedValues.add(encodedVarargs); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering > ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gt(Integer clustering) { where.and(QueryBuilder.gt("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering >= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gte(Integer clustering) { where.and(QueryBuilder.gte("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Lt(Integer clustering) { where.and(QueryBuilder.lt("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Lte(Integer clustering) { where.and(QueryBuilder.lte("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering > ? AND clustering < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gt_And_Lt(Integer clustering_Gt, Integer clustering_Lt) { where.and(QueryBuilder.gt("clustering",QueryBuilder.bindMarker("clustering_Lt"))); where.and(QueryBuilder.lt("clustering",QueryBuilder.bindMarker("clustering_Lt"))); boundValues.add(clustering_Gt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gt, Optional.of(cassandraOptions))); boundValues.add(clustering_Lt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lt, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering > ? AND clustering <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gt_And_Lte(Integer clustering_Gt, Integer clustering_Lte) { where.and(QueryBuilder.gt("clustering",QueryBuilder.bindMarker("clustering_Lte"))); where.and(QueryBuilder.lte("clustering",QueryBuilder.bindMarker("clustering_Lte"))); boundValues.add(clustering_Gt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gt, Optional.of(cassandraOptions))); boundValues.add(clustering_Lte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lte, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering >= ? AND clustering < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gte_And_Lt(Integer clustering_Gte, Integer clustering_Lt) { where.and(QueryBuilder.gte("clustering",QueryBuilder.bindMarker("clustering_Lt"))); where.and(QueryBuilder.lt("clustering",QueryBuilder.bindMarker("clustering_Lt"))); boundValues.add(clustering_Gte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gte, Optional.of(cassandraOptions))); boundValues.add(clustering_Lt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lt, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering >= ? AND clustering <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E Gte_And_Lte(Integer clustering_Gte, Integer clustering_Lte) { where.and(QueryBuilder.gte("clustering",QueryBuilder.bindMarker("clustering_Lte"))); where.and(QueryBuilder.lte("clustering",QueryBuilder.bindMarker("clustering_Lte"))); boundValues.add(clustering_Gte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gte, Optional.of(cassandraOptions))); boundValues.add(clustering_Lte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lte, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering = fromJson(?) */ public final EntityForAggregate_Select.E Eq_FromJson(String clustering) { where.and(QueryBuilder.eq("clustering", QueryBuilder.fromJson(QueryBuilder.bindMarker("clustering")))); boundValues.add(clustering); encodedValues.add(clustering); return new EntityForAggregate_Select.E(where, cassandraOptions); } } } public final class E extends AbstractSelectWhere { public E(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } @Override protected final Class getEntityClass() { return entityClass; } @Override protected final AbstractEntityProperty getMetaInternal() { return meta; } @Override protected final RuntimeEngine getRte() { return rte; } @Override protected final CassandraOptions getOptions() { return cassandraOptions; } @Override protected final List getBoundValuesInternal() { return boundValues; } @Override protected final List getEncodedValuesInternal() { return encodedValues; } /** * Generate a SELECT ... FROM ... WHERE ... LIMIT :limit */ public final EntityForAggregate_Select.E limit(final Integer limit) { where.limit(QueryBuilder.bindMarker("lim")); boundValues.add(limit); encodedValues.add(limit); return this; } @Override protected final EntityForAggregate_Select.E getThis() { return this; } /** * Generate a SELECT ... FROM ... WHERE ... PER PARTITION LIMIT :perPartitionLimit */ public final EntityForAggregate_Select.E perPartitionLimit(final Integer perPartitionLimit) { where.perPartitionLimit(QueryBuilder.bindMarker("perPartitionLimit")); boundValues.add(perPartitionLimit); encodedValues.add(perPartitionLimit); return this; } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering ASC */ public final EntityForAggregate_Select.E orderByClusteringAscending() { where.orderBy(QueryBuilder.asc("clustering")); return this; } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering DESC */ public final EntityForAggregate_Select.E orderByClusteringDescending() { where.orderBy(QueryBuilder.desc("clustering")); return this; } } public final class W_TM_Partition extends AbstractSelectWherePartitionTypeMap { public W_TM_Partition(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } public final EntityForAggregate_Select.W_TM_Partition.Relation partition() { return new EntityForAggregate_Select.W_TM_Partition.Relation(); } public final EntityForAggregate_Select.W_TM_Partition.Token tokenValueOf_partition() { return new EntityForAggregate_Select.W_TM_Partition.Token(); } public final class Relation { /** * Generate a SELECT ... FROM ... WHERE ... partition = ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.W_TM_Clustering Eq(Long partition) { where.and(QueryBuilder.eq("partition", QueryBuilder.bindMarker("partition"))); boundValues.add(partition); encodedValues.add(meta.partition.encodeFromJava(partition, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.W_TM_Clustering(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... partition IN ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.W_TM_Clustering IN(Long... partition) { Validator.validateTrue(ArrayUtils.isNotEmpty(partition), "Varargs for field '%s' should not be null/empty", "partition"); where.and(QueryBuilder.in("partition",QueryBuilder.bindMarker("partition"))); final List varargs = Arrays.asList((Object[])partition); final List encodedVarargs = Arrays.stream((Long[])partition).map(x -> meta.partition.encodeFromJava(x, Optional.of(cassandraOptions))).collect(Collectors.toList()); boundValues.add(varargs); encodedValues.add(encodedVarargs); return new EntityForAggregate_Select.W_TM_Clustering(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... partition = fromJson(?) */ public final EntityForAggregate_Select.W_TM_Clustering Eq_FromJson(String partition) { where.and(QueryBuilder.eq("partition", QueryBuilder.fromJson(QueryBuilder.bindMarker("partition")))); boundValues.add(partition); encodedValues.add(partition); return new EntityForAggregate_Select.W_TM_Clustering(where, cassandraOptions); } } public final class Token { /** * Generate a SELECT ... FROM ... WHERE ... token(partition) = ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Eq(Long tokenValue) { where.and(QueryBuilder.eq("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) > ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gt(Long tokenValue) { where.and(QueryBuilder.gt("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) >= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gte(Long tokenValue) { where.and(QueryBuilder.gte("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Lt(Long tokenValue) { where.and(QueryBuilder.lt("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Lte(Long tokenValue) { where.and(QueryBuilder.lte("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) > ? AND token(partition) < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gt_And_Lt(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gt("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lt("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) > ? AND token(partition) <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gt_And_Lte(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gt("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lte("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) >= ? AND token(partition) < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gte_And_Lt(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gte("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lt("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) >= ? AND token(partition) <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gte_And_Lte(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gte("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lte("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } } } public final class W_TM_Clustering extends AbstractSelectWhereTypeMap { public W_TM_Clustering(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } @Override protected final EntityForAggregate_Select.W_TM_Clustering getThis() { return this; } @Override protected final AbstractEntityProperty getMetaInternal() { return meta; } @Override protected final Class getEntityClass() { return entityClass; } @Override protected final RuntimeEngine getRte() { return rte; } @Override protected final CassandraOptions getOptions() { return cassandraOptions; } @Override protected final List getBoundValuesInternal() { return boundValues; } @Override protected final List getEncodedValuesInternal() { return encodedValues; } /** * Generate a SELECT ... FROM ... WHERE ... LIMIT :limit */ public final EntityForAggregate_Select.W_TM_Clustering limit(final Integer limit) { where.limit(QueryBuilder.bindMarker("lim")); boundValues.add(limit); encodedValues.add(limit); return this; } public final EntityForAggregate_Select.W_TM_Clustering.Relation clustering() { return new EntityForAggregate_Select.W_TM_Clustering.Relation(); } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering ASC */ public final EntityForAggregate_Select.W_TM_Clustering orderByClusteringAscending() { where.orderBy(QueryBuilder.asc("clustering")); return this; } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering DESC */ public final EntityForAggregate_Select.W_TM_Clustering orderByClusteringDescending() { where.orderBy(QueryBuilder.desc("clustering")); return this; } public final class Relation { /** * Generate a SELECT ... FROM ... WHERE ... clustering = ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Eq(Integer clustering) { where.and(QueryBuilder.eq("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering IN ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM IN(Integer... clustering) { Validator.validateTrue(ArrayUtils.isNotEmpty(clustering), "Varargs for field '%s' should not be null/empty", "clustering"); where.and(QueryBuilder.in("clustering",QueryBuilder.bindMarker("clustering"))); final List varargs = Arrays.asList((Object[])clustering); final List encodedVarargs = Arrays.stream((Integer[])clustering).map(x -> meta.clustering.encodeFromJava(x, Optional.of(cassandraOptions))).collect(Collectors.toList()); boundValues.add(varargs); encodedValues.add(encodedVarargs); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering > ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gt(Integer clustering) { where.and(QueryBuilder.gt("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering >= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gte(Integer clustering) { where.and(QueryBuilder.gte("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Lt(Integer clustering) { where.and(QueryBuilder.lt("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Lte(Integer clustering) { where.and(QueryBuilder.lte("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering > ? AND clustering < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gt_And_Lt(Integer clustering_Gt, Integer clustering_Lt) { where.and(QueryBuilder.gt("clustering",QueryBuilder.bindMarker("clustering_Lt"))); where.and(QueryBuilder.lt("clustering",QueryBuilder.bindMarker("clustering_Lt"))); boundValues.add(clustering_Gt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gt, Optional.of(cassandraOptions))); boundValues.add(clustering_Lt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lt, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering > ? AND clustering <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gt_And_Lte(Integer clustering_Gt, Integer clustering_Lte) { where.and(QueryBuilder.gt("clustering",QueryBuilder.bindMarker("clustering_Lte"))); where.and(QueryBuilder.lte("clustering",QueryBuilder.bindMarker("clustering_Lte"))); boundValues.add(clustering_Gt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gt, Optional.of(cassandraOptions))); boundValues.add(clustering_Lte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lte, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering >= ? AND clustering < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gte_And_Lt(Integer clustering_Gte, Integer clustering_Lt) { where.and(QueryBuilder.gte("clustering",QueryBuilder.bindMarker("clustering_Lt"))); where.and(QueryBuilder.lt("clustering",QueryBuilder.bindMarker("clustering_Lt"))); boundValues.add(clustering_Gte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gte, Optional.of(cassandraOptions))); boundValues.add(clustering_Lt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lt, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering >= ? AND clustering <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_TM Gte_And_Lte(Integer clustering_Gte, Integer clustering_Lte) { where.and(QueryBuilder.gte("clustering",QueryBuilder.bindMarker("clustering_Lte"))); where.and(QueryBuilder.lte("clustering",QueryBuilder.bindMarker("clustering_Lte"))); boundValues.add(clustering_Gte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gte, Optional.of(cassandraOptions))); boundValues.add(clustering_Lte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lte, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering = fromJson(?) */ public final EntityForAggregate_Select.E_TM Eq_FromJson(String clustering) { where.and(QueryBuilder.eq("clustering", QueryBuilder.fromJson(QueryBuilder.bindMarker("clustering")))); boundValues.add(clustering); encodedValues.add(clustering); return new EntityForAggregate_Select.E_TM(where, cassandraOptions); } } } public final class E_TM extends AbstractSelectWhereTypeMap { public E_TM(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } @Override protected final Class getEntityClass() { return entityClass; } @Override protected final AbstractEntityProperty getMetaInternal() { return meta; } @Override protected final RuntimeEngine getRte() { return rte; } @Override protected final CassandraOptions getOptions() { return cassandraOptions; } @Override protected final List getBoundValuesInternal() { return boundValues; } @Override protected final List getEncodedValuesInternal() { return encodedValues; } /** * Generate a SELECT ... FROM ... WHERE ... LIMIT :limit */ public final EntityForAggregate_Select.E_TM limit(final Integer limit) { where.limit(QueryBuilder.bindMarker("lim")); boundValues.add(limit); encodedValues.add(limit); return this; } @Override protected final EntityForAggregate_Select.E_TM getThis() { return this; } /** * Generate a SELECT ... FROM ... WHERE ... PER PARTITION LIMIT :perPartitionLimit */ public final EntityForAggregate_Select.E_TM perPartitionLimit(final Integer perPartitionLimit) { where.perPartitionLimit(QueryBuilder.bindMarker("perPartitionLimit")); boundValues.add(perPartitionLimit); encodedValues.add(perPartitionLimit); return this; } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering ASC */ public final EntityForAggregate_Select.E_TM orderByClusteringAscending() { where.orderBy(QueryBuilder.asc("clustering")); return this; } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering DESC */ public final EntityForAggregate_Select.E_TM orderByClusteringDescending() { where.orderBy(QueryBuilder.desc("clustering")); return this; } } public final class W_J_Partition extends AbstractSelectWherePartitionJSON { public W_J_Partition(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } public final EntityForAggregate_Select.W_J_Partition.Relation partition() { return new EntityForAggregate_Select.W_J_Partition.Relation(); } public final EntityForAggregate_Select.W_J_Partition.Token tokenValueOf_partition() { return new EntityForAggregate_Select.W_J_Partition.Token(); } public final class Relation { /** * Generate a SELECT ... FROM ... WHERE ... partition = ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.W_J_Clustering Eq(Long partition) { where.and(QueryBuilder.eq("partition", QueryBuilder.bindMarker("partition"))); boundValues.add(partition); encodedValues.add(meta.partition.encodeFromJava(partition, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.W_J_Clustering(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... partition IN ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.W_J_Clustering IN(Long... partition) { Validator.validateTrue(ArrayUtils.isNotEmpty(partition), "Varargs for field '%s' should not be null/empty", "partition"); where.and(QueryBuilder.in("partition",QueryBuilder.bindMarker("partition"))); final List varargs = Arrays.asList((Object[])partition); final List encodedVarargs = Arrays.stream((Long[])partition).map(x -> meta.partition.encodeFromJava(x, Optional.of(cassandraOptions))).collect(Collectors.toList()); boundValues.add(varargs); encodedValues.add(encodedVarargs); return new EntityForAggregate_Select.W_J_Clustering(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... partition = fromJson(?) */ public final EntityForAggregate_Select.W_J_Clustering Eq_FromJson(String partition) { where.and(QueryBuilder.eq("partition", QueryBuilder.fromJson(QueryBuilder.bindMarker("partition")))); boundValues.add(partition); encodedValues.add(partition); return new EntityForAggregate_Select.W_J_Clustering(where, cassandraOptions); } } public final class Token { /** * Generate a SELECT ... FROM ... WHERE ... token(partition) = ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Eq(Long tokenValue) { where.and(QueryBuilder.eq("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) > ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gt(Long tokenValue) { where.and(QueryBuilder.gt("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) >= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gte(Long tokenValue) { where.and(QueryBuilder.gte("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Lt(Long tokenValue) { where.and(QueryBuilder.lt("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Lte(Long tokenValue) { where.and(QueryBuilder.lte("token(partition)", QueryBuilder.bindMarker("tokenValue"))); boundValues.add(tokenValue); encodedValues.add(tokenValue); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) > ? AND token(partition) < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gt_And_Lt(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gt("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lt("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) > ? AND token(partition) <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gt_And_Lte(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gt("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lte("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) >= ? AND token(partition) < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gte_And_Lt(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gte("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lt("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... token(partition) >= ? AND token(partition) <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gte_And_Lte(Long tokenValue1, Long tokenValue2) { where.and(QueryBuilder.gte("token(partition)",QueryBuilder.bindMarker("tokenValue1"))); where.and(QueryBuilder.lte("token(partition)",QueryBuilder.bindMarker("tokenValue2"))); boundValues.add(tokenValue1); encodedValues.add(tokenValue1); boundValues.add(tokenValue2); encodedValues.add(tokenValue2); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } } } public final class W_J_Clustering extends AbstractSelectWhereJSON { public W_J_Clustering(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } @Override protected final EntityForAggregate_Select.W_J_Clustering getThis() { return this; } @Override protected final AbstractEntityProperty getMetaInternal() { return meta; } @Override protected final Class getEntityClass() { return entityClass; } @Override protected final RuntimeEngine getRte() { return rte; } @Override protected final CassandraOptions getOptions() { return cassandraOptions; } @Override protected final List getBoundValuesInternal() { return boundValues; } @Override protected final List getEncodedValuesInternal() { return encodedValues; } /** * Generate a SELECT ... FROM ... WHERE ... LIMIT :limit */ public final EntityForAggregate_Select.W_J_Clustering limit(final Integer limit) { where.limit(QueryBuilder.bindMarker("lim")); boundValues.add(limit); encodedValues.add(limit); return this; } public final EntityForAggregate_Select.W_J_Clustering.Relation clustering() { return new EntityForAggregate_Select.W_J_Clustering.Relation(); } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering ASC */ public final EntityForAggregate_Select.W_J_Clustering orderByClusteringAscending() { where.orderBy(QueryBuilder.asc("clustering")); return this; } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering DESC */ public final EntityForAggregate_Select.W_J_Clustering orderByClusteringDescending() { where.orderBy(QueryBuilder.desc("clustering")); return this; } public final class Relation { /** * Generate a SELECT ... FROM ... WHERE ... clustering = ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Eq(Integer clustering) { where.and(QueryBuilder.eq("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering IN ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J IN(Integer... clustering) { Validator.validateTrue(ArrayUtils.isNotEmpty(clustering), "Varargs for field '%s' should not be null/empty", "clustering"); where.and(QueryBuilder.in("clustering",QueryBuilder.bindMarker("clustering"))); final List varargs = Arrays.asList((Object[])clustering); final List encodedVarargs = Arrays.stream((Integer[])clustering).map(x -> meta.clustering.encodeFromJava(x, Optional.of(cassandraOptions))).collect(Collectors.toList()); boundValues.add(varargs); encodedValues.add(encodedVarargs); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering > ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gt(Integer clustering) { where.and(QueryBuilder.gt("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering >= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gte(Integer clustering) { where.and(QueryBuilder.gte("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Lt(Integer clustering) { where.and(QueryBuilder.lt("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Lte(Integer clustering) { where.and(QueryBuilder.lte("clustering", QueryBuilder.bindMarker("clustering"))); boundValues.add(clustering); encodedValues.add(meta.clustering.encodeFromJava(clustering, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering > ? AND clustering < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gt_And_Lt(Integer clustering_Gt, Integer clustering_Lt) { where.and(QueryBuilder.gt("clustering",QueryBuilder.bindMarker("clustering_Lt"))); where.and(QueryBuilder.lt("clustering",QueryBuilder.bindMarker("clustering_Lt"))); boundValues.add(clustering_Gt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gt, Optional.of(cassandraOptions))); boundValues.add(clustering_Lt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lt, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering > ? AND clustering <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gt_And_Lte(Integer clustering_Gt, Integer clustering_Lte) { where.and(QueryBuilder.gt("clustering",QueryBuilder.bindMarker("clustering_Lte"))); where.and(QueryBuilder.lte("clustering",QueryBuilder.bindMarker("clustering_Lte"))); boundValues.add(clustering_Gt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gt, Optional.of(cassandraOptions))); boundValues.add(clustering_Lte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lte, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering >= ? AND clustering < ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gte_And_Lt(Integer clustering_Gte, Integer clustering_Lt) { where.and(QueryBuilder.gte("clustering",QueryBuilder.bindMarker("clustering_Lt"))); where.and(QueryBuilder.lt("clustering",QueryBuilder.bindMarker("clustering_Lt"))); boundValues.add(clustering_Gte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gte, Optional.of(cassandraOptions))); boundValues.add(clustering_Lt); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lt, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering >= ? AND clustering <= ? */ @SuppressWarnings("static-access") public final EntityForAggregate_Select.E_J Gte_And_Lte(Integer clustering_Gte, Integer clustering_Lte) { where.and(QueryBuilder.gte("clustering",QueryBuilder.bindMarker("clustering_Lte"))); where.and(QueryBuilder.lte("clustering",QueryBuilder.bindMarker("clustering_Lte"))); boundValues.add(clustering_Gte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Gte, Optional.of(cassandraOptions))); boundValues.add(clustering_Lte); encodedValues.add(meta.clustering.encodeFromJava(clustering_Lte, Optional.of(cassandraOptions))); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... clustering = fromJson(?) */ public final EntityForAggregate_Select.E_J Eq_FromJson(String clustering) { where.and(QueryBuilder.eq("clustering", QueryBuilder.fromJson(QueryBuilder.bindMarker("clustering")))); boundValues.add(clustering); encodedValues.add(clustering); return new EntityForAggregate_Select.E_J(where, cassandraOptions); } } } public final class E_J extends AbstractSelectWhereJSON { public E_J(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } @Override protected final Class getEntityClass() { return entityClass; } @Override protected final AbstractEntityProperty getMetaInternal() { return meta; } @Override protected final RuntimeEngine getRte() { return rte; } @Override protected final CassandraOptions getOptions() { return cassandraOptions; } @Override protected final List getBoundValuesInternal() { return boundValues; } @Override protected final List getEncodedValuesInternal() { return encodedValues; } /** * Generate a SELECT ... FROM ... WHERE ... LIMIT :limit */ public final EntityForAggregate_Select.E_J limit(final Integer limit) { where.limit(QueryBuilder.bindMarker("lim")); boundValues.add(limit); encodedValues.add(limit); return this; } @Override protected final EntityForAggregate_Select.E_J getThis() { return this; } /** * Generate a SELECT ... FROM ... WHERE ... PER PARTITION LIMIT :perPartitionLimit */ public final EntityForAggregate_Select.E_J perPartitionLimit(final Integer perPartitionLimit) { where.perPartitionLimit(QueryBuilder.bindMarker("perPartitionLimit")); boundValues.add(perPartitionLimit); encodedValues.add(perPartitionLimit); return this; } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering ASC */ public final EntityForAggregate_Select.E_J orderByClusteringAscending() { where.orderBy(QueryBuilder.asc("clustering")); return this; } /** * Generate a SELECT ... FROM ... WHERE ... ORDER BY clustering DESC */ public final EntityForAggregate_Select.E_J orderByClusteringDescending() { where.orderBy(QueryBuilder.desc("clustering")); return this; } } }