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.EntityWithCustomConstructorAndDeclaredFields_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.EntityWithCustomConstructorAndDeclaredFields;
import info.archinnov.achilles.internals.entities.UDTWithCustomConstructorAndDeclaredFields;
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.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 EntityWithCustomConstructorAndDeclaredFields_Delete extends AbstractDelete {
protected final EntityWithCustomConstructorAndDeclaredFields_AchillesMeta meta;
protected final Class entityClass = EntityWithCustomConstructorAndDeclaredFields.class;
public EntityWithCustomConstructorAndDeclaredFields_Delete(RuntimeEngine rte, EntityWithCustomConstructorAndDeclaredFields_AchillesMeta meta) {
super(rte);
this.meta = meta;
}
/**
* Generate DELETE name ... */
public final EntityWithCustomConstructorAndDeclaredFields_Delete.Cols name() {
delete.column("name");
return new EntityWithCustomConstructorAndDeclaredFields_Delete.Cols(delete);
}
/**
* Generate DELETE value ... */
public final EntityWithCustomConstructorAndDeclaredFields_Delete.Cols value() {
delete.column("value");
return new EntityWithCustomConstructorAndDeclaredFields_Delete.Cols(delete);
}
/**
* Generate DELETE udt ... */
public final EntityWithCustomConstructorAndDeclaredFields_Delete.Cols udt() {
delete.column("udt");
return new EntityWithCustomConstructorAndDeclaredFields_Delete.Cols(delete);
}
/**
* Generate ... * FROM ... */
public final EntityWithCustomConstructorAndDeclaredFields_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 EntityWithCustomConstructorAndDeclaredFields_Delete.F(where, new CassandraOptions());
}
/**
* Generate ... * FROM ... using the given SchemaNameProvider */
public final EntityWithCustomConstructorAndDeclaredFields_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 EntityWithCustomConstructorAndDeclaredFields_Delete.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider));
}
public class Cols extends AbstractDeleteColumns {
Cols(Delete.Selection deleteColumns) {
super(deleteColumns);
}
/**
* Generate DELETE name ... */
public final EntityWithCustomConstructorAndDeclaredFields_Delete.Cols name() {
delete.column("name");
return this;
}
/**
* Generate DELETE value ... */
public final EntityWithCustomConstructorAndDeclaredFields_Delete.Cols value() {
delete.column("value");
return this;
}
/**
* Generate DELETE udt ... */
public final EntityWithCustomConstructorAndDeclaredFields_Delete.Cols udt() {
delete.column("udt");
return this;
}
/**
* Generate a ... FROM xxx ... */
public final EntityWithCustomConstructorAndDeclaredFields_Delete.F fromBaseTable() {
final Delete.Where where = deleteColumns.from(meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName()), meta.getTableOrViewName()).where();
return new EntityWithCustomConstructorAndDeclaredFields_Delete.F(where, new CassandraOptions());
}
/**
* Generate a ... FROM xxx ... using the given SchemaNameProvider */
public final EntityWithCustomConstructorAndDeclaredFields_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 EntityWithCustomConstructorAndDeclaredFields_Delete.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider));
}
}
public class F extends AbstractDeleteFrom {
F(Delete.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final EntityWithCustomConstructorAndDeclaredFields_Delete.W_Id where() {
return new EntityWithCustomConstructorAndDeclaredFields_Delete.W_Id(where, cassandraOptions);
}
}
public final class W_Id extends AbstractDeleteWherePartition {
public W_Id(Delete.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final EntityWithCustomConstructorAndDeclaredFields_Delete.W_Id.Relation id() {
return new EntityWithCustomConstructorAndDeclaredFields_Delete.W_Id.Relation();
}
public final class Relation {
/**
* Generate a SELECT ... FROM ... WHERE ... id = ? */
@SuppressWarnings("static-access")
public final EntityWithCustomConstructorAndDeclaredFields_Delete.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 new EntityWithCustomConstructorAndDeclaredFields_Delete.E(where, cassandraOptions);
}
/**
* Generate a SELECT ... FROM ... WHERE ... id IN ? */
@SuppressWarnings("static-access")
public final EntityWithCustomConstructorAndDeclaredFields_Delete.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