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.NonEscapingSetAssignment;
import com.datastax.driver.core.querybuilder.NotEq;
import com.datastax.driver.core.querybuilder.QueryBuilder;
import com.datastax.driver.core.querybuilder.Update;
import info.archinnov.achilles.generated.meta.entity.MultiClusteringEntity_AchillesMeta;
import info.archinnov.achilles.internals.dsl.query.update.AbstractUpdate;
import info.archinnov.achilles.internals.dsl.query.update.AbstractUpdateColumns;
import info.archinnov.achilles.internals.dsl.query.update.AbstractUpdateEnd;
import info.archinnov.achilles.internals.dsl.query.update.AbstractUpdateFrom;
import info.archinnov.achilles.internals.dsl.query.update.AbstractUpdateWhere;
import info.archinnov.achilles.internals.entities.MultiClusteringEntity;
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.ArrayList;
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 MultiClusteringEntity_Update extends AbstractUpdate {
protected final MultiClusteringEntity_AchillesMeta meta;
protected final Class entityClass = MultiClusteringEntity.class;
public MultiClusteringEntity_Update(RuntimeEngine rte, MultiClusteringEntity_AchillesMeta meta) {
super(rte);
this.meta = meta;
}
/**
* Generate an UPDATE FROM ... */
public final MultiClusteringEntity_Update.F fromBaseTable() {
final String currentKeyspace = meta.getKeyspace().orElse("unknown_keyspace_for_" + meta.entityClass.getCanonicalName());
final Update.Where where = QueryBuilder.update(currentKeyspace, meta.getTableOrViewName()).where();
return new MultiClusteringEntity_Update.F(where, new CassandraOptions());
}
/**
* Generate an UPDATE FROM ... using the given SchemaNameProvider */
public final MultiClusteringEntity_Update.F from(final SchemaNameProvider schemaNameProvider) {
final String currentKeyspace = lookupKeyspace(schemaNameProvider, meta.entityClass);
final String currentTable = lookupTable(schemaNameProvider, meta.entityClass);
final Update.Where where = QueryBuilder.update(currentKeyspace, currentTable).where();
return new MultiClusteringEntity_Update.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider));
}
public class Cols extends AbstractUpdateColumns {
Cols(Update.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final Cols.Value value() {
return new Cols.Value();
}
public final MultiClusteringEntity_Update.W_Id where() {
return new MultiClusteringEntity_Update.W_Id(where, cassandraOptions);
}
public final class Value {
/**
* Generate an UPDATE FROM ... SET value = ? */
@SuppressWarnings("static-access")
public final MultiClusteringEntity_Update.Cols Set(final String value) {
where.with(NonEscapingSetAssignment.of("value", QueryBuilder.bindMarker("value")));
boundValues.add(value);
encodedValues.add(meta.value.encodeFromJava(value, Optional.of(cassandraOptions)));
return MultiClusteringEntity_Update.Cols.this;
}
/**
* Generate an UPDATE FROM ... SET value = fromJson(?) */
public final MultiClusteringEntity_Update.Cols Set_FromJSON(final String value_element) {
where.with(NonEscapingSetAssignment.of("value", QueryBuilder.fromJson(QueryBuilder.bindMarker("value"))));
boundValues.add(value_element);
encodedValues.add(value_element);
return MultiClusteringEntity_Update.Cols.this;
}
}
}
public class F extends AbstractUpdateFrom {
F(Update.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final F.Value value() {
return new F.Value();
}
public final class Value {
/**
* Generate an UPDATE FROM ... SET value = ? */
@SuppressWarnings("static-access")
public final MultiClusteringEntity_Update.Cols Set(final String value) {
where.with(NonEscapingSetAssignment.of("value", QueryBuilder.bindMarker("value")));
boundValues.add(value);
encodedValues.add(meta.value.encodeFromJava(value, Optional.of(cassandraOptions)));
return new MultiClusteringEntity_Update.Cols(where, cassandraOptions);
}
/**
* Generate an UPDATE FROM ... SET value = fromJson(?) */
public final MultiClusteringEntity_Update.Cols Set_FromJSON(final String value_element) {
where.with(NonEscapingSetAssignment.of("value", QueryBuilder.fromJson(QueryBuilder.bindMarker("value"))));
boundValues.add(value_element);
encodedValues.add(value_element);
return new MultiClusteringEntity_Update.Cols(where, cassandraOptions);
}
}
}
public final class W_Id extends AbstractUpdateWhere {
public W_Id(Update.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final MultiClusteringEntity_Update.W_Id.Relation id() {
return new MultiClusteringEntity_Update.W_Id.Relation();
}
public final class Relation {
/**
* Generate a SELECT ... FROM ... WHERE ... id = ? */
@SuppressWarnings("static-access")
public final MultiClusteringEntity_Update.W_C1 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 MultiClusteringEntity_Update.W_C1(where, cassandraOptions);
}
/**
* Generate a SELECT ... FROM ... WHERE ... id IN ? */
@SuppressWarnings("static-access")
public final MultiClusteringEntity_Update.W_C1 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