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.Delete;
import com.datastax.driver.core.querybuilder.NotEq;
import com.datastax.driver.core.querybuilder.QueryBuilder;
import info.archinnov.achilles.generated.meta.entity.EntityForAggregate_AchillesMeta;
import info.archinnov.achilles.internals.dsl.query.delete.AbstractDelete;
import info.archinnov.achilles.internals.dsl.query.delete.AbstractDeleteColumns;
import info.archinnov.achilles.internals.dsl.query.delete.AbstractDeleteEnd;
import info.archinnov.achilles.internals.dsl.query.delete.AbstractDeleteFrom;
import info.archinnov.achilles.internals.dsl.query.delete.AbstractDeleteWherePartition;
import info.archinnov.achilles.internals.entities.EntityForAggregate;
import info.archinnov.achilles.internals.metamodel.AbstractEntityProperty;
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.Double;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ArrayUtils;
public final class EntityForAggregate_Delete extends AbstractDelete {
protected final EntityForAggregate_AchillesMeta meta;
protected final Class entityClass = EntityForAggregate.class;
public EntityForAggregate_Delete(RuntimeEngine rte, EntityForAggregate_AchillesMeta meta) {
super(rte);
this.meta = meta;
}
/**
* Generate DELETE stringval ... */
public final EntityForAggregate_Delete.Cols stringVal() {
delete.column("stringval");
return new EntityForAggregate_Delete.Cols(delete);
}
/**
* Generate DELETE doubleval ... */
public final EntityForAggregate_Delete.Cols doubleVal() {
delete.column("doubleval");
return new EntityForAggregate_Delete.Cols(delete);
}
/**
* Generate ... * FROM ... */
public final EntityForAggregate_Delete.F allColumns_FromBaseTable() {
final Delete.Where where = delete.all().from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where();
return new EntityForAggregate_Delete.F(where, new CassandraOptions());
}
/**
* Generate ... * FROM ... using the given SchemaNameProvider */
public final EntityForAggregate_Delete.F allColumns_From(final SchemaNameProvider schemaNameProvider) {
final String currentKeyspace = lookupKeyspace(schemaNameProvider, meta.entityClass);
final String currentTable = lookupTable(schemaNameProvider, meta.entityClass);
final Delete.Where where = delete.all().from(currentKeyspace, currentTable).where();
return new EntityForAggregate_Delete.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider));
}
public class Cols extends AbstractDeleteColumns {
Cols(Delete.Selection deleteColumns) {
super(deleteColumns);
}
/**
* Generate DELETE stringval ... */
public final EntityForAggregate_Delete.Cols stringVal() {
delete.column("stringval");
return this;
}
/**
* Generate DELETE doubleval ... */
public final EntityForAggregate_Delete.Cols doubleVal() {
delete.column("doubleval");
return this;
}
/**
* Generate a ... FROM xxx ... */
public final EntityForAggregate_Delete.F fromBaseTable() {
final Delete.Where where = deleteColumns.from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where();
return new EntityForAggregate_Delete.F(where, new CassandraOptions());
}
/**
* Generate a ... FROM xxx ... using the given SchemaNameProvider */
public final EntityForAggregate_Delete.F from(final SchemaNameProvider schemaNameProvider) {
final String currentKeyspace = lookupKeyspace(schemaNameProvider, meta.entityClass);
final String currentTable = lookupTable(schemaNameProvider, meta.entityClass);
final Delete.Where where = deleteColumns.from(currentKeyspace, currentTable).where();
return new EntityForAggregate_Delete.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider));
}
}
public class F extends AbstractDeleteFrom {
F(Delete.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final EntityForAggregate_Delete.W_Partition where() {
return new EntityForAggregate_Delete.W_Partition(where, cassandraOptions);
}
}
public final class W_Partition extends AbstractDeleteWherePartition {
public W_Partition(Delete.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final EntityForAggregate_Delete.W_Partition.Relation partition() {
return new EntityForAggregate_Delete.W_Partition.Relation();
}
public final class Relation {
/**
* Generate a SELECT ... FROM ... WHERE ... partition = ? */
@SuppressWarnings("static-access")
public final EntityForAggregate_Delete.W_Clustering Eq(Long partition) {
where.and(QueryBuilder.eq("partition", QueryBuilder.bindMarker("partition")));
boundValues.add(partition);
encodedValues.add(meta.partition.encodeFromJava(partition, Optional.of(cassandraOptions)));
return new EntityForAggregate_Delete.W_Clustering(where, cassandraOptions);
}
/**
* Generate a SELECT ... FROM ... WHERE ... partition IN ? */
@SuppressWarnings("static-access")
public final EntityForAggregate_Delete.W_Clustering IN(Long... partition) {
Validator.validateTrue(ArrayUtils.isNotEmpty(partition), "Varargs for field '%s' should not be null/empty", "partition");
where.and(QueryBuilder.in("partition",QueryBuilder.bindMarker("partition")));
final List