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

info.archinnov.achilles.generated.dsl.EntityWithDSESearch_SelectIndex 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.annotations.DSE_Search;
import info.archinnov.achilles.generated.meta.entity.EntityWithDSESearch_AchillesMeta;
import info.archinnov.achilles.internals.dsl.query.select.AbstractIndexSelectWhere;
import info.archinnov.achilles.internals.dsl.query.select.AbstractIndexSelectWhereTypeMap;
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.AbstractSelectFromTypeMap;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectWherePartition;
import info.archinnov.achilles.internals.dsl.query.select.AbstractSelectWherePartitionTypeMap;
import info.archinnov.achilles.internals.entities.EntityWithDSESearch;
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.text.SimpleDateFormat;
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 EntityWithDSESearch_SelectIndex extends AbstractSelect {
  protected final EntityWithDSESearch_AchillesMeta meta;

  protected final Class entityClass = EntityWithDSESearch.class;

  public EntityWithDSESearch_SelectIndex(RuntimeEngine rte, EntityWithDSESearch_AchillesMeta meta) {
    super(rte);
    this.meta = meta;
  }

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

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

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

  /**
   * Generate a SELECT ... date ... */
  public final EntityWithDSESearch_SelectIndex.Cols date() {
    select.column("date");
    return new EntityWithDSESearch_SelectIndex.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 EntityWithDSESearch_SelectIndex.ColsTM function(final FunctionCall functionCall, final String alias) { functionCall.addToSelect(select, alias); return new EntityWithDSESearch_SelectIndex.ColsTM(select); } /** * Generate ... * FROM ... */ public final EntityWithDSESearch_SelectIndex.F allColumns_FromBaseTable() { final Select.Where where = select.all().from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where(); return new EntityWithDSESearch_SelectIndex.F(where, new CassandraOptions()); } /** * Generate ... * FROM ... using the given SchemaNameProvider */ public final EntityWithDSESearch_SelectIndex.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 EntityWithDSESearch_SelectIndex.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider)); } public class Cols extends AbstractSelectColumns { public Cols(Select.Selection selection) { super(selection); } /** * Generate a SELECT ... id ... */ public final EntityWithDSESearch_SelectIndex.Cols id() { selection.column("id"); return this; } /** * Generate a SELECT ... string ... */ public final EntityWithDSESearch_SelectIndex.Cols string() { selection.column("string"); return this; } /** * Generate a SELECT ... numeric ... */ public final EntityWithDSESearch_SelectIndex.Cols numeric() { selection.column("numeric"); return this; } /** * Generate a SELECT ... date ... */ public final EntityWithDSESearch_SelectIndex.Cols date() { selection.column("date"); 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 EntityWithDSESearch_SelectIndex.ColsTM function(final FunctionCall functionCall, final String alias) { functionCall.addToSelect(selection, alias); return new EntityWithDSESearch_SelectIndex.ColsTM(select); } /** * Generate a ... FROM xxx ... */ public final EntityWithDSESearch_SelectIndex.F fromBaseTable() { final Select.Where where = selection.from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where(); return new EntityWithDSESearch_SelectIndex.F(where, new CassandraOptions()); } /** * Generate a ... FROM xxx ... using the given SchemaNameProvider */ public final EntityWithDSESearch_SelectIndex.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 EntityWithDSESearch_SelectIndex.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider)); } } public class ColsTM extends AbstractSelectColumnsTypeMap { public ColsTM(Select.Selection selection) { super(selection); } /** * Generate a SELECT ... id ... */ public final EntityWithDSESearch_SelectIndex.ColsTM id() { selection.column("id"); return this; } /** * Generate a SELECT ... string ... */ public final EntityWithDSESearch_SelectIndex.ColsTM string() { selection.column("string"); return this; } /** * Generate a SELECT ... numeric ... */ public final EntityWithDSESearch_SelectIndex.ColsTM numeric() { selection.column("numeric"); return this; } /** * Generate a SELECT ... date ... */ public final EntityWithDSESearch_SelectIndex.ColsTM date() { selection.column("date"); 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 EntityWithDSESearch_SelectIndex.ColsTM function(final FunctionCall functionCall, final String alias) { functionCall.addToSelect(selection, alias); return this; } /** * Generate a ... FROM xxx ... */ public final EntityWithDSESearch_SelectIndex.F_TM fromBaseTable() { final Select.Where where = selection.from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where(); return new EntityWithDSESearch_SelectIndex.F_TM(where, new CassandraOptions()); } /** * Generate a ... FROM xxx ... using the given SchemaNameProvider */ public final EntityWithDSESearch_SelectIndex.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 EntityWithDSESearch_SelectIndex.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 EntityWithDSESearch_SelectIndex.W where() { return new EntityWithDSESearch_SelectIndex.W(where, cassandraOptions); } /** * Generate a SELECT statement without the WHERE clause */ public final EntityWithDSESearch_SelectIndex.E without_WHERE_Clause() { return new EntityWithDSESearch_SelectIndex.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 EntityWithDSESearch_SelectIndex.W_TM where() { return new EntityWithDSESearch_SelectIndex.W_TM(where, cassandraOptions); } /** * Generate a SELECT statement without the WHERE clause */ public final EntityWithDSESearch_SelectIndex.E_TM without_WHERE_Clause() { return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } } public final class W extends AbstractSelectWherePartition { public W(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } public final EntityWithDSESearch_SelectIndex.W.Date date() { return new EntityWithDSESearch_SelectIndex.W.Date(); } public final EntityWithDSESearch_SelectIndex.W.Numeric numeric() { return new EntityWithDSESearch_SelectIndex.W.Numeric(); } public final EntityWithDSESearch_SelectIndex.W.String string() { return new EntityWithDSESearch_SelectIndex.W.String(); } /** * Inject a raw Solr query string for DSE Search. Example ...where().RawSolrQuery("(firstname:John* OR lastname:John*) AND age:[30 TO 40]").getList();
Generate a SELECT ... FROM ... WHERE ... solr_query='?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E rawSolrQuery(java.lang.String solr_query) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.rawSolrQuery(solr_query); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } public final class Date { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Eq(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:\"%s\"", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO *]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO *]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[* TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Lt(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[* TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Lte(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt_And_Lt(java.util.Date date_gt, java.util.Date date_lt) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date_gt, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lt, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt_And_Lte(java.util.Date date_gt, java.util.Date date_lte) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date_gt, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lte, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte_And_Lt(java.util.Date date_gte, java.util.Date date_lt) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date_gte, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lt, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte_And_Lte(java.util.Date date_gte, java.util.Date date_lte) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date_gte, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lte, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "date", rawSolrPredicate)); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } } public final class Numeric { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Eq(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO *]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO *]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[* TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Lt(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s}", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[* TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Lte(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt_And_Lt(float numeric_gt, float numeric_lt) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s}", "numeric", meta.numeric.encodeFromJava(numeric_gt, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lt, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt_And_Lte(float numeric_gt, float numeric_lte) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s]", "numeric", meta.numeric.encodeFromJava(numeric_gt, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lte, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte_And_Lt(float numeric_gte, float numeric_lt) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s}", "numeric", meta.numeric.encodeFromJava(numeric_gte, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lt, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte_And_Lte(float numeric_gte, float numeric_lte) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s]", "numeric", meta.numeric.encodeFromJava(numeric_gte, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lte, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "numeric", rawSolrPredicate)); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } } public final class String { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:?*' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E StartWith(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:" + string + "*"); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:*?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E EndWith(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:*" + string); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:*?*' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Contains(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:*" + string + "*"); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Eq(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "string", meta.string.encodeFromJava(string, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "string", rawSolrPredicate)); return new EntityWithDSESearch_SelectIndex.E(where, cassandraOptions); } } } public final class E extends AbstractIndexSelectWhere { 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 EntityWithDSESearch_SelectIndex.E limit(final Integer limit) { where.limit(QueryBuilder.bindMarker("lim")); boundValues.add(limit); encodedValues.add(limit); return this; } @Override protected final EntityWithDSESearch_SelectIndex.E getThis() { return this; } public final EntityWithDSESearch_SelectIndex.E.Id id() { return new EntityWithDSESearch_SelectIndex.E.Id(); } public final EntityWithDSESearch_SelectIndex.E.Date date() { return new EntityWithDSESearch_SelectIndex.E.Date(); } public final EntityWithDSESearch_SelectIndex.E.Numeric numeric() { return new EntityWithDSESearch_SelectIndex.E.Numeric(); } public final EntityWithDSESearch_SelectIndex.E.String string() { return new EntityWithDSESearch_SelectIndex.E.String(); } public final class Id { /** * Generate a SELECT ... FROM ... WHERE ... id = ? */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Eq(Long id) { where.and(QueryBuilder.eq("id", QueryBuilder.bindMarker("id"))); boundValues.add(id); encodedValues.add(meta.id.encodeFromJava(id, Optional.of(cassandraOptions))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... id IN ? */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E IN(Long... id) { Validator.validateTrue(ArrayUtils.isNotEmpty(id), "Varargs for field '%s' should not be null/empty", "id"); where.and(QueryBuilder.in("id",QueryBuilder.bindMarker("id"))); final List varargs = Arrays.asList((Object[])id); final List encodedVarargs = Arrays.stream((Long[])id).map(x -> meta.id.encodeFromJava(x, Optional.of(cassandraOptions))).collect(Collectors.toList()); boundValues.add(varargs); encodedValues.add(encodedVarargs); return EntityWithDSESearch_SelectIndex.E.this; } } public final class Date { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Eq(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:\"%s\"", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO *]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO *]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[* TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Lt(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[* TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Lte(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt_And_Lt(java.util.Date date_gt, java.util.Date date_lt) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date_gt, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lt, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt_And_Lte(java.util.Date date_gt, java.util.Date date_lte) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date_gt, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lte, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte_And_Lt(java.util.Date date_gte, java.util.Date date_lt) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date_gte, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lt, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte_And_Lte(java.util.Date date_gte, java.util.Date date_lte) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date_gte, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lte, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "date", rawSolrPredicate)); return EntityWithDSESearch_SelectIndex.E.this; } } public final class Numeric { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Eq(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO *]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO *]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[* TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Lt(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s}", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[* TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Lte(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt_And_Lt(float numeric_gt, float numeric_lt) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s}", "numeric", meta.numeric.encodeFromJava(numeric_gt, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lt, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gt_And_Lte(float numeric_gt, float numeric_lte) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s]", "numeric", meta.numeric.encodeFromJava(numeric_gt, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lte, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte_And_Lt(float numeric_gte, float numeric_lt) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s}", "numeric", meta.numeric.encodeFromJava(numeric_gte, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lt, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Gte_And_Lte(float numeric_gte, float numeric_lte) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s]", "numeric", meta.numeric.encodeFromJava(numeric_gte, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lte, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "numeric", rawSolrPredicate)); return EntityWithDSESearch_SelectIndex.E.this; } } public final class String { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:?*' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E StartWith(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:" + string + "*"); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:*?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E EndWith(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:*" + string); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:*?*' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Contains(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:*" + string + "*"); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E Eq(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "string", meta.string.encodeFromJava(string, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "string", rawSolrPredicate)); return EntityWithDSESearch_SelectIndex.E.this; } } } public final class W_TM extends AbstractSelectWherePartitionTypeMap { public W_TM(Select.Where where, CassandraOptions cassandraOptions) { super(where, cassandraOptions); } public final EntityWithDSESearch_SelectIndex.W_TM.Date date() { return new EntityWithDSESearch_SelectIndex.W_TM.Date(); } public final EntityWithDSESearch_SelectIndex.W_TM.Numeric numeric() { return new EntityWithDSESearch_SelectIndex.W_TM.Numeric(); } public final EntityWithDSESearch_SelectIndex.W_TM.String string() { return new EntityWithDSESearch_SelectIndex.W_TM.String(); } /** * Inject a raw Solr query string for DSE Search. Example ...where().RawSolrQuery("(firstname:John* OR lastname:John*) AND age:[30 TO 40]").getList();
Generate a SELECT ... FROM ... WHERE ... solr_query='?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM rawSolrQuery(java.lang.String solr_query) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.rawSolrQuery(solr_query); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } public final class Date { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Eq(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:\"%s\"", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO *]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO *]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[* TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Lt(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[* TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Lte(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt_And_Lt(java.util.Date date_gt, java.util.Date date_lt) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date_gt, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lt, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt_And_Lte(java.util.Date date_gt, java.util.Date date_lte) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date_gt, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lte, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte_And_Lt(java.util.Date date_gte, java.util.Date date_lt) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date_gte, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lt, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte_And_Lte(java.util.Date date_gte, java.util.Date date_lte) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date_gte, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lte, Optional.of(cassandraOptions))))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "date", rawSolrPredicate)); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } } public final class Numeric { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Eq(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO *]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO *]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[* TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Lt(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s}", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[* TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Lte(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt_And_Lt(float numeric_gt, float numeric_lt) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s}", "numeric", meta.numeric.encodeFromJava(numeric_gt, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lt, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt_And_Lte(float numeric_gt, float numeric_lte) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s]", "numeric", meta.numeric.encodeFromJava(numeric_gt, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lte, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte_And_Lt(float numeric_gte, float numeric_lt) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s}", "numeric", meta.numeric.encodeFromJava(numeric_gte, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lt, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte_And_Lte(float numeric_gte, float numeric_lte) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s]", "numeric", meta.numeric.encodeFromJava(numeric_gte, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lte, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "numeric", rawSolrPredicate)); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } } public final class String { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:?*' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM StartWith(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:" + string + "*"); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:*?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM EndWith(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:*" + string); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:*?*' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Contains(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:*" + string + "*"); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Eq(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "string", meta.string.encodeFromJava(string, Optional.of(cassandraOptions)))); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "string", rawSolrPredicate)); return new EntityWithDSESearch_SelectIndex.E_TM(where, cassandraOptions); } } } public final class E_TM extends AbstractIndexSelectWhereTypeMap { 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 EntityWithDSESearch_SelectIndex.E_TM limit(final Integer limit) { where.limit(QueryBuilder.bindMarker("lim")); boundValues.add(limit); encodedValues.add(limit); return this; } @Override protected final EntityWithDSESearch_SelectIndex.E_TM getThis() { return this; } public final EntityWithDSESearch_SelectIndex.E_TM.Id id() { return new EntityWithDSESearch_SelectIndex.E_TM.Id(); } public final EntityWithDSESearch_SelectIndex.E_TM.Date date() { return new EntityWithDSESearch_SelectIndex.E_TM.Date(); } public final EntityWithDSESearch_SelectIndex.E_TM.Numeric numeric() { return new EntityWithDSESearch_SelectIndex.E_TM.Numeric(); } public final EntityWithDSESearch_SelectIndex.E_TM.String string() { return new EntityWithDSESearch_SelectIndex.E_TM.String(); } public final class Id { /** * Generate a SELECT ... FROM ... WHERE ... id = ? */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Eq(Long id) { where.and(QueryBuilder.eq("id", QueryBuilder.bindMarker("id"))); boundValues.add(id); encodedValues.add(meta.id.encodeFromJava(id, Optional.of(cassandraOptions))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... id IN ? */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM IN(Long... id) { Validator.validateTrue(ArrayUtils.isNotEmpty(id), "Varargs for field '%s' should not be null/empty", "id"); where.and(QueryBuilder.in("id",QueryBuilder.bindMarker("id"))); final List varargs = Arrays.asList((Object[])id); final List encodedVarargs = Arrays.stream((Long[])id).map(x -> meta.id.encodeFromJava(x, Optional.of(cassandraOptions))).collect(Collectors.toList()); boundValues.add(varargs); encodedValues.add(encodedVarargs); return EntityWithDSESearch_SelectIndex.E_TM.this; } } public final class Date { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Eq(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:\"%s\"", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO *]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO *]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[* TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Lt(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[* TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Lte(java.util.Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt_And_Lt(java.util.Date date_gt, java.util.Date date_lt) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date_gt, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lt, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"{? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt_And_Lte(java.util.Date date_gt, java.util.Date date_lte) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date_gt, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lte, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte_And_Lt(java.util.Date date_gte, java.util.Date date_lt) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s}", "date", dateFormat.format(meta.date.encodeFromJava(date_gte, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lt, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:"[? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte_And_Lte(java.util.Date date_gte, java.util.Date date_lte) { SimpleDateFormat dateFormat = new SimpleDateFormat(DSE_Search.SOLR_DATE_FORMAT); if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s]", "date", dateFormat.format(meta.date.encodeFromJava(date_gte, Optional.of(cassandraOptions))), dateFormat.format(meta.date.encodeFromJava(date_lte, Optional.of(cassandraOptions))))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='date:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "date", rawSolrPredicate)); return EntityWithDSESearch_SelectIndex.E_TM.this; } } public final class Numeric { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Eq(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO *]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO *]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO *]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[* TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Lt(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s}", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[* TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Lte(float numeric) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[* TO %s]", "numeric", meta.numeric.encodeFromJava(numeric, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt_And_Lt(float numeric_gt, float numeric_lt) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s}", "numeric", meta.numeric.encodeFromJava(numeric_gt, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lt, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"{? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gt_And_Lte(float numeric_gt, float numeric_lte) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:{%s TO %s]", "numeric", meta.numeric.encodeFromJava(numeric_gt, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lte, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO ?}"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte_And_Lt(float numeric_gte, float numeric_lt) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s}", "numeric", meta.numeric.encodeFromJava(numeric_gte, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lt, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:"[? TO ?]"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Gte_And_Lte(float numeric_gte, float numeric_lte) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:[%s TO %s]", "numeric", meta.numeric.encodeFromJava(numeric_gte, Optional.of(cassandraOptions)), meta.numeric.encodeFromJava(numeric_lte, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='numeric:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "numeric", rawSolrPredicate)); return EntityWithDSESearch_SelectIndex.E_TM.this; } } public final class String { /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:?*' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM StartWith(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:" + string + "*"); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:*?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM EndWith(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:*" + string); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:*?*' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Contains(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery("string:*" + string + "*"); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:"?"' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM Eq(java.lang.String string) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "string", meta.string.encodeFromJava(string, Optional.of(cassandraOptions)))); return EntityWithDSESearch_SelectIndex.E_TM.this; } /** * Generate a SELECT ... FROM ... WHERE ... solr_query='string:?' */ @SuppressWarnings("static-access") public final EntityWithDSESearch_SelectIndex.E_TM RawPredicate(java.lang.String rawSolrPredicate) { if(!cassandraOptions.hasSolrQuery()) { where.and(QueryBuilder.eq("solr_query", QueryBuilder.bindMarker("solr_query"))); } cassandraOptions.appendToSolrQuery(java.lang.String.format("%s:%s", "string", rawSolrPredicate)); return EntityWithDSESearch_SelectIndex.E_TM.this; } } } }