binds the values of the object obj to the statements parameters
9361
public void bindUpdate(PreparedStatement stmt, ClassDescriptor cld, Object obj) throws java.sql.SQLException
    {
        if (cld.getUpdateProcedure() != null)
        {
            this.bindProcedure(stmt, cld, obj, cld.getUpdateProcedure());
        }
        else
        {
            int index = 1;
            ValueContainer[] values, valuesSnapshot;
            // first take a snapshot of current locking values
            valuesSnapshot = cld.getCurrentLockingValues(obj);
            cld.updateLockingValues(obj); // BRJ
            values = getNonKeyValues(m_broker, cld, obj);

            // parameters for SET-clause
            for (int i = 0; i < values.length; i++)
            {
                setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
                index++;
            }
            // parameters for WHERE-clause pk
            values = getKeyValues(m_broker, cld, obj);
            for (int i = 0; i < values.length; i++)
            {
                setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
                index++;
            }
            // parameters for WHERE-clause locking
            // take old locking values
            values = valuesSnapshot;
            for (int i = 0; i < values.length; i++)
            {
                setObjectForStatement(stmt, index, values[i].getValue(), values[i].getJdbcType().getType());
                index++;
            }
        }
    }
812526
protected function bind()
    {
        $variables = array();

        // Bind each field
        while ($field = $this->metadata->fetch_field()) {
            $this->columns[] = $field->name;
            $this->types[$field->name] = $field->type;
            // Note that while boundValues isn't initialised at this point,
            // later calls to $this->statement->fetch() Will populate
            // $this->boundValues later with the next result.
            $variables[] = &$this->boundValues[$field->name];
        }

        $this->bound = true;
        $this->metadata->free();

        // Buffer all results
        $this->statement->store_result();

        call_user_func_array(array($this->statement, 'bind_result'), $variables);
    }
497038
@Override
    public BoundStatement bindInsert(PreparedStatement statement, P pojo, int ttl) {
        List<Object> parameters = new LinkedList<>();
        keyBinding.collectParameters(pojo, parameters);
        facetBindings.forEach(facetBinding -> facetBinding.collectParameters(pojo, parameters));
        parameters.add(ttl);
        return bind(statement, parameters);
    }
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
    }
303389
public void bindParameters(final Map<Object, Object> iArgs) {
    if (parameterItems == null || iArgs == null || iArgs.size() == 0)
      return;

    for (Entry<Object, Object> entry : iArgs.entrySet()) {
      if (entry.getKey() instanceof Integer)
        parameterItems.get(((Integer) entry.getKey())).setValue(entry.setValue(entry.getValue()));
      else {
        String paramName = entry.getKey().toString();
        for (OSQLFilterItemParameter value : parameterItems) {
          if (value.getName().equalsIgnoreCase(paramName)) {
            value.setValue(entry.getValue());
            break;
          }
        }
      }
    }
  }
514005
@Override
	public void bind(String name, Object obj) throws NamingException
    {
        bind(new CompositeName(name), obj);
    }
748419
def setattrs(obj, **kwargs):
    
    for key, value in kwargs.items():
        setattr(obj, key, value)
    return obj
132368
function bindMethods(obj, scope) {
  return Object.keys(obj).reduce((bound, key) => {
    if (typeof obj[key] === 'function') {
      bound[key] = obj[key].bind(scope);
    } else if (_lodash2.default.isObject(obj[key])) {
      bound[key] = bindMethods(obj[key], scope);
    }
    return bound;
  }, {});
}
471264
function functionBind(f, obj) {
  if (NATIVE_FUNCTION_BIND) {
    return NATIVE_FUNCTION_BIND.call(f, obj);
  }

  return function boundFunction_() {
    return f.apply(obj, arguments);
  };
}
155136
protected function bindNumericParameters(): void
    {
        $values = $this->getValues();
        $cnt    = count($values);
        for ($index0 = 0, $index1 = 1; $index0 < $cnt; $index0++, $index1++) {
            $value = $this->toScalar($values[$index0]);
            $this->getWrappedStatement()->bindValue($index1, $value, $this->getPdoType($value));
        }
    }
