hql.g:175:1: assignment : stateField EQ ^ newValue ;
771681
public final hqlParser.assignment_return assignment() throws RecognitionException {
		hqlParser.assignment_return retval = new hqlParser.assignment_return();
		retval.start = input.LT(1);

		CommonTree root_0 = null;

		Token EQ16=null;
		ParserRuleReturnScope stateField15 =null;
		ParserRuleReturnScope newValue17 =null;

		CommonTree EQ16_tree=null;

		try {
			// hql.g:176:2: ( stateField EQ ^ newValue )
			// hql.g:176:4: stateField EQ ^ newValue
			{
			root_0 = (CommonTree)adaptor.nil();


			pushFollow(FOLLOW_stateField_in_assignment683);
			stateField15=stateField();
			state._fsp--;

			adaptor.addChild(root_0, stateField15.getTree());

			EQ16=(Token)match(input,EQ,FOLLOW_EQ_in_assignment685);
			EQ16_tree = (CommonTree)adaptor.create(EQ16);
			root_0 = (CommonTree)adaptor.becomeRoot(EQ16_tree, root_0);

			pushFollow(FOLLOW_newValue_in_assignment688);
			newValue17=newValue();
			state._fsp--;

			adaptor.addChild(root_0, newValue17.getTree());

			}

			retval.stop = input.LT(-1);

			retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
602297
private void assignValue(SimpleNode node, RelationQueryNode queryNode) {
        if (node.getId() == JJTSTRINGLITERAL) {
            queryNode.setStringValue(unescapeQuotes(node.getValue()));
        } else if (node.getId() == JJTDECIMALLITERAL) {
            queryNode.setDoubleValue(Double.parseDouble(node.getValue()));
        } else if (node.getId() == JJTDOUBLELITERAL) {
            queryNode.setDoubleValue(Double.parseDouble(node.getValue()));
        } else if (node.getId() == JJTINTEGERLITERAL) {
            // if this is an expression that contains position() do not change
            // the type.
            if (queryNode.getValueType() == QueryConstants.TYPE_POSITION) {
                queryNode.setPositionValue(Integer.parseInt(node.getValue()));
            } else {
                queryNode.setLongValue(Long.parseLong(node.getValue()));
            }
        } else {
            exceptions.add(new InvalidQueryException("Unsupported literal type:" + node.toString()));
        }
    }
1002757
public WebQuery eq(final String field, final Object... values)
	{
		if (values == null)
		{
			add(WQConstraint.eq(field, null));
		}
		else if (values.length == 1)
		{
			add(WQConstraint.eq(field, values[0]));
		}
		else if (values.length > 1)
		{
			final WQGroup or = or();

			for (Object value : values)
				or.eq(field, value);
		}

		return this;
	}


	/**
	 * Assert that a field equals one of the provided values. Implicitly creates a new OR group if multiple values are supplied.
	 * At least one value must be supplied.
	 *
	 * @param field
	 * @param values
	 *
	 * @return
	 */
	public WebQuery eq(final String field, final Collection<?> values)
	{
		if (values == null)
			throw new IllegalArgumentException("Must supply at least one value to .eq when passing a Collection");
		else if (values.size() == 0)
			return eq(field, values.stream().findFirst().get());
		else
		{
			final WQGroup or = or();

			for (Object value : values)
				or.eq(field, value);

			return this;
		}
	}


	public WebQuery neq(final String field, final Object value)
	{
		return add(WQConstraint.neq(field, value));
	}


	public WebQuery isNull(final String field)
	{
		return add(WQConstraint.isNull(field));
	}


	public WebQuery isNotNull(final String field)
	{
		return add(WQConstraint.isNotNull(field));
	}


	public WebQuery lt(final String field, final Object value)
	{
		return add(WQConstraint.lt(field, value));
	}


	public WebQuery le(final String field, final Object value)
	{
		return add(WQConstraint.le(field, value));
	}


	public WebQuery gt(final String field, final Object value)
	{
		return add(WQConstraint.gt(field, value));
	}


	public WebQuery ge(final String field, final Object value)
	{
		return add(WQConstraint.ge(field, value));
	}


	public WebQuery contains(final String field, final Object value)
	{
		return add(WQConstraint.contains(field, value));
	}


	public WebQuery startsWith(final String field, final Object value)
	{
		return add(WQConstraint.startsWith(field, value));
	}


	public WebQuery range(final String field, final Object from, final Object to)
	{
		return add(WQConstraint.range(field, from, to));
	}


	public WebQuery eqRef(final String field, final String field2)
	{
		return add(WQConstraint.eqRef(field, field2));
	}


	public WebQuery neqRef(final String field, final String field2)
	{
		return add(WQConstraint.neqRef(field, field2));
	}


	public WebQuery leRef(final String field, final String field2)
	{
		return add(WQConstraint.leRef(field, field2));
	}


	public WebQuery ltRef(final String field, final String field2)
	{
		return add(WQConstraint.ltRef(field, field2));
	}


	public WebQuery geRef(final String field, final String field2)
	{
		return add(WQConstraint.geRef(field, field2));
	}


	public WebQuery gtRef(final String field, final String field2)
	{
		return add(WQConstraint.gtRef(field, field2));
	}


	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Sub-groups
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


	/**
	 * Construct a new AND group and return it for method chaining
	 *
	 * @return
	 */
	public WQGroup and()
	{
		final WQGroup and = WQGroup.newAnd();

		add(and);

		return and;
	}


	/**
	 * Construct a new OR group and return it for method chaining
	 *
	 * @return
	 */
	public WQGroup or()
	{
		final WQGroup or = WQGroup.newOr();

		add(or);

		return or;
	}


	/**
	 * Construct a new AND group, using the supplier to add the constraints to the group. Returns the original {@link WebQuery}
	 * for method chaining
	 *
	 * @param consumer
	 *
	 * @return
	 */
	public WebQuery and(Consumer<WQGroup> consumer)
	{
		final WQGroup and = and();

		// Let the consumer build their sub-constraints
		if (consumer != null)
			consumer.accept(and);

		return this;
	}


	/**
	 * Construct a new OR group, using the supplier to add the constraints to the group. Returns the original {@link WebQuery}
	 * for
	 * method chaining
	 *
	 * @param consumer
	 *
	 * @return
	 */
	public WebQuery or(Consumer<WQGroup> consumer)
	{
		final WQGroup or = or();


		// Let the consumer build their sub-constraints
		if (consumer != null)
			consumer.accept(or);

		return this;
	}

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Decoding URI Query
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


	/**
	 * Overwrite any fields in this WebQuery using the query defined in the Query String of the provided UriInfo
	 *
	 * @param qs
	 * 		the UriInfo to extract the QueryParameters from
	 *
	 * @return this WebQuery for chaining
	 */
	public WebQuery decode(UriInfo qs)
	{
		return decode(qs.getQueryParameters());
	}


	/**
	 * Overwrite any fields in this WebQuery using the query defined in the provided map
	 *
	 * @param map
	 * 		a map of fields (or control fields) to encoded constraints
	 *
	 * @return this WebQuery for chaining
	 */
	public WebQuery decode(Map<String, List<String>> map)
	{
		WebQuery def = new WebQuery();

		// incoming queries from a map get a default limit set
		def.limit(QUERY_STRING_DEFAULT_LIMIT);

		boolean hasConstraints = false;

		for (Map.Entry<String, List<String>> entry : map.entrySet())
		{
			if (entry.getKey().charAt(0) == '_')
			{
				final WQUriControlField specialField = WQUriControlField.getByName(entry.getKey());

				switch (specialField)
				{
					case OFFSET:
						def.offset(Integer.valueOf(entry.getValue().get(0)));
						break;
					case LIMIT:
						def.limit(Integer.valueOf(entry.getValue().get(0)));
						break;
					case CLASS:
						def.subclass(entry.getValue().toArray(new String[entry.getValue().size()]));
						break;
					case COMPUTE_SIZE:
						def.computeSize(parseBoolean(entry.getValue().get(0)));
						break;
					case LOG_SQL:
						def.logSQL(parseBoolean(entry.getValue().get(0)));
						break;
					case LOG_PERFORMANCE:
						def.logPerformance(parseBoolean(entry.getValue().get(0)));
						break;
					case EXPAND:
						def.expand(entry.getValue().toArray(new String[entry.getValue().size()]));
						break;
					case ORDER:
						def.orderings = entry.getValue().stream().map(WQOrder:: parseLegacy).collect(Collectors.toList());
						break;
					case FETCH:
						// Ordinarily we'd expect a single value here, but allow for multiple values to be provided as a comma-separated list
						def.fetch = entry.getValue().stream().collect(Collectors.joining(","));
						break;
					case DBFETCH:
						def.dbfetch = entry.getValue().stream().collect(Collectors.joining(","));
						break;
					case NAME:
						def.name(entry.getValue().get(0));
						break;
					default:
						throw new IllegalArgumentException("Unknown query field: " +
						                                   specialField +
						                                   " expected one of " +
						                                   WQUriControlField.getAllNames());
				}
			}
			else
			{
				// If this is the first constraint, clear any pre-defined default constraints
				if (!hasConstraints)
				{
					def.constraints.constraints = new ArrayList<>();

					hasConstraints = true;
				}

				if (entry.getValue().size() == 1)
				{
					def.constraints.constraints.add(WQConstraint.decode(entry.getKey(), entry.getValue().get(0)));
				}
				else if (entry.getValue().size() > 0)
				{
					WQGroup group = new WQGroup();

					group.operator = WQGroupType.OR;

					group.constraints = entry
							                    .getValue()
							                    .stream()
							                    .map(value -> WQConstraint.decode(entry.getKey(), value))
							                    .collect(Collectors.toList());

					def.constraints.constraints.add(group);
				}
			}
		}


		return def;
	}


	private static boolean parseBoolean(String value)
	{
		if (StringUtils.equalsIgnoreCase(value, "true") ||
		    StringUtils.equalsIgnoreCase(value, "yes") ||
		    StringUtils.equalsIgnoreCase(value, "on"))
			return true;
		else if (StringUtils.equalsIgnoreCase(value, "false") ||
		         StringUtils.equalsIgnoreCase(value, "no") ||
		         StringUtils.equalsIgnoreCase(value, "off"))
			return false;
		else
			throw new IllegalArgumentException("Cannot parse boolean: " + value);
	}


	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Decoding URI Query
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


	/**
	 * Encode this query to the equivalent (where possible) URI web query
	 *
	 * @return
	 */
	public Map<String, List<String>> encode()
	{
		return WebQueryToQueryStringConverter.convert(this);
	}
}
800716
private void setFieldValueViaCQL(Object entity, Object thriftColumnValue, Attribute attribute)
    {
        if (attribute != null)
        {
            try
            {
                if (attribute.isCollection())
                {
                    setCollectionValue(entity, thriftColumnValue, attribute);
                }
                else if (CassandraDataTranslator.isCassandraDataTypeClass(((AbstractAttribute) attribute)
                        .getBindableJavaType()))
                {
                    PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), CassandraDataTranslator
                            .decompose(((AbstractAttribute) attribute).getBindableJavaType(), thriftColumnValue, true));
                }
                else
                {
                    PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), (byte[]) thriftColumnValue);
                }
            }
            catch (PropertyAccessException pae)
            {
                log.warn("Error while setting field{} value via CQL, Caused by: .", attribute.getName(), pae);
            }
        }
    }
