Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
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.EntityWithIndexOnClustering_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.EntityWithIndexOnClustering;
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 EntityWithIndexOnClustering_SelectIndex extends AbstractSelect {
protected final EntityWithIndexOnClustering_AchillesMeta meta;
protected final Class entityClass = EntityWithIndexOnClustering.class;
public EntityWithIndexOnClustering_SelectIndex(RuntimeEngine rte, EntityWithIndexOnClustering_AchillesMeta meta) {
super(rte);
this.meta = meta;
}
/**
* Generate a SELECT ... partition ... */
public final EntityWithIndexOnClustering_SelectIndex.Cols partition() {
select.column("partition");
return new EntityWithIndexOnClustering_SelectIndex.Cols(select);
}
/**
* Generate a SELECT ... clustering ... */
public final EntityWithIndexOnClustering_SelectIndex.Cols clustering() {
select.column("clustering");
return new EntityWithIndexOnClustering_SelectIndex.Cols(select);
}
/**
* Generate a SELECT ... value ... */
public final EntityWithIndexOnClustering_SelectIndex.Cols value() {
select.column("value");
return new EntityWithIndexOnClustering_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 EntityWithIndexOnClustering_SelectIndex.ColsTM function(final FunctionCall functionCall, final String alias) {
functionCall.addToSelect(select, alias);
return new EntityWithIndexOnClustering_SelectIndex.ColsTM(select);
}
/**
* Generate ... * FROM ... */
public final EntityWithIndexOnClustering_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 EntityWithIndexOnClustering_SelectIndex.F(where, new CassandraOptions());
}
/**
* Generate ... * FROM ... using the given SchemaNameProvider */
public final EntityWithIndexOnClustering_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 EntityWithIndexOnClustering_SelectIndex.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider));
}
public class Cols extends AbstractSelectColumns {
public Cols(Select.Selection selection) {
super(selection);
}
/**
* Generate a SELECT ... partition ... */
public final EntityWithIndexOnClustering_SelectIndex.Cols partition() {
selection.column("partition");
return this;
}
/**
* Generate a SELECT ... clustering ... */
public final EntityWithIndexOnClustering_SelectIndex.Cols clustering() {
selection.column("clustering");
return this;
}
/**
* Generate a SELECT ... value ... */
public final EntityWithIndexOnClustering_SelectIndex.Cols value() {
selection.column("value");
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 EntityWithIndexOnClustering_SelectIndex.ColsTM function(final FunctionCall functionCall, final String alias) {
functionCall.addToSelect(selection, alias);
return new EntityWithIndexOnClustering_SelectIndex.ColsTM(select);
}
/**
* Generate a ... FROM xxx ... */
public final EntityWithIndexOnClustering_SelectIndex.F fromBaseTable() {
final Select.Where where = selection.from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where();
return new EntityWithIndexOnClustering_SelectIndex.F(where, new CassandraOptions());
}
/**
* Generate a ... FROM xxx ... using the given SchemaNameProvider */
public final EntityWithIndexOnClustering_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 EntityWithIndexOnClustering_SelectIndex.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider));
}
}
public class ColsTM extends AbstractSelectColumnsTypeMap {
public ColsTM(Select.Selection selection) {
super(selection);
}
/**
* Generate a SELECT ... partition ... */
public final EntityWithIndexOnClustering_SelectIndex.ColsTM partition() {
selection.column("partition");
return this;
}
/**
* Generate a SELECT ... clustering ... */
public final EntityWithIndexOnClustering_SelectIndex.ColsTM clustering() {
selection.column("clustering");
return this;
}
/**
* Generate a SELECT ... value ... */
public final EntityWithIndexOnClustering_SelectIndex.ColsTM value() {
selection.column("value");
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 EntityWithIndexOnClustering_SelectIndex.ColsTM function(final FunctionCall functionCall, final String alias) {
functionCall.addToSelect(selection, alias);
return this;
}
/**
* Generate a ... FROM xxx ... */
public final EntityWithIndexOnClustering_SelectIndex.F_TM fromBaseTable() {
final Select.Where where = selection.from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where();
return new EntityWithIndexOnClustering_SelectIndex.F_TM(where, new CassandraOptions());
}
/**
* Generate a ... FROM xxx ... using the given SchemaNameProvider */
public final EntityWithIndexOnClustering_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 EntityWithIndexOnClustering_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 EntityWithIndexOnClustering_SelectIndex.W where() {
return new EntityWithIndexOnClustering_SelectIndex.W(where, cassandraOptions);
}
/**
* Generate a SELECT statement without the WHERE clause */
public final EntityWithIndexOnClustering_SelectIndex.E without_WHERE_Clause() {
return new EntityWithIndexOnClustering_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 EntityWithIndexOnClustering_SelectIndex.W_TM where() {
return new EntityWithIndexOnClustering_SelectIndex.W_TM(where, cassandraOptions);
}
/**
* Generate a SELECT statement without the WHERE clause */
public final EntityWithIndexOnClustering_SelectIndex.E_TM without_WHERE_Clause() {
return new EntityWithIndexOnClustering_SelectIndex.E_TM(where, cassandraOptions);
}
}
public final class W extends AbstractSelectWherePartition {
public W(Select.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final EntityWithIndexOnClustering_SelectIndex.W.Indexed_Clustering indexed_clustering() {
return new EntityWithIndexOnClustering_SelectIndex.W.Indexed_Clustering();
}
public final class Indexed_Clustering {
/**
* Generate a SELECT ... FROM ... WHERE ... clustering = ? */
@SuppressWarnings("static-access")
public final EntityWithIndexOnClustering_SelectIndex.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 EntityWithIndexOnClustering_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