203743
public static void bind(final Context _ctx,
                            final String _nameStr,
                            final Object _object)
        throws NamingException
    {
        final Name names = _ctx.getNameParser("").parse(_nameStr);
        if (names.size() > 0)  {
            Context subCtx = _ctx;
            for (int idx = 0; idx < names.size() - 1; idx++)  {
                final String name = names.get(idx);
                try {
                    subCtx = (Context) subCtx.lookup(name);
                    if (Util.LOG.isDebugEnabled())  {
                        Util.LOG.debug("Subcontext " + name + " already exists");
                    }
                } catch (final NameNotFoundException e) {
                    subCtx = subCtx.createSubcontext(name);
                    if (Util.LOG.isDebugEnabled())  {
                        Util.LOG.debug("Subcontext " + name + " created");
                    }
                }
            }
            subCtx.rebind(names.get(names.size() - 1), _object);
            if (Util.LOG.isDebugEnabled())  {
                Util.LOG.debug("Bound object to " + names.get(names.size() - 1));
            }
        }
    }
1289008
public void bindInsert(PreparedStatement stmt, ClassDescriptor cld, Object obj) throws java.sql.SQLException
    {
        ValueContainer[] values;
        cld.updateLockingValues(obj); // BRJ : provide useful defaults for locking fields

        if (cld.getInsertProcedure() != null)
        {
            this.bindProcedure(stmt, cld, obj, cld.getInsertProcedure());
        }
        else
        {
            values = getAllValues(cld, obj);
            for (int i = 0; i < values.length; i++)
            {
                setObjectForStatement(stmt, i + 1, values[i].getValue(), values[i].getJdbcType().getType());
            }
        }
    }