1137026
@SuppressWarnings("unchecked")
	@Override
	public <K, V> BroadcastState<K, V> getBroadcastState(final MapStateDescriptor<K, V> stateDescriptor) throws StateMigrationException {

		Preconditions.checkNotNull(stateDescriptor);
		String name = Preconditions.checkNotNull(stateDescriptor.getName());

		BackendWritableBroadcastState<K, V> previous =
			(BackendWritableBroadcastState<K, V>) accessedBroadcastStatesByName.get(name);

		if (previous != null) {
			checkStateNameAndMode(
					previous.getStateMetaInfo().getName(),
					name,
					previous.getStateMetaInfo().getAssignmentMode(),
					OperatorStateHandle.Mode.BROADCAST);
			return previous;
		}

		stateDescriptor.initializeSerializerUnlessSet(getExecutionConfig());
		TypeSerializer<K> broadcastStateKeySerializer = Preconditions.checkNotNull(stateDescriptor.getKeySerializer());
		TypeSerializer<V> broadcastStateValueSerializer = Preconditions.checkNotNull(stateDescriptor.getValueSerializer());

		BackendWritableBroadcastState<K, V> broadcastState =
			(BackendWritableBroadcastState<K, V>) registeredBroadcastStates.get(name);

		if (broadcastState == null) {
			broadcastState = new HeapBroadcastState<>(
					new RegisteredBroadcastStateBackendMetaInfo<>(
							name,
							OperatorStateHandle.Mode.BROADCAST,
							broadcastStateKeySerializer,
							broadcastStateValueSerializer));
			registeredBroadcastStates.put(name, broadcastState);
		} else {
			// has restored state; check compatibility of new state access

			checkStateNameAndMode(
					broadcastState.getStateMetaInfo().getName(),
					name,
					broadcastState.getStateMetaInfo().getAssignmentMode(),
					OperatorStateHandle.Mode.BROADCAST);

			RegisteredBroadcastStateBackendMetaInfo<K, V> restoredBroadcastStateMetaInfo = broadcastState.getStateMetaInfo();

			// check whether new serializers are incompatible
			TypeSerializerSchemaCompatibility<K> keyCompatibility =
				restoredBroadcastStateMetaInfo.updateKeySerializer(broadcastStateKeySerializer);
			if (keyCompatibility.isIncompatible()) {
				throw new StateMigrationException("The new key typeSerializer for broadcast state must not be incompatible.");
			}

			TypeSerializerSchemaCompatibility<V> valueCompatibility =
				restoredBroadcastStateMetaInfo.updateValueSerializer(broadcastStateValueSerializer);
			if (valueCompatibility.isIncompatible()) {
				throw new StateMigrationException("The new value typeSerializer for broadcast state must not be incompatible.");
			}

			broadcastState.setStateMetaInfo(restoredBroadcastStateMetaInfo);
		}

		accessedBroadcastStatesByName.put(name, broadcastState);
		return broadcastState;
	}
