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.EntityWithStaticColumn_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.EntityWithStaticColumn;
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 EntityWithStaticColumn_UpdateStatic extends AbstractUpdate {
protected final EntityWithStaticColumn_AchillesMeta meta;
protected final Class entityClass = EntityWithStaticColumn.class;
public EntityWithStaticColumn_UpdateStatic(RuntimeEngine rte, EntityWithStaticColumn_AchillesMeta meta) {
super(rte);
this.meta = meta;
}
/**
* Generate an UPDATE FROM ... */
public final EntityWithStaticColumn_UpdateStatic.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 EntityWithStaticColumn_UpdateStatic.F(where, new CassandraOptions());
}
/**
* Generate an UPDATE FROM ... using the given SchemaNameProvider */
public final EntityWithStaticColumn_UpdateStatic.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 EntityWithStaticColumn_UpdateStatic.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider));
}
public class Cols extends AbstractUpdateColumns {
Cols(Update.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final Cols.StaticCol staticCol() {
return new Cols.StaticCol();
}
public final Cols.AnotherStaticCol anotherStaticCol() {
return new Cols.AnotherStaticCol();
}
public final EntityWithStaticColumn_UpdateStatic.W_Id where() {
return new EntityWithStaticColumn_UpdateStatic.W_Id(where, cassandraOptions);
}
public final class StaticCol {
/**
* Generate an UPDATE FROM ... SET static_col = ? */
@SuppressWarnings("static-access")
public final EntityWithStaticColumn_UpdateStatic.Cols Set(final String staticCol) {
where.with(NonEscapingSetAssignment.of("static_col", QueryBuilder.bindMarker("static_col")));
boundValues.add(staticCol);
encodedValues.add(meta.staticCol.encodeFromJava(staticCol, Optional.of(cassandraOptions)));
return EntityWithStaticColumn_UpdateStatic.Cols.this;
}
}
public final class AnotherStaticCol {
/**
* Generate an UPDATE FROM ... SET another_static_col = ? */
@SuppressWarnings("static-access")
public final EntityWithStaticColumn_UpdateStatic.Cols Set(final String anotherStaticCol) {
where.with(NonEscapingSetAssignment.of("another_static_col", QueryBuilder.bindMarker("another_static_col")));
boundValues.add(anotherStaticCol);
encodedValues.add(meta.anotherStaticCol.encodeFromJava(anotherStaticCol, Optional.of(cassandraOptions)));
return EntityWithStaticColumn_UpdateStatic.Cols.this;
}
}
}
public class F extends AbstractUpdateFrom {
F(Update.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final F.StaticCol staticCol() {
return new F.StaticCol();
}
public final F.AnotherStaticCol anotherStaticCol() {
return new F.AnotherStaticCol();
}
public final class StaticCol {
/**
* Generate an UPDATE FROM ... SET static_col = ? */
@SuppressWarnings("static-access")
public final EntityWithStaticColumn_UpdateStatic.Cols Set(final String staticCol) {
where.with(NonEscapingSetAssignment.of("static_col", QueryBuilder.bindMarker("static_col")));
boundValues.add(staticCol);
encodedValues.add(meta.staticCol.encodeFromJava(staticCol, Optional.of(cassandraOptions)));
return new EntityWithStaticColumn_UpdateStatic.Cols(where, cassandraOptions);
}
}
public final class AnotherStaticCol {
/**
* Generate an UPDATE FROM ... SET another_static_col = ? */
@SuppressWarnings("static-access")
public final EntityWithStaticColumn_UpdateStatic.Cols Set(final String anotherStaticCol) {
where.with(NonEscapingSetAssignment.of("another_static_col", QueryBuilder.bindMarker("another_static_col")));
boundValues.add(anotherStaticCol);
encodedValues.add(meta.anotherStaticCol.encodeFromJava(anotherStaticCol, Optional.of(cassandraOptions)));
return new EntityWithStaticColumn_UpdateStatic.Cols(where, cassandraOptions);
}
}
}
public final class W_Id extends AbstractUpdateWhere {
public W_Id(Update.Where where, CassandraOptions cassandraOptions) {
super(where, cassandraOptions);
}
public final EntityWithStaticColumn_UpdateStatic.W_Id.Relation id() {
return new EntityWithStaticColumn_UpdateStatic.W_Id.Relation();
}
public final class Relation {
/**
* Generate a SELECT ... FROM ... WHERE ... id = ? */
@SuppressWarnings("static-access")
public final EntityWithStaticColumn_UpdateStatic.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 EntityWithStaticColumn_UpdateStatic.E(where, cassandraOptions);
}
/**
* Generate a SELECT ... FROM ... WHERE ... id IN ? */
@SuppressWarnings("static-access")
public final EntityWithStaticColumn_UpdateStatic.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