1140808
private void SetResultsFromScript(InteractiveObject interactiveObjectFinal, Bindings localBindings) {
        // A SCRIPT can have mutliple defined objects, so we don't use getDefinedItem()
        // instead we go through the field values
        try {
            ScriptObject scriptObject = interactiveObjectFinal.getScriptObject();
            for (ScriptObject.Field fieldNode : scriptObject.getFieldsArrayList()) {
                if ((scriptObject.getFieldAccessType(fieldNode) == ScriptObject.AccessType.OUTPUT_ONLY) ||
                        (scriptObject.getFieldAccessType(fieldNode) == ScriptObject.AccessType.INPUT_OUTPUT)) {
                    String fieldType = scriptObject.getFieldType(fieldNode);
                    DefinedItem scriptObjectToDefinedItem = scriptObject.getToDefinedItem(fieldNode);
                    EventUtility scriptObjectToEventUtility = scriptObject.getToEventUtility(fieldNode);
                    Object returnedJavaScriptValue = localBindings.get(scriptObject.getFieldName(fieldNode));

                    // Script fields contain all the values that can be returned from a JavaScript function.
                    // However, not all JavaScript functions set returned-values, and thus left null.  For
                    // example the initialize() method may not set some Script field values, so don't
                    // process those and thus check if returnedJavaScriptValue != null
                    if ((returnedJavaScriptValue != null) && ( !(returnedJavaScriptValue instanceof V8Object) )) {
                        if (fieldType.equalsIgnoreCase("SFBool")) {
                            SFBool sfBool = (SFBool) returnedJavaScriptValue;
                            if ( scriptObjectToDefinedItem != null) {
                                if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                    GVRComponent gvrComponent = scriptObjectToDefinedItem.getGVRSceneObject().getComponent(
                                            GVRLight.getComponentType());
                                    if (gvrComponent != null) {
                                        gvrComponent.setEnable(sfBool.getValue());
                                    }
                                }  //  end if the SceneObject has a light component attached
                            }  //  end scriptObjectToDefinedItem != null
                            else if ( scriptObjectToEventUtility != null) {
                                scriptObjectToEventUtility.setToggle(sfBool.getValue());
                            }
                            else if ( scriptObject.getToTimeSensor(fieldNode) != null) {
                                TimeSensor timeSensor = scriptObject.getToTimeSensor(fieldNode);
                                if ( StringFieldMatch( scriptObject.getFieldName(fieldNode), "loop") ) {
                                    timeSensor.setLoop( sfBool.getValue(), gvrContext );
                                }
                                if ( StringFieldMatch( scriptObject.getFieldName(fieldNode), "enabled") ) {
                                    timeSensor.setEnabled( sfBool.getValue(), gvrContext );
                                }
                            }
                            else {
                                Log.e(TAG, "Error: Not setting SFBool '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFBool
                        else if (fieldType.equalsIgnoreCase("SFFloat")) {
                            SFFloat sfFloat = (SFFloat) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRMaterial() != null) {
                                GVRMaterial gvrMaterial= scriptObjectToDefinedItem.getGVRMaterial();
                                // shininess and transparency are part of X3D Material node
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "shininess") ) {
                                    gvrMaterial.setSpecularExponent(sfFloat.getValue());
                                } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "transparency") ) {
                                    gvrMaterial.setOpacity(sfFloat.getValue());
                                }
                                else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "rotation")  ) {
                                    // rotationn is part of TextureTransform node
                                    scriptObjectToDefinedItem.setTextureRotation( sfFloat.getValue() );

                                    Matrix3f textureTransform = SetTextureTransformMatrix(
                                            scriptObjectToDefinedItem.getTextureTranslation(),
                                            scriptObjectToDefinedItem.getTextureCenter(),
                                            scriptObjectToDefinedItem.getTextureScale(),
                                            scriptObjectToDefinedItem.getTextureRotation());

                                    float[] texMtx = new float[9];
                                    textureTransform.get(texMtx);
                                    gvrMaterial.setFloatArray("texture_matrix", texMtx);
                                }
                                else {
                                    Log.e(TAG, "Error: Not setting SFFloat to Material '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                                }
                            } else if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                GVRComponent gvrComponent = scriptObjectToDefinedItem.getGVRSceneObject().getComponent(
                                        GVRLight.getComponentType());
                                if (gvrComponent != null) {
                                    if (gvrComponent instanceof GVRSpotLight) {
                                        GVRSpotLight gvrSpotLightBase = (GVRSpotLight) gvrComponent;
                                        if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "beamWidth") ) {
                                            gvrSpotLightBase.setInnerConeAngle(sfFloat.getValue() * 180 / (float) Math.PI);
                                        } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "cutOffAngle") ) {
                                            gvrSpotLightBase.setOuterConeAngle(sfFloat.getValue() * 180 / (float) Math.PI);
                                        } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "intensity") ) {
                                            //TODO: we aren't changing intensity since this would be multiplied by color
                                        } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "radius") ) {
                                            //TODO: radius is not currently supported in GearVR for the spot light
                                        }
                                    } else if (gvrComponent instanceof GVRPointLight) {
                                        GVRPointLight gvrPointLightBase = (GVRPointLight) gvrComponent;
                                        if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "intensity") ) {
                                            //TODO: we aren't changing intensity since this would be multiplied by color
                                        } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "radius") ) {
                                            //TODO: radius is not currently supported in GearVR for the point light
                                        }
                                    } else if (gvrComponent instanceof GVRDirectLight) {
                                        GVRDirectLight gvrDirectLightBase = (GVRDirectLight) gvrComponent;
                                        if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "intensity") ) {
                                            //TODO: we aren't changing intensity since GVR multiplies this by color
                                        }
                                    }
                                }  //  end presumed to be a light
                            }  //  end GVRScriptObject ! null
                            else if ( scriptObjectToDefinedItem.getGVRVideoSceneObject() != null) {
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "speed") ||
                                        StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "pitch") ) {
                                    GVRVideoSceneObjectPlayer gvrVideoSceneObjectPlayer = scriptObjectToDefinedItem.getGVRVideoSceneObject().getMediaPlayer();
                                    ExoPlayer exoPlayer = (ExoPlayer) gvrVideoSceneObjectPlayer.getPlayer();

                                    PlaybackParameters currPlaybackParamters = exoPlayer.getPlaybackParameters();
                                    PlaybackParameters playbackParamters = new PlaybackParameters(sfFloat.getValue(), sfFloat.getValue());
                                    exoPlayer.setPlaybackParameters(playbackParamters);
                                }
                            }
                            else {
                                Log.e(TAG, "Error: Not setting SFFloat '" + scriptObject.getToDefinedItemField(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFFloat
                        else if (fieldType.equalsIgnoreCase("SFTime")) {
                            SFTime sfTime = (SFTime) returnedJavaScriptValue;
                            if ( scriptObject.getToTimeSensor(fieldNode) != null) {
                                TimeSensor timeSensor = scriptObject.getToTimeSensor(fieldNode);
                                if ( StringFieldMatch( scriptObject.getFieldName(fieldNode), "startTime") ) {
                                    timeSensor.startTime = (float)sfTime.getValue();
                                }
                                else if ( StringFieldMatch( scriptObject.getFieldName(fieldNode), "stopTime") ) {
                                    timeSensor.stopTime = (float)sfTime.getValue();
                                }
                                else if ( StringFieldMatch( scriptObject.getFieldName(fieldNode), "cycleInterval") ) {
                                    timeSensor.setCycleInterval( (float)sfTime.getValue() );
                                }
                                else Log.e(TAG, "Error: Not setting " + (float)sfTime.getValue() + " to SFTime '" +
                                            scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                            else if ( scriptObject.getToDefinedItemField( fieldNode ) != null) {
                                DefinedItem definedItem = scriptObject.getToDefinedItem(fieldNode);
                                if ( definedItem.getGVRVideoSceneObject() != null ) {
                                    GVRVideoSceneObjectPlayer gvrVideoSceneObjectPlayer = scriptObjectToDefinedItem.getGVRVideoSceneObject().getMediaPlayer();
                                    ExoPlayer exoPlayer = (ExoPlayer) gvrVideoSceneObjectPlayer.getPlayer();
                                    if (StringFieldMatch(scriptObject.getToDefinedItemField(fieldNode), "startTime")) {
                                        exoPlayer.seekTo( (long)sfTime.getValue() );
                                    }
                                    else Log.e(TAG, "Error: MovieTexture " + scriptObject.getToDefinedItemField(fieldNode) + " in " +
                                            scriptObject.getName() + " script not supported." );
                                }
                                else Log.e(TAG, "Error: Not setting " + (float)sfTime.getValue() + " to SFTime. " +
                                        "MovieTexture node may not be defined to connect from SCRIPT '" + scriptObject.getName() + "'." );

                            }
                            else Log.e(TAG, "Error: Not setting SFTime '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                        }  //  end SFTime
                        else if (fieldType.equalsIgnoreCase("SFColor")) {
                            SFColor sfColor = (SFColor) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRMaterial() != null) {
                                //  SFColor change to a GVRMaterial
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "diffuseColor") ) {
                                    scriptObjectToDefinedItem.getGVRMaterial().setVec4("diffuse_color", sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1.0f);
                                } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "specularColor") ) {
                                    scriptObjectToDefinedItem.getGVRMaterial().setVec4("specular_color", sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1.0f);
                                } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "emissiveColor") ) {
                                    scriptObjectToDefinedItem.getGVRMaterial().setVec4("emissive_color", sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1.0f);
                                }
                            }  //  end SFColor change to a GVRMaterial
                            else if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                // GVRSceneObject
                                GVRSceneObject gvrSceneObject = scriptObjectToDefinedItem.getGVRSceneObject();
                                GVRComponent gvrComponent = gvrSceneObject.getComponent(GVRLight.getComponentType());
                                if (gvrComponent != null) {
                                    if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "color") ) {
                                        // SFColor change to a GVRSceneObject (likely a Light Component)
                                        if (gvrComponent instanceof GVRSpotLight) {
                                            GVRSpotLight gvrSpotLightBase = (GVRSpotLight) gvrComponent;
                                            gvrSpotLightBase.setDiffuseIntensity(sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1);
                                        } else if (gvrComponent instanceof GVRPointLight) {
                                            GVRPointLight gvrPointLightBase = (GVRPointLight) gvrComponent;
                                            gvrPointLightBase.setDiffuseIntensity(sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1);
                                        } else if (gvrComponent instanceof GVRDirectLight) {
                                            GVRDirectLight gvrDirectLightBase = (GVRDirectLight) gvrComponent;
                                            gvrDirectLightBase.setDiffuseIntensity(sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1);
                                        }
                                    }
                                }
                            }  //  SFColor change to a GVRSceneObject (likely a Light)
                            else {
                                Log.e(TAG, "Error: Not setting SFColor '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFColor (to a light or Material)
                        else if (fieldType.equalsIgnoreCase("SFVec3f")) {
                            SFVec3f sfVec3f = (SFVec3f) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                //  SFVec3f change to a GVRSceneObject
                                GVRSceneObject gvrSceneObject = scriptObjectToDefinedItem.getGVRSceneObject();
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "translation")  ||
                                        StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "location") ) {
                                    // location applies to point light and spot light
                                    GVRSceneObject gvrSceneObjectTranslation = root
                                            .getSceneObjectByName((scriptObjectToDefinedItem.getGVRSceneObject().getName() + x3dObject.TRANSFORM_TRANSLATION_));
                                    if (gvrSceneObjectTranslation != null)
                                        gvrSceneObjectTranslation.getTransform().setPosition(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                    else
                                        gvrSceneObject.getTransform().setPosition(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "scale") ) {
                                    GVRSceneObject gvrSceneObjectScale = root
                                            .getSceneObjectByName((scriptObjectToDefinedItem.getGVRSceneObject().getName() + x3dObject.TRANSFORM_SCALE_));
                                    if (gvrSceneObjectScale != null)
                                        gvrSceneObjectScale.getTransform().setScale(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                    else
                                        gvrSceneObject.getTransform().setScale(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                } else {
                                    // could be parameters for a light
                                    GVRComponent gvrComponent = gvrSceneObject.getComponent(
                                            GVRLight.getComponentType());
                                    if (gvrComponent != null) {
                                        if (gvrComponent instanceof GVRSpotLight) {
                                            GVRSpotLight gvrSpotLightBase = (GVRSpotLight) gvrComponent;
                                            if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "attenuation") ) {
                                                gvrSpotLightBase.setAttenuation(sfVec3f.getX(), sfVec3f.getY(), sfVec3f.getZ());
                                            } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "direction") ) {
                                                scriptObjectToDefinedItem.setDirection(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                                Vector3f v3 = new Vector3f(sfVec3f).normalize();
                                                Quaternionf q = ConvertDirectionalVectorToQuaternion(v3);
                                                gvrSpotLightBase.getTransform().setRotation(q.w, q.x, q.y, q.z);
                                            } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "location") ) {
                                                gvrSpotLightBase.getTransform().setPosition(sfVec3f.getX(), sfVec3f.getY(), sfVec3f.getZ());
                                            }
                                        } else if (gvrComponent instanceof GVRPointLight) {
                                            GVRPointLight gvrPointLightBase = (GVRPointLight) gvrComponent;
                                            if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "attenuation") ) {
                                                gvrPointLightBase.setAttenuation(sfVec3f.getX(), sfVec3f.getY(), sfVec3f.getZ());
                                            } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "location") ) {
                                                gvrPointLightBase.getTransform().setPosition(sfVec3f.getX(), sfVec3f.getY(), sfVec3f.getZ());
                                            }
                                        } else if (gvrComponent instanceof GVRDirectLight) {
                                            GVRDirectLight gvrDirectLightBase = (GVRDirectLight) gvrComponent;
                                            if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "direction") ) {
                                                scriptObjectToDefinedItem.setDirection(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                                Vector3f v3 = new Vector3f(sfVec3f).normalize();
                                                Quaternionf q = ConvertDirectionalVectorToQuaternion(v3);
                                                gvrDirectLightBase.getTransform().setRotation(q.w, q.x, q.y, q.z);
                                            }
                                        }
                                    }
                                }  // end it could be a light
                            }  // end GVRSceneObject with SFVec3f
                            else {
                                Log.e(TAG, "Error: Not setting SFVec3f '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFVec3f
                        else if (fieldType.equalsIgnoreCase("SFVec2f")) {
                            SFVec2f sfVec2f = (SFVec2f) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRMaterial() != null) {
                                //  SFVec2f change to a Texture Transform
                                GVRMaterial gvrMaterial= scriptObjectToDefinedItem.getGVRMaterial();
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "translation")  ||
                                        StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "scale")  ||
                                        StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "center")  ) {

                                    if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "translation")  )
                                        scriptObjectToDefinedItem.setTextureTranslation(sfVec2f.getX(), -sfVec2f.getY());
                                    else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "scale")  )
                                        scriptObjectToDefinedItem.setTextureScale( sfVec2f.getX(), sfVec2f.getY() );
                                    else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "center")  )
                                        scriptObjectToDefinedItem.setTextureCenter( -sfVec2f.getX(), sfVec2f.getY());


                                    Matrix3f textureTransform = SetTextureTransformMatrix(
                                            scriptObjectToDefinedItem.getTextureTranslation(),
                                            scriptObjectToDefinedItem.getTextureCenter(),
                                            scriptObjectToDefinedItem.getTextureScale(),
                                            scriptObjectToDefinedItem.getTextureRotation());
                                    float[] texMtx = new float[9];
                                    textureTransform.get(texMtx);
                                    gvrMaterial.setFloatArray("texture_matrix", texMtx);
                                }

                                else {
                                    Log.e(TAG, "Error: Not setting SFVec2f '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                                }
                            }
                            else {
                                Log.e(TAG, "Error: Not setting SFVec2f '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        } // end SFVec2f
                        else if (fieldType.equalsIgnoreCase("SFRotation")) {
                            SFRotation sfRotation = (SFRotation) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                //  SFRotation change to a GVRSceneObject
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "rotation") ) {
                                    scriptObjectToDefinedItem.setAxisAngle(sfRotation.angle, sfRotation.x, sfRotation.y, sfRotation.z);

                                    GVRSceneObject gvrSceneObjectRotation = root
                                            .getSceneObjectByName((scriptObjectToDefinedItem.getGVRSceneObject().getName() + x3dObject.TRANSFORM_ROTATION_));
                                    float angleDegrees = (float) Math.toDegrees(sfRotation.angle);  // convert radians to degrees
                                    if (gvrSceneObjectRotation != null) {
                                        gvrSceneObjectRotation.getTransform().setRotationByAxis(angleDegrees, sfRotation.x, sfRotation.y, sfRotation.z);
                                    } else {
                                        scriptObjectToDefinedItem.getGVRSceneObject().getTransform().setRotationByAxis(sfRotation.angle, sfRotation.x, sfRotation.y, sfRotation.z);
                                    }
                                }  //  definedItem != null
                            }  // end GVRSceneObject with SFRotation
                            else {
                                Log.e(TAG, "Error: Not setting SFRotation '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFRotation
                        else if (fieldType.equalsIgnoreCase("SFInt32")) {
                            try {
                                SFInt32 sfInt32 = new SFInt32(new Integer(returnedJavaScriptValue.toString()).intValue() );
                                if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                    // Check if the field is 'whichChoice', meaning it's a Switch node
                                    if ( StringFieldMatch(scriptObject.getToDefinedItemField(fieldNode), "whichChoice") ) {
                                        GVRSceneObject gvrSwitchSceneObject = scriptObject.getToDefinedItem(fieldNode).getGVRSceneObject();
                                        GVRComponent gvrComponent = gvrSwitchSceneObject.getComponent(GVRSwitch.getComponentType());
                                        if (gvrComponent instanceof GVRSwitch) {
                                            // Set the value inside the Switch node
                                            GVRSwitch gvrSwitch = (GVRSwitch) gvrComponent;
                                            // Check if we are to switch to a value out of range (i.e. no mesh exists)
                                            // and thus set to not show any object.
                                            if ( (gvrSwitchSceneObject.getChildrenCount() <= sfInt32.getValue()) ||
                                                    (sfInt32.getValue() < 0) ) {
                                                sfInt32.setValue( gvrSwitchSceneObject.getChildrenCount() );
                                            }
                                            gvrSwitch.setSwitchIndex( sfInt32.getValue() );
                                        }
                                    }
                                }  // end GVRSceneObject with SFInt32
                                else {
                                    Log.e(TAG, "Error: Not setting SFInt32 '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'.");
                                }
                            }
                            catch (Exception e) {
                                Log.e(TAG, "Error: Not setting SFInt32 '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT " + scriptObject.getName() + "'.");
                                Log.e(TAG, "Exception: " + e);
                            }
                        }  //  end SFInt32
                        else if (fieldType.equalsIgnoreCase("SFString")) {
                            SFString sfString = (SFString) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRTextViewSceneObject() != null) {
                                GVRTextViewSceneObject gvrTextViewSceneObject = scriptObjectToDefinedItem.getGVRTextViewSceneObject();
                                if (scriptObject.getToDefinedItemField(fieldNode).endsWith("style")) {
                                    String value = sfString.getValue().toUpperCase();
                                    GVRTextViewSceneObject.fontStyleTypes fontStyle = null;
                                    if ( value.equals("BOLD")) fontStyle = GVRTextViewSceneObject.fontStyleTypes.BOLD;
                                    else if ( value.equals("ITALIC")) fontStyle = GVRTextViewSceneObject.fontStyleTypes.ITALIC;
                                    else if ( value.equals("BOLDITALIC")) fontStyle = GVRTextViewSceneObject.fontStyleTypes.BOLDITALIC;
                                    else if ( value.equals("PLAIN")) fontStyle = GVRTextViewSceneObject.fontStyleTypes.PLAIN;
                                    if ( fontStyle != null ) {
                                        gvrTextViewSceneObject.setTypeface(gvrContext,
                                                gvrTextViewSceneObject.getFontFamily(), fontStyle);
                                    }
                                    else {
                                        Log.e(TAG, "Error: " + value + " + not recognized X3D FontStyle style in SCRIPT '" + scriptObject.getName() + "'." );
                                    }
                                }
                                else Log.e(TAG, "Error: Setting not SFString  value'" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                            else {
                                Log.e(TAG, "Error: Not setting SFString '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFString
                        else if (fieldType.equalsIgnoreCase("MFString")) {
                            MFString mfString = (MFString) returnedJavaScriptValue;

                            if (scriptObjectToDefinedItem.getGVRTexture() != null) {
                                GVRTexture gvrTexture = scriptObjectToDefinedItem.getGVRTexture();
                                //  MFString change to a GVRTexture object
                                if (StringFieldMatch(scriptObject.getToDefinedItemField(fieldNode), "url")) {
                                    if (scriptObjectToDefinedItem.getGVRMaterial() != null) {
                                        // We have the GVRMaterial that contains a GVRTexture
                                        if (!gvrTexture.getImage().getFileName().equals(mfString.get1Value(0))) {
                                            // Only loadTexture if it is different than the current
                                            GVRAssetLoader.TextureRequest request = new GVRAssetLoader.TextureRequest(assetRequest,
                                                    gvrTexture, mfString.get1Value(0));
                                            assetRequest.loadTexture(request);
                                        }
                                    } // end having GVRMaterial containing GVRTexture
                                    else {
                                        Log.e(TAG, "Error: No GVRMaterial associated with MFString Texture url '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'.");
                                    }
                                }  //  definedItem != null
                                else {
                                    Log.e(TAG, "Error: No url associated with MFString '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'.");
                                }
                            }  // end GVRTexture != null

                            else if (scriptObjectToDefinedItem.getGVRVideoSceneObject() != null) {
                                //  MFString change to a GVRVideoSceneObject object
                                if (StringFieldMatch(scriptObject.getToDefinedItemField(fieldNode), "url")) {
                                    try {
                                        GVRVideoSceneObjectPlayer gvrVideoSceneObjectPlayer = scriptObjectToDefinedItem.getGVRVideoSceneObject().getMediaPlayer();
                                        ExoPlayer exoPlayer = (ExoPlayer) gvrVideoSceneObjectPlayer.getPlayer();
                                        exoPlayer.stop();

                                        final DataSource.Factory dataSourceFactory = new DataSource.Factory() {
                                            @Override
                                            public DataSource createDataSource() {
                                                return new AssetDataSource(gvrContext.getContext());
                                            }
                                        };
                                        final MediaSource mediaSource = new ExtractorMediaSource(Uri.parse("asset:///" + mfString.get1Value(0)),
                                                dataSourceFactory,
                                                new DefaultExtractorsFactory(), null, null);
                                        exoPlayer.prepare(mediaSource);
                                        Log.e(TAG, "Load movie " + mfString.get1Value(0) + ".");
                                        gvrVideoSceneObjectPlayer.start();
                                    } catch (Exception e) {
                                        Log.e(TAG, "X3D MovieTexture Asset " + mfString.get1Value(0) + " not loaded." + e);
                                        e.printStackTrace();
                                    }

                                }  //  end definedItem != null, contains url
                                else {
                                    Log.e(TAG, "Error: No MovieTexure url associated with MFString '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                                }
                            }  // end GVRVideoSceneObject != null

                            if (scriptObjectToDefinedItem.getGVRTextViewSceneObject() != null) {
                                GVRTextViewSceneObject gvrTextViewSceneObject = scriptObjectToDefinedItem.getGVRTextViewSceneObject();
                                if (scriptObject.getToDefinedItemField(fieldNode).equalsIgnoreCase("string")) {
                                    gvrTextViewSceneObject.setText(mfString.get1Value(0));
                                }
                                else Log.e(TAG, "Error: Setting not MFString string '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end MFString
                        else {
                            Log.e(TAG, "Error: " + fieldType + " in '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "' not supported." );
                        }
                    }  //  end value != null
                    else {
                        Log.e(TAG, "Warning: " + fieldType + " '" + scriptObject.getFieldName(fieldNode) + "' from SCRIPT '" + scriptObject.getName() + "' may not be set.");
                    }
                }  //  end OUTPUT-ONLY or INPUT_OUTPUT
            }  // end for-loop list of fields for a single script
        } catch (Exception e) {
            Log.e(TAG, "Error setting values returned from JavaScript in SCRIPT '" +
                    interactiveObjectFinal.getScriptObject().getName() +
                    "'. Check JavaScript or ROUTE's.  Exception: " + e);

        }
    }
1239853
@Override
    public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        throw SQLError.noSupport();
    }
71823
def process_bind_param(self, obj, dialect):
        """"""
        value = obj or {}
        if isinstance(obj, flask_cloudy.Object):
            value = {}
            for k in self.DEFAULT_KEYS:
                value[k] = getattr(obj, k)

        return super(self.__class__, self).process_bind_param(value, dialect)
146227
public void setKeyValues(String keyName, Object obj)
    {
        if (this.keyValues == null)
        {
            this.keyValues = new HashMap<String, Object>();
        }
        this.keyValues.put(keyName, obj);
    }
542455
def set_value(obj, attrs, value, _copy=False):
    
    for attr in attrs:
        if _copy:
            value = copy(value)
        setattr(obj, attr, value)