287431
private int bindStatementValue(PreparedStatement stmt, int index, Object attributeOrQuery, Object value, ClassDescriptor cld)
            throws SQLException
    {
        FieldDescriptor fld = null;
        // if value is a subQuery bind it
        if (value instanceof Query)
        {
            Query subQuery = (Query) value;
            return bindStatement(stmt, subQuery, cld.getRepository().getDescriptorFor(subQuery.getSearchClass()), index);
        }

        // if attribute is a subQuery bind it
        if (attributeOrQuery instanceof Query)
        {
            Query subQuery = (Query) attributeOrQuery;
            bindStatement(stmt, subQuery, cld.getRepository().getDescriptorFor(subQuery.getSearchClass()), index);
        }
        else
        {
            fld = cld.getFieldDescriptorForPath((String) attributeOrQuery);
        }

        if (fld != null)
        {
            // BRJ: use field conversions and platform
            if (value != null)
            {
                m_platform.setObjectForStatement(stmt, index, fld.getFieldConversion().javaToSql(value), fld.getJdbcType().getType());
            }
            else
            {
                m_platform.setNullForStatement(stmt, index, fld.getJdbcType().getType());
            }
        }
        else
        {
            if (value != null)
            {
                stmt.setObject(index, value);
            }
            else
            {
                stmt.setNull(index, Types.NULL);
            }
        }

        return ++index; // increment before return
    }
