All Downloads are FREE. Search and download functionalities are using the official Maven repository.

info.archinnov.achilles.generated.dsl.EntityWithNativeCollections_Update Maven / Gradle / Ivy

The newest version!
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.EntityWithNativeCollections_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.EntityWithNativeCollections;
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.type.tuples.Tuple2;
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.SuppressWarnings;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ArrayUtils;

public final class EntityWithNativeCollections_Update extends AbstractUpdate {
  protected final EntityWithNativeCollections_AchillesMeta meta;

  protected final Class entityClass = EntityWithNativeCollections.class;

  public EntityWithNativeCollections_Update(RuntimeEngine rte, EntityWithNativeCollections_AchillesMeta meta) {
    super(rte);
    this.meta = meta;
  }

  /**
   * Generate an UPDATE FROM ... */
  public final EntityWithNativeCollections_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 EntityWithNativeCollections_Update.F(where, new CassandraOptions());
  }

  /**
   * Generate an UPDATE FROM ... using the given SchemaNameProvider */
  public final EntityWithNativeCollections_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 EntityWithNativeCollections_Update.F(where, CassandraOptions.withSchemaNameProvider(schemaNameProvider));
  }

  public class Cols extends AbstractUpdateColumns {
    Cols(Update.Where where, CassandraOptions cassandraOptions) {
      super(where, cassandraOptions);
    }

    public final Cols.LongList longList() {
      return new Cols.LongList();
    }

    public final Cols.DoubleList doubleList() {
      return new Cols.DoubleList();
    }

    public final Cols.MapIntLong mapIntLong() {
      return new Cols.MapIntLong();
    }

    public final Cols.Tuple2 tuple2() {
      return new Cols.Tuple2();
    }

    public final EntityWithNativeCollections_Update.W_Id where() {
      return new EntityWithNativeCollections_Update.W_Id(where, cassandraOptions);
    }

    public final class LongList {
      /**
       * Generate an UPDATE FROM ... SET longlist = longlist + [?] */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols AppendTo(final Long longList_element) {
        where.with(QueryBuilder.appendAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(Arrays.asList(longList_element));
        encodedValues.add(meta.longList.encodeFromJava(Arrays.asList(longList_element), Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET longList = longList + ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols AppendAllTo(final List longList_element) {
        where.with(QueryBuilder.appendAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(longList_element);
        encodedValues.add(meta.longList.encodeFromJava(longList_element, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET longList = [?] + longList */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols PrependTo(final Long longList_element) {
        where.with(QueryBuilder.prependAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(Arrays.asList(longList_element));
        encodedValues.add(meta.longList.encodeFromJava(Arrays.asList(longList_element), Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET longList = ? + longList */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols PrependAllTo(final List longList_element) {
        where.with(QueryBuilder.prependAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(longList_element);
        encodedValues.add(meta.longList.encodeFromJava(longList_element, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET longList[index] = ? */
      public final EntityWithNativeCollections_Update.Cols SetAtIndex(final int index, final Long longList_element) {
        where.with(QueryBuilder.setIdx("longlist", index, QueryBuilder.bindMarker("longlist")));
        boundValues.add(longList_element);
        encodedValues.add(meta.longList.valueProperty.encodeFromJava(longList_element, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET longList[index] = null */
      public final EntityWithNativeCollections_Update.Cols RemoveAtIndex(final int index) {
        where.with(QueryBuilder.setIdx("longlist", index, QueryBuilder.bindMarker("longlist")));
        boundValues.add(null);
        encodedValues.add(null);
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET longList = longList - [?] */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols RemoveFrom(final Long longList_element) {
        where.with(QueryBuilder.discardAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(Arrays.asList(longList_element));
        encodedValues.add(meta.longList.encodeFromJava(Arrays.asList(longList_element), Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET longList = longList - ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols RemoveAllFrom(final List longList_element) {
        where.with(QueryBuilder.discardAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(longList_element);
        encodedValues.add(meta.longList.encodeFromJava(longList_element, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET longList = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols Set(final List longList_element) {
        where.with(NonEscapingSetAssignment.of("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(longList_element);
        encodedValues.add(meta.longList.encodeFromJava(longList_element, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }
    }

    public final class DoubleList {
      /**
       * Generate an UPDATE FROM ... SET doublelist = doublelist + [?] */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols AppendTo(final Double doubleList_element) {
        where.with(QueryBuilder.appendAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(Arrays.asList(doubleList_element));
        encodedValues.add(meta.doubleList.encodeFromJava(Arrays.asList(doubleList_element), Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = doubleList + ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols AppendAllTo(final List doubleList_element) {
        where.with(QueryBuilder.appendAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(doubleList_element);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList_element, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = [?] + doubleList */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols PrependTo(final Double doubleList_element) {
        where.with(QueryBuilder.prependAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(Arrays.asList(doubleList_element));
        encodedValues.add(meta.doubleList.encodeFromJava(Arrays.asList(doubleList_element), Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = ? + doubleList */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols PrependAllTo(final List doubleList_element) {
        where.with(QueryBuilder.prependAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(doubleList_element);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList_element, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList[index] = ? */
      public final EntityWithNativeCollections_Update.Cols SetAtIndex(final int index, final Double doubleList_element) {
        where.with(QueryBuilder.setIdx("doublelist", index, QueryBuilder.bindMarker("doublelist")));
        boundValues.add(doubleList_element);
        encodedValues.add(meta.doubleList.valueProperty.encodeFromJava(doubleList_element, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList[index] = null */
      public final EntityWithNativeCollections_Update.Cols RemoveAtIndex(final int index) {
        where.with(QueryBuilder.setIdx("doublelist", index, QueryBuilder.bindMarker("doublelist")));
        boundValues.add(null);
        encodedValues.add(null);
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = doubleList - [?] */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols RemoveFrom(final Double doubleList_element) {
        where.with(QueryBuilder.discardAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(Arrays.asList(doubleList_element));
        encodedValues.add(meta.doubleList.encodeFromJava(Arrays.asList(doubleList_element), Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = doubleList - ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols RemoveAllFrom(final List doubleList_element) {
        where.with(QueryBuilder.discardAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(doubleList_element);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList_element, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols Set(final List doubleList_element) {
        where.with(NonEscapingSetAssignment.of("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(doubleList_element);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList_element, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }
    }

    public final class MapIntLong {
      /**
       * Generate an UPDATE FROM ... SET mapintlong[?] = ? */
      public final EntityWithNativeCollections_Update.Cols PutTo(final Integer mapIntLong_key, final Long mapIntLong_value) {
        where.with(QueryBuilder.put("mapintlong", QueryBuilder.bindMarker("mapIntLong_key"), QueryBuilder.bindMarker("mapIntLong_value")));
        boundValues.add(mapIntLong_key);
        boundValues.add(mapIntLong_value);
        encodedValues.add(meta.mapIntLong.keyProperty.encodeFromJava(mapIntLong_key, Optional.of(cassandraOptions)));
        encodedValues.add(meta.mapIntLong.valueProperty.encodeFromJava(mapIntLong_value, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET mapIntLong = mapIntLong + ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols AddAllTo(final Map mapIntLong) {
        where.with(QueryBuilder.addAll("mapintlong", QueryBuilder.bindMarker("mapintlong")));
        boundValues.add(mapIntLong);
        encodedValues.add(meta.mapIntLong.encodeFromJava(mapIntLong, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET mapIntLong[?] = null */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols RemoveByKey(final Integer mapIntLong_key) {
        where.with(QueryBuilder.put("mapintlong", QueryBuilder.bindMarker("mapIntLong_key"), QueryBuilder.bindMarker("mapIntLong_value")));
        boundValues.add(mapIntLong_key);
        boundValues.add(null);
        encodedValues.add(meta.mapIntLong.keyProperty.encodeFromJava(mapIntLong_key, Optional.of(cassandraOptions)));
        encodedValues.add(null);
        return EntityWithNativeCollections_Update.Cols.this;
      }

      /**
       * Generate an UPDATE FROM ... SET mapIntLong = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols Set(final Map mapIntLong) {
        where.with(NonEscapingSetAssignment.of("mapintlong", QueryBuilder.bindMarker("mapintlong")));
        boundValues.add(mapIntLong);
        encodedValues.add(meta.mapIntLong.encodeFromJava(mapIntLong, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }
    }

    public final class Tuple2 {
      /**
       * Generate an UPDATE FROM ... SET tuple2 = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols Set(final info.archinnov.achilles.type.tuples.Tuple2, List> tuple2) {
        where.with(NonEscapingSetAssignment.of("tuple2", QueryBuilder.bindMarker("tuple2")));
        boundValues.add(tuple2);
        encodedValues.add(meta.tuple2.encodeFromJava(tuple2, Optional.of(cassandraOptions)));
        return EntityWithNativeCollections_Update.Cols.this;
      }
    }
  }

  public class F extends AbstractUpdateFrom {
    F(Update.Where where, CassandraOptions cassandraOptions) {
      super(where, cassandraOptions);
    }

    public final F.LongList longList() {
      return new F.LongList();
    }

    public final F.DoubleList doubleList() {
      return new F.DoubleList();
    }

    public final F.MapIntLong mapIntLong() {
      return new F.MapIntLong();
    }

    public final F.Tuple2 tuple2() {
      return new F.Tuple2();
    }

    public final class LongList {
      /**
       * Generate an UPDATE FROM ... SET longlist = longlist + [?] */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols AppendTo(final Long longList_element) {
        where.with(QueryBuilder.appendAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(Arrays.asList(longList_element));
        encodedValues.add(meta.longList.encodeFromJava(Arrays.asList(longList_element), Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET longList = longList + ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols AppendAllTo(final List longList_element) {
        where.with(QueryBuilder.appendAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(longList_element);
        encodedValues.add(meta.longList.encodeFromJava(longList_element, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET longList = [?] + longList */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols PrependTo(final Long longList_element) {
        where.with(QueryBuilder.prependAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(Arrays.asList(longList_element));
        encodedValues.add(meta.longList.encodeFromJava(Arrays.asList(longList_element), Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET longList = ? + longList */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols PrependAllTo(final List longList_element) {
        where.with(QueryBuilder.prependAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(longList_element);
        encodedValues.add(meta.longList.encodeFromJava(longList_element, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET longList[index] = ? */
      public final EntityWithNativeCollections_Update.Cols SetAtIndex(final int index, final Long longList_element) {
        where.with(QueryBuilder.setIdx("longlist", index, QueryBuilder.bindMarker("longlist")));
        boundValues.add(longList_element);
        encodedValues.add(meta.longList.valueProperty.encodeFromJava(longList_element, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET longList[index] = null */
      public final EntityWithNativeCollections_Update.Cols RemoveAtIndex(final int index) {
        where.with(QueryBuilder.setIdx("longlist", index, QueryBuilder.bindMarker("longlist")));
        boundValues.add(null);
        encodedValues.add(null);
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET longList = longList - [?] */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols RemoveFrom(final Long longList_element) {
        where.with(QueryBuilder.discardAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(Arrays.asList(longList_element));
        encodedValues.add(meta.longList.encodeFromJava(Arrays.asList(longList_element), Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET longList = longList - ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols RemoveAllFrom(final List longList_element) {
        where.with(QueryBuilder.discardAll("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(longList_element);
        encodedValues.add(meta.longList.encodeFromJava(longList_element, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET longList = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols Set(final List longList_element) {
        where.with(NonEscapingSetAssignment.of("longlist", QueryBuilder.bindMarker("longlist")));
        boundValues.add(longList_element);
        encodedValues.add(meta.longList.encodeFromJava(longList_element, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }
    }

    public final class DoubleList {
      /**
       * Generate an UPDATE FROM ... SET doublelist = doublelist + [?] */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols AppendTo(final Double doubleList_element) {
        where.with(QueryBuilder.appendAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(Arrays.asList(doubleList_element));
        encodedValues.add(meta.doubleList.encodeFromJava(Arrays.asList(doubleList_element), Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = doubleList + ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols AppendAllTo(final List doubleList_element) {
        where.with(QueryBuilder.appendAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(doubleList_element);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList_element, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = [?] + doubleList */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols PrependTo(final Double doubleList_element) {
        where.with(QueryBuilder.prependAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(Arrays.asList(doubleList_element));
        encodedValues.add(meta.doubleList.encodeFromJava(Arrays.asList(doubleList_element), Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = ? + doubleList */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols PrependAllTo(final List doubleList_element) {
        where.with(QueryBuilder.prependAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(doubleList_element);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList_element, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList[index] = ? */
      public final EntityWithNativeCollections_Update.Cols SetAtIndex(final int index, final Double doubleList_element) {
        where.with(QueryBuilder.setIdx("doublelist", index, QueryBuilder.bindMarker("doublelist")));
        boundValues.add(doubleList_element);
        encodedValues.add(meta.doubleList.valueProperty.encodeFromJava(doubleList_element, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList[index] = null */
      public final EntityWithNativeCollections_Update.Cols RemoveAtIndex(final int index) {
        where.with(QueryBuilder.setIdx("doublelist", index, QueryBuilder.bindMarker("doublelist")));
        boundValues.add(null);
        encodedValues.add(null);
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = doubleList - [?] */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols RemoveFrom(final Double doubleList_element) {
        where.with(QueryBuilder.discardAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(Arrays.asList(doubleList_element));
        encodedValues.add(meta.doubleList.encodeFromJava(Arrays.asList(doubleList_element), Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = doubleList - ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols RemoveAllFrom(final List doubleList_element) {
        where.with(QueryBuilder.discardAll("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(doubleList_element);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList_element, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET doubleList = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols Set(final List doubleList_element) {
        where.with(NonEscapingSetAssignment.of("doublelist", QueryBuilder.bindMarker("doublelist")));
        boundValues.add(doubleList_element);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList_element, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }
    }

    public final class MapIntLong {
      /**
       * Generate an UPDATE FROM ... SET mapintlong[?] = ? */
      public final EntityWithNativeCollections_Update.Cols PutTo(final Integer mapIntLong_key, final Long mapIntLong_value) {
        where.with(QueryBuilder.put("mapintlong", QueryBuilder.bindMarker("mapIntLong_key"), QueryBuilder.bindMarker("mapIntLong_value")));
        boundValues.add(mapIntLong_key);
        boundValues.add(mapIntLong_value);
        encodedValues.add(meta.mapIntLong.keyProperty.encodeFromJava(mapIntLong_key, Optional.of(cassandraOptions)));
        encodedValues.add(meta.mapIntLong.valueProperty.encodeFromJava(mapIntLong_value, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET mapIntLong = mapIntLong + ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols AddAllTo(final Map mapIntLong) {
        where.with(QueryBuilder.addAll("mapintlong", QueryBuilder.bindMarker("mapintlong")));
        boundValues.add(mapIntLong);
        encodedValues.add(meta.mapIntLong.encodeFromJava(mapIntLong, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET mapIntLong[?] = null */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols RemoveByKey(final Integer mapIntLong_key) {
        where.with(QueryBuilder.put("mapintlong", QueryBuilder.bindMarker("mapIntLong_key"), QueryBuilder.bindMarker("mapIntLong_value")));
        boundValues.add(mapIntLong_key);
        boundValues.add(null);
        encodedValues.add(meta.mapIntLong.keyProperty.encodeFromJava(mapIntLong_key, Optional.of(cassandraOptions)));
        encodedValues.add(null);
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }

      /**
       * Generate an UPDATE FROM ... SET mapIntLong = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols Set(final Map mapIntLong) {
        where.with(NonEscapingSetAssignment.of("mapintlong", QueryBuilder.bindMarker("mapintlong")));
        boundValues.add(mapIntLong);
        encodedValues.add(meta.mapIntLong.encodeFromJava(mapIntLong, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }
    }

    public final class Tuple2 {
      /**
       * Generate an UPDATE FROM ... SET tuple2 = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.Cols Set(final info.archinnov.achilles.type.tuples.Tuple2, List> tuple2) {
        where.with(NonEscapingSetAssignment.of("tuple2", QueryBuilder.bindMarker("tuple2")));
        boundValues.add(tuple2);
        encodedValues.add(meta.tuple2.encodeFromJava(tuple2, Optional.of(cassandraOptions)));
        return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions);
      }
    }
  }

  public final class W_Id extends AbstractUpdateWhere {
    public W_Id(Update.Where where, CassandraOptions cassandraOptions) {
      super(where, cassandraOptions);
    }

    public final EntityWithNativeCollections_Update.W_Id.Relation id() {
      return new EntityWithNativeCollections_Update.W_Id.Relation();
    }

    public final class Relation {
      /**
       * Generate a SELECT ... FROM ... WHERE ... id = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.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 EntityWithNativeCollections_Update.E(where, cassandraOptions);
      }

      /**
       * Generate a SELECT ... FROM ... WHERE ... id IN ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.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 varargs = Arrays.asList((Object[])id);
        final List encodedVarargs = Arrays.stream((Long[])id).map(x -> meta.id.encodeFromJava(x, Optional.of(cassandraOptions))).collect(Collectors.toList());
        boundValues.add(varargs);
        encodedValues.add(encodedVarargs);
        return new EntityWithNativeCollections_Update.E(where, cassandraOptions);
      }
    }
  }

  public final class E extends AbstractUpdateEnd {
    public E(Update.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 getBoundValuesInternal() {
      return boundValues;
    }

    @Override
    protected final List getEncodedValuesInternal() {
      return encodedValues;
    }

    @Override
    protected final EntityWithNativeCollections_Update.E getThis() {
      return this;
    }

    public final E.If_LongList if_LongList() {
      return new E.If_LongList();
    }

    public final E.If_DoubleList if_DoubleList() {
      return new E.If_DoubleList();
    }

    public final E.If_MapIntLong if_MapIntLong() {
      return new E.If_MapIntLong();
    }

    public final E.If_Tuple2 if_Tuple2() {
      return new E.If_Tuple2();
    }

    public final class If_LongList {
      /**
       * Generate an ... IF longList = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Eq(final List longList) {
        boundValues.add(longList);
        encodedValues.add(meta.longList.encodeFromJava(longList, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.eq("longlist", QueryBuilder.bindMarker("longlist")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF longList > ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Gt(final List longList) {
        boundValues.add(longList);
        encodedValues.add(meta.longList.encodeFromJava(longList, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.gt("longlist", QueryBuilder.bindMarker("longlist")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF longList >= ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Gte(final List longList) {
        boundValues.add(longList);
        encodedValues.add(meta.longList.encodeFromJava(longList, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.gte("longlist", QueryBuilder.bindMarker("longlist")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF longList < ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Lt(final List longList) {
        boundValues.add(longList);
        encodedValues.add(meta.longList.encodeFromJava(longList, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.lt("longlist", QueryBuilder.bindMarker("longlist")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF longList <= ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Lte(final List longList) {
        boundValues.add(longList);
        encodedValues.add(meta.longList.encodeFromJava(longList, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.lte("longlist", QueryBuilder.bindMarker("longlist")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an  ... IF longList != ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E NotEq(final List longList) {
        boundValues.add(longList);
        encodedValues.add(meta.longList.encodeFromJava(longList, Optional.of(cassandraOptions)));
        where.onlyIf(NotEq.of("longlist", QueryBuilder.bindMarker("longlist")));
        return EntityWithNativeCollections_Update.E.this;
      }
    }

    public final class If_DoubleList {
      /**
       * Generate an ... IF doubleList = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Eq(final List doubleList) {
        boundValues.add(doubleList);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.eq("doublelist", QueryBuilder.bindMarker("doublelist")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF doubleList > ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Gt(final List doubleList) {
        boundValues.add(doubleList);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.gt("doublelist", QueryBuilder.bindMarker("doublelist")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF doubleList >= ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Gte(final List doubleList) {
        boundValues.add(doubleList);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.gte("doublelist", QueryBuilder.bindMarker("doublelist")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF doubleList < ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Lt(final List doubleList) {
        boundValues.add(doubleList);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.lt("doublelist", QueryBuilder.bindMarker("doublelist")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF doubleList <= ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Lte(final List doubleList) {
        boundValues.add(doubleList);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.lte("doublelist", QueryBuilder.bindMarker("doublelist")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an  ... IF doubleList != ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E NotEq(final List doubleList) {
        boundValues.add(doubleList);
        encodedValues.add(meta.doubleList.encodeFromJava(doubleList, Optional.of(cassandraOptions)));
        where.onlyIf(NotEq.of("doublelist", QueryBuilder.bindMarker("doublelist")));
        return EntityWithNativeCollections_Update.E.this;
      }
    }

    public final class If_MapIntLong {
      /**
       * Generate an ... IF mapIntLong = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Eq(final Map mapIntLong) {
        boundValues.add(mapIntLong);
        encodedValues.add(meta.mapIntLong.encodeFromJava(mapIntLong, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.eq("mapintlong", QueryBuilder.bindMarker("mapintlong")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF mapIntLong > ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Gt(final Map mapIntLong) {
        boundValues.add(mapIntLong);
        encodedValues.add(meta.mapIntLong.encodeFromJava(mapIntLong, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.gt("mapintlong", QueryBuilder.bindMarker("mapintlong")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF mapIntLong >= ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Gte(final Map mapIntLong) {
        boundValues.add(mapIntLong);
        encodedValues.add(meta.mapIntLong.encodeFromJava(mapIntLong, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.gte("mapintlong", QueryBuilder.bindMarker("mapintlong")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF mapIntLong < ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Lt(final Map mapIntLong) {
        boundValues.add(mapIntLong);
        encodedValues.add(meta.mapIntLong.encodeFromJava(mapIntLong, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.lt("mapintlong", QueryBuilder.bindMarker("mapintlong")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF mapIntLong <= ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Lte(final Map mapIntLong) {
        boundValues.add(mapIntLong);
        encodedValues.add(meta.mapIntLong.encodeFromJava(mapIntLong, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.lte("mapintlong", QueryBuilder.bindMarker("mapintlong")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an  ... IF mapIntLong != ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E NotEq(final Map mapIntLong) {
        boundValues.add(mapIntLong);
        encodedValues.add(meta.mapIntLong.encodeFromJava(mapIntLong, Optional.of(cassandraOptions)));
        where.onlyIf(NotEq.of("mapintlong", QueryBuilder.bindMarker("mapintlong")));
        return EntityWithNativeCollections_Update.E.this;
      }
    }

    public final class If_Tuple2 {
      /**
       * Generate an ... IF tuple2 = ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Eq(final Tuple2, List> tuple2) {
        boundValues.add(tuple2);
        encodedValues.add(meta.tuple2.encodeFromJava(tuple2, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.eq("tuple2", QueryBuilder.bindMarker("tuple2")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF tuple2 > ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Gt(final Tuple2, List> tuple2) {
        boundValues.add(tuple2);
        encodedValues.add(meta.tuple2.encodeFromJava(tuple2, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.gt("tuple2", QueryBuilder.bindMarker("tuple2")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF tuple2 >= ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Gte(final Tuple2, List> tuple2) {
        boundValues.add(tuple2);
        encodedValues.add(meta.tuple2.encodeFromJava(tuple2, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.gte("tuple2", QueryBuilder.bindMarker("tuple2")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF tuple2 < ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Lt(final Tuple2, List> tuple2) {
        boundValues.add(tuple2);
        encodedValues.add(meta.tuple2.encodeFromJava(tuple2, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.lt("tuple2", QueryBuilder.bindMarker("tuple2")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an ... IF tuple2 <= ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E Lte(final Tuple2, List> tuple2) {
        boundValues.add(tuple2);
        encodedValues.add(meta.tuple2.encodeFromJava(tuple2, Optional.of(cassandraOptions)));
        where.onlyIf(QueryBuilder.lte("tuple2", QueryBuilder.bindMarker("tuple2")));
        return EntityWithNativeCollections_Update.E.this;
      }

      /**
       * Generate an  ... IF tuple2 != ? */
      @SuppressWarnings("static-access")
      public final EntityWithNativeCollections_Update.E NotEq(final Tuple2, List> tuple2) {
        boundValues.add(tuple2);
        encodedValues.add(meta.tuple2.encodeFromJava(tuple2, Optional.of(cassandraOptions)));
        where.onlyIf(NotEq.of("tuple2", QueryBuilder.bindMarker("tuple2")));
        return EntityWithNativeCollections_Update.E.this;
      }
    }
  }
}