Delegates to the schema derived from the {@code value}.
335078
@SuppressWarnings("unchecked")
    public void writeTo(final Output output, final Object value) throws IOException
    {
        final Schema<Object> schema = strategy.writePojoIdTo(
                output, ID_POJO, (Class<Object>)value.getClass());
        
        if(output instanceof StatefulOutput)
        {
            // update using the derived schema.
            ((StatefulOutput)output).updateLast(schema, this);
        }
        
        // write the rest of the fields of the exact type
        schema.writeTo(output, value);
    }
1369306
public void setValue(org.openprovenance.prov.model.Value value) {
	if (value!=null) {
	    this.value = value;
	    getAllAttributes().add((org.openprovenance.prov.model.Attribute)value);	//FIXME: should replace previous value!
	}
    }
318982
function (column, value, fromDatabase) {
            var colSchema, clazz = this._static;
            if (((fromDatabase && clazz.typecastOnLoad) || (!fromDatabase && clazz.typecastOnAssignment)) && !isUndefinedOrNull(this.schema) && !isUndefinedOrNull((colSchema = this.schema[column]))) {
                var type = colSchema.type;
                if (value === "" && clazz.typecastEmptyStringToNull === true && !isUndefinedOrNull(type) && ["string", "blob", "text"].indexOf(type) === -1) {
                    value = null;
                }
                var raiseOnError = clazz.raiseOnTypecastError;
                if (raiseOnError === true && isUndefinedOrNull(value) && colSchema.allowNull === false) {
                    throw new ModelError("null is not allowed for the " + column + " column on model " + clazz.tableName);
                }
                try {
                    value = clazz.db.typecastValue(type, value);
                } catch (e) {
                    if (raiseOnError === true) {
                        throw e;
                    }
                }
            }
            return value;
        }
353069
def cast(self, value, custom_formatters=None, strict=True):
        """"""
        if value is None:
            if not self.nullable:
                raise InvalidSchemaValue("Null value for non-nullable schema", value, self.type)
            return self.default

        cast_mapping = self.get_cast_mapping(
            custom_formatters=custom_formatters, strict=strict)

        if self.type is not SchemaType.STRING and value == '':
            return None

        cast_callable = cast_mapping[self.type]
        try:
            return cast_callable(value)
        except ValueError:
            raise InvalidSchemaValue(
                "Failed to cast value {value} to type {type}", value, self.type)
531180
protected Object cast(Object value) {
        switch (type) {
            case STRING :
               return valueFactories.getStringFactory().create(value);
            case LONG :
                return valueFactories.getLongFactory().create(value);
            case NAME :
                return valueFactories.getNameFactory().create(value);
            case PATH :
                return valueFactories.getPathFactory().create(value);
            case DATE :
                return valueFactories.getDateFactory().create(value);
            case BOOLEAN :
                return valueFactories.getBooleanFactory().create(value);
            case URI :
                return valueFactories.getUriFactory().create(value);
            case REFERENCE :
                return valueFactories.getReferenceFactory().create(value);
            case SIMPLEREFERENCE :
                return valueFactories.getSimpleReferenceFactory().create(value);
            case WEAKREFERENCE :
                return valueFactories.getWeakReferenceFactory().create(value);
            default :
                return value;
        }
    }
20588
static void setModelValue(final ModelNode model, final String value) {
        if (value != null) {
            model.set(value);
        }
    }
759984
function (value, node) {
        var i, el;
        var valid = (typeof value === "object");
        var fields = {};
        if (valid) {
            /*  pass 1: ensure that all mandatory fields exist
                and determine map of valid fields for pass 2  */
            for (i = 0; i < node.elements.length; i++) {
                el = node.elements[i];
                fields[el.key] = el.element;
                if (   el.arity[0] > 0
                    && (   (el.key === "@" && _cs.keysof(value).length === 0)
                        || (el.key !== "@" && typeof value[el.key] === "undefined"))) {
                    valid = false;
                    break;
                }
            }
        }
        if (valid) {
            /*  pass 2: ensure that no unknown fields exist
                and that all existing fields are valid  */
            for (var field in value) {
                if (   !Object.hasOwnProperty.call(value, field)
                    || !Object.propertyIsEnumerable.call(value, field)
                    || field === "constructor"
                    || field === "prototype"                          )
                    continue;
                if (   typeof fields[field] !== "undefined"
                    && this.exec_spec(value[field], fields[field])) /*  RECURSION  */
                    continue;
                if (   typeof fields["@"] !== "undefined"
                    && this.exec_spec(value[field], fields["@"]))   /*  RECURSION  */
                    continue;
                valid = false;
                break;
            }
        }
        return valid;
    }
323027
public void setSchema(java.util.Collection<SchemaAttributeType> schema) {
        if (schema == null) {
            this.schema = null;
            return;
        }

        this.schema = new java.util.ArrayList<SchemaAttributeType>(schema);
    }
1193144
public void setValue(FacesContext context, Object value)
            throws EvaluationException, PropertyNotFoundException {
            
        if (context == null) {
	        throw new NullPointerException("FacesContext -> null");
        }
        try {
            valueExpression.setValue(context.getELContext(), value);
        } catch (javax.el.PropertyNotFoundException pnfe) {
            throw new PropertyNotFoundException(pnfe);
        } catch (javax.el.PropertyNotWritableException pnwe) {
            throw new PropertyNotFoundException(pnwe);
        } catch (ELException elex) {
            throw new EvaluationException(elex);
        }
    }