1141484
def eq_(self, value):
        ''' 
        '''
        if isinstance(value, QueryField):
            return self.__cached_id == value.__cached_id
        return QueryExpression({ self : self.get_type().wrap_value(value) })
836027
static BaseDoubleColumnValueSelector makeColumnValueSelectorWithDoubleDefault(
      final ColumnSelectorFactory metricFactory,
      final ExprMacroTable macroTable,
      @Nullable final String fieldName,
      @Nullable final String fieldExpression,
      final double nullValue
  )
  {
    if ((fieldName == null) == (fieldExpression == null)) {
      throw new IllegalArgumentException("");
    }
    if (fieldName != null) {
      return metricFactory.makeColumnValueSelector(fieldName);
    } else {
      final Expr expr = Parser.parse(fieldExpression, macroTable);
      final ColumnValueSelector<ExprEval> baseSelector = ExpressionSelectors.makeExprEvalSelector(metricFactory, expr);
      class ExpressionDoubleColumnSelector implements DoubleColumnSelector
      {
        @Override
        public double getDouble()
        {
          final ExprEval exprEval = baseSelector.getObject();
          return exprEval.isNumericNull() ? nullValue : exprEval.asDouble();
        }

        @Override
        public void inspectRuntimeShape(RuntimeShapeInspector inspector)
        {
          inspector.visit("baseSelector", baseSelector);
        }

        @Override
        public boolean isNull()
        {
          final ExprEval exprEval = baseSelector.getObject();
          return exprEval == null || exprEval.isNumericNull();
        }
      }
      return new ExpressionDoubleColumnSelector();
    }
  }
165492
public Object assignIdValue(ConnectionSource connectionSource, Object data, Number val, ObjectCache objectCache)
			throws SQLException {
		Object idVal = dataPersister.convertIdNumber(val);
		if (idVal == null) {
			throw new SQLException("Invalid class " + dataPersister + " for sequence-id " + this);
		} else {
			assignField(connectionSource, data, idVal, false, objectCache);
			return idVal;
		}
	}
646894
function reportAssignment(assignmentExpression) {
            context.report({
                node: assignmentExpression,
                messageId: "nonAtomicUpdate",
                data: {
                    value: sourceCode.getText(assignmentExpression.left)
                }
            });
        }
744638
@SuppressWarnings({ "rawtypes", "unchecked" })
  public void assign(Object state) {

    for (CliParameterContainer parameter : this.map.keySet()) {
      CliValueContainer valueContainer = this.map.get(parameter);
      Object value = valueContainer.getValue();
      ValueValidator validator = ((AbstractCliValueContainer) valueContainer).getParameterContainer()
          .getValidator();
      if (validator != null) {
        validator.validate(value);
      }
      parameter.getSetter().invoke(state, value);
    }
  }
834701
public final void assignmentOperator() throws RecognitionException {
		int assignmentOperator_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 109) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1123:5: ( '=' | '+=' | '-=' | '*=' | '/=' | '&=' | '|=' | '^=' | '%=' | '<' '<' '=' | '>' '>' '=' | '>' '>' '>' '=' )
			int alt141=12;
			switch ( input.LA(1) ) {
			case 54:
				{
				alt141=1;
				}
				break;
			case 42:
				{
				alt141=2;
				}
				break;
			case 46:
				{
				alt141=3;
				}
				break;
			case 39:
				{
				alt141=4;
				}
				break;
			case 50:
				{
				alt141=5;
				}
				break;
			case 35:
				{
				alt141=6;
				}
				break;
			case 123:
				{
				alt141=7;
				}
				break;
			case 62:
				{
				alt141=8;
				}
				break;
			case 32:
				{
				alt141=9;
				}
				break;
			case 53:
				{
				alt141=10;
				}
				break;
			case 56:
				{
				int LA141_11 = input.LA(2);
				if ( (LA141_11==56) ) {
					int LA141_12 = input.LA(3);
					if ( (synpred212_Java()) ) {
						alt141=11;
					}
					else if ( (true) ) {
						alt141=12;
					}

				}

				else {
					if (state.backtracking>0) {state.failed=true; return;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 141, 11, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 141, 0, input);
				throw nvae;
			}
			switch (alt141) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1123:7: '='
					{
					match(input,54,FOLLOW_54_in_assignmentOperator4899); if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1124:9: '+='
					{
					match(input,42,FOLLOW_42_in_assignmentOperator4909); if (state.failed) return;
					}
					break;
				case 3 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1125:9: '-='
					{
					match(input,46,FOLLOW_46_in_assignmentOperator4919); if (state.failed) return;
					}
					break;
				case 4 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1126:9: '*='
					{
					match(input,39,FOLLOW_39_in_assignmentOperator4929); if (state.failed) return;
					}
					break;
				case 5 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1127:9: '/='
					{
					match(input,50,FOLLOW_50_in_assignmentOperator4939); if (state.failed) return;
					}
					break;
				case 6 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1128:9: '&='
					{
					match(input,35,FOLLOW_35_in_assignmentOperator4949); if (state.failed) return;
					}
					break;
				case 7 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1129:9: '|='
					{
					match(input,123,FOLLOW_123_in_assignmentOperator4959); if (state.failed) return;
					}
					break;
				case 8 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1130:9: '^='
					{
					match(input,62,FOLLOW_62_in_assignmentOperator4969); if (state.failed) return;
					}
					break;
				case 9 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1131:9: '%='
					{
					match(input,32,FOLLOW_32_in_assignmentOperator4979); if (state.failed) return;
					}
					break;
				case 10 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1132:9: '<' '<' '='
					{
					match(input,53,FOLLOW_53_in_assignmentOperator4989); if (state.failed) return;
					match(input,53,FOLLOW_53_in_assignmentOperator4991); if (state.failed) return;
					match(input,54,FOLLOW_54_in_assignmentOperator4993); if (state.failed) return;
					}
					break;
				case 11 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1133:9: '>' '>' '='
					{
					match(input,56,FOLLOW_56_in_assignmentOperator5003); if (state.failed) return;
					match(input,56,FOLLOW_56_in_assignmentOperator5005); if (state.failed) return;
					match(input,54,FOLLOW_54_in_assignmentOperator5007); if (state.failed) return;
					}
					break;
				case 12 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1134:9: '>' '>' '>' '='
					{
					match(input,56,FOLLOW_56_in_assignmentOperator5017); if (state.failed) return;
					match(input,56,FOLLOW_56_in_assignmentOperator5019); if (state.failed) return;
					match(input,56,FOLLOW_56_in_assignmentOperator5021); if (state.failed) return;
					match(input,54,FOLLOW_54_in_assignmentOperator5023); if (state.failed) return;
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 109, assignmentOperator_StartIndex); }

		}
	}