82269
public void create(final T value) throws SQLException {
        transactionTemplate
            .doInTransaction(new SQLFunction<Connection, Object>() {
                @Override
                public Object apply(Connection connection) throws SQLException {
                    delegate.create(connection, value);
                    return null;
                }
            });
    }
915727
protected void assign(String name, Object value) {
        KeyWords.check(name);
        RequestContext.getValues().put(name, value);
    }
186666
@Override
    public Map<String, String> values() {
        Map<String, String> values = new LinkedHashMap<>();
        for (Row each : delegates) {
            for (Entry<String, String> entry : each.values().entrySet()) {
                String name = entry.getKey();
                if (!values.containsKey(name)) {
                    values.put(name, entry.getValue());
                }
            }
        }
        return values;
    }
204820
protected static Object reDefineType(QueryColumnImpl column, Object value) {
	column.typeChecked = false;
	if (value == null || column.type == Types.OTHER) return value;
	if (value instanceof String && ((String) value).isEmpty()) return value;

	switch (column.type) {

	// Numeric Values
	case Types.DOUBLE:
	    return reDefineDouble(column, value);
	case Types.BIGINT:
	    return reDefineDecimal(column, value);
	case Types.NUMERIC:
	    return reDefineDouble(column, value);
	case Types.INTEGER:
	    return reDefineInteger(column, value);
	case Types.TINYINT:
	    return reDefineTinyInt(column, value);
	case Types.FLOAT:
	    return reDefineFloat(column, value);
	case Types.DECIMAL:
	    return reDefineDecimal(column, value);
	case Types.REAL:
	    return reDefineFloat(column, value);
	case Types.SMALLINT:
	    return reDefineShort(column, value);

	// DateTime Values
	case Types.TIMESTAMP:
	    return reDefineDateTime(column, value);
	case Types.DATE:
	    return reDefineDateTime(column, value);
	case Types.TIME:
	    return reDefineDateTime(column, value);

	// Char
	case Types.CHAR:
	    return reDefineString(column, value);
	case Types.VARCHAR:
	    return reDefineString(column, value);
	case Types.LONGVARCHAR:
	    return reDefineString(column, value);
	case Types.CLOB:
	    return reDefineClob(column, value);

	// Boolean
	case Types.BOOLEAN:
	    return reDefineBoolean(column, value);
	case Types.BIT:
	    return reDefineBoolean(column, value);

	// Binary
	case Types.BINARY:
	    return reDefineBinary(column, value);
	case Types.VARBINARY:
	    return reDefineBinary(column, value);
	case Types.LONGVARBINARY:
	    return reDefineBinary(column, value);
	case Types.BLOB:
	    return reDefineBlob(column, value);

	// Others
	case Types.ARRAY:
	    return reDefineOther(column, value);
	case Types.DATALINK:
	    return reDefineOther(column, value);
	case Types.DISTINCT:
	    return reDefineOther(column, value);
	case Types.JAVA_OBJECT:
	    return reDefineOther(column, value);
	case Types.NULL:
	    return reDefineOther(column, value);
	case Types.STRUCT:
	    return reDefineOther(column, value);
	case Types.REF:
	    return reDefineOther(column, value);
	default:
	    return value;
	}

    }
983828
private <T> T mergeObjectEncodedAsGroup(T value, final Schema<T> schema) throws IOException
    {
        // if (recursionDepth >= recursionLimit) {
        // throw ProtobufException.recursionLimitExceeded();
        // }
        // ++recursionDepth;

        if (value == null)
        {
            value = schema.newMessage();
        }
        schema.mergeFrom(this, value);
        if (!schema.isInitialized(value))
        {
            throw new UninitializedMessageException(value, schema);
        }
        // handling is in #readFieldNumber
        checkLastTagWas(0);
        // --recursionDepth;
        return value;
    }
1102688
@Override
  protected void visitLetValueNode(LetValueNode node) {

    String generatedVarName = node.getUniqueVarName();

    // Generate code to define the local var.
    Expression value = translateExpr(node.getExpr());
    jsCodeBuilder.append(VariableDeclaration.builder(generatedVarName).setRhs(value).build());

    // Add a mapping for generating future references to this local var.
    templateTranslationContext
        .soyToJsVariableMappings()
        .put(node.getVarName(), id(generatedVarName));
  }
855522
@Override
	public void visit(SQLiteModelMethod value) throws Exception {
		if (value.getAnnotation(BindSqlInsert.class) != null) {
			SqlInsertBuilder.generate(builder, value);
		} else if (value.getAnnotation(BindSqlUpdate.class) != null) {
			SqlModifyBuilder.generate(builder, value);
		} else if (value.getAnnotation(BindSqlDelete.class) != null) {
			SqlModifyBuilder.generate(builder, value);
		} else if (value.getAnnotation(BindSqlSelect.class) != null) {
			SqlSelectBuilder.generateSelect(builder, value);
		} 
		// other situation are blocked first

	}
135695
public Object setValue(final Object value) {
        final Object answer = this.value;
        this.value = value;
        return answer;
    }