1256057
protected BlockStmt fieldAssignment(String fieldName, String valueName) {
        BlockStmt body = new BlockStmt();
        body.addStatement(
                new ExpressionStmt(new AssignExpr(new NameExpr(fieldName), new NameExpr(valueName), Operator.ASSIGN)));
        return body;
    }
298219
public static Query notEquals(String field, Object value) {
        return new Query().notEquals(field, value);
    }
997630
public static <E> OqlBuilder<E> hql(final String hql) {
    OqlBuilder<E> query = new OqlBuilder<E>();
    query.statement = hql;
    return query;
  }
1309713
private void readConstraint(SchemaObject schemaObject,
                                HsqlArrayList constraintList) {

        HsqlName constName = null;
        boolean isAutogeneratedName = true;

        if (token.tokenType == Tokens.CONSTRAINT) {
            read();

            constName =
                readNewDependentSchemaObjectName(schemaObject.getName(),
                                                 SchemaObject.CONSTRAINT);
            isAutogeneratedName = false;
        }

        // A VoltDB extension to support indexed expressions and the assume unique attribute
        boolean assumeUnique = false; // For VoltDB
        // End of VoltDB extension
        switch (token.tokenType) {

            case Tokens.PRIMARY : {
                if (schemaObject.getName().type != SchemaObject.TABLE) {
                    throw this.unexpectedTokenRequire(Tokens.T_CHECK);
                }

                read();
                readThis(Tokens.KEY);

                Constraint mainConst;

                mainConst = (Constraint) constraintList.get(0);

                if (mainConst.constType == Constraint.PRIMARY_KEY) {
                    throw Error.error(ErrorCode.X_42532);
                }

                if (constName == null) {
                    constName = database.nameManager.newAutoName("PK",
                            schemaObject.getSchemaName(),
                            schemaObject.getName(), SchemaObject.CONSTRAINT);
                }

                OrderedHashSet set = readColumnNames(false);
                Constraint c = new Constraint(constName, isAutogeneratedName, set,
                                              Constraint.PRIMARY_KEY);

                constraintList.set(0, c);

                break;
            }
            // A VoltDB extension to support indexed expressions and the assume unique attribute
            case Tokens.ASSUMEUNIQUE :
                assumeUnique = true;
                // $FALL-THROUGH$
            // End of VoltDB extension
            case Tokens.UNIQUE : {
                if (schemaObject.getName().type != SchemaObject.TABLE) {
                    throw this.unexpectedTokenRequire(Tokens.T_CHECK);
                }

                read();

                // A VoltDB extension to "readColumnNames(false)" to support indexed expressions.
                java.util.List<Expression> indexExprs = XreadExpressions(null);
                OrderedHashSet set = getSimpleColumnNames(indexExprs);
                /* disable 1 line ...
                OrderedHashSet set = readColumnNames(false);
                ... disabled 1 line */
                // End of VoltDB extension

                if (constName == null) {
                    constName = database.nameManager.newAutoName("CT",
                            schemaObject.getSchemaName(),
                            schemaObject.getName(), SchemaObject.CONSTRAINT);
                }

                // A VoltDB extension to support indexed expressions.
                boolean hasNonColumnExprs = false;
                if (set == null) {
                    hasNonColumnExprs = true;
                    set = getBaseColumnNames(indexExprs);
                }
                // End of VoltDB extension
                Constraint c = new Constraint(constName, isAutogeneratedName, set,
                                              Constraint.UNIQUE);
                // A VoltDB extension to support indexed expressions and assume unique attribute.
                c.setAssumeUnique(assumeUnique);
                if (hasNonColumnExprs) {
                    c = c.withExpressions(indexExprs.toArray(new Expression[indexExprs.size()]));
                }
                // End of VoltDB extension

                constraintList.add(c);

                break;
            }
            case Tokens.FOREIGN : {
                if (schemaObject.getName().type != SchemaObject.TABLE) {
                    throw this.unexpectedTokenRequire(Tokens.T_CHECK);
                }

                read();
                readThis(Tokens.KEY);

                OrderedHashSet set = readColumnNames(false);
                Constraint c = readFKReferences((Table) schemaObject,
                                                constName, set);

                constraintList.add(c);

                break;
            }
            case Tokens.CHECK : {
                read();

                if (constName == null) {
                    constName = database.nameManager.newAutoName("CT",
                            schemaObject.getSchemaName(),
                            schemaObject.getName(), SchemaObject.CONSTRAINT);
                }

                Constraint c = new Constraint(constName, isAutogeneratedName, null,
                                              Constraint.CHECK);

                readCheckConstraintCondition(c);
                constraintList.add(c);

                break;
            }
            // A VoltDB extension to support LIMIT PARTITION ROWS
            case Tokens.LIMIT : {
                read();

                for (int i = 0;  i < constraintList.size(); i++) {
                    if (((Constraint)constraintList.get(i)).getConstraintType() == Constraint.LIMIT) {
                        throw Error.error(ErrorCode.X_42524,
                                String.format("Multiple LIMIT PARTITION ROWS constraints on table %s are forbidden.", schemaObject.getName().name));
                    }
                }

                if (constName == null) {
                    constName = database.nameManager.newAutoName("LIMIT",
                            schemaObject.getSchemaName(),
                            schemaObject.getName(), SchemaObject.CONSTRAINT);
                }

                Constraint c = new Constraint(constName, isAutogeneratedName, null, Constraint.LIMIT);
                readLimitConstraintCondition(c);
                constraintList.add(c);

                break;
            }
            // End of VoltDB extension
            default : {
                if (constName != null) {
                    throw Error.error(ErrorCode.X_42581);
                }
            }
        }
    }
202592
static void copyState(Object object, Object context, FieldMatchingStrategy strategy) {
        if (object == null) {
            throw new IllegalArgumentException("object to set state cannot be null");
        } else if (context == null) {
            throw new IllegalArgumentException("context cannot be null");
        } else if (strategy == null) {
            throw new IllegalArgumentException("strategy cannot be null");
        }

        Set<Field> allFields = isClass(context) ? getAllStaticFields(getType(context)) : getAllInstanceFields(context);
        for (Field field : allFields) {
            try {
                final boolean isStaticField = Modifier.isStatic(field.getModifiers());
                setInternalState(isStaticField ? getType(object) : object, field.getType(), field.get(context));
            } catch (FieldNotFoundException e) {
                if (strategy == FieldMatchingStrategy.STRICT) {
                    throw e;
                }
            } catch (IllegalAccessException e) {
                // Should never happen
                throw new RuntimeException(
                                                  "Internal Error: Failed to get the field value in method setInternalStateFromContext.", e);
            }
        }
    }