Package org.apache.derby.iapi.types

Examples of org.apache.derby.iapi.types.UserDataValue


    if (SanityManager.DEBUG)
    {
      SanityManager.ASSERT(row != null, "row is null");
    }

    UserDataValue aggregatorColumn = (UserDataValue) row.getColumn(aggregatorColumnId + 1);

    ExecAggregator ua = (ExecAggregator) aggregatorColumn.getObject();
    if (ua == null)
    {
      ua = getAggregatorInstance();
      aggregatorColumn.setValue(ua);
    }
  }
View Full Code Here


    }
  }

  public void setParameterAsObject(int position, Object value) throws StandardException {

    UserDataValue dvd = (UserDataValue) getParameterForSet(position);

    GenericParameter gp = parms[position];
    if (value != null) {

      {

        boolean throwError;
        ClassNotFoundException t = null;
        try {
          throwError = !ci.instanceOf(gp.declaredClassName, value);
        } catch (ClassNotFoundException cnfe) {
          t = cnfe;
          throwError = true;
        }

        if (throwError) {
          throw StandardException.newException(SQLState.LANG_DATA_TYPE_SET_MISMATCH, t,
            ClassInspector.readableClassName(value.getClass()), gp.declaredClassName);
        }
      }

    }

    dvd.setValue(value);
  }
View Full Code Here

    if (SanityManager.DEBUG)
    {
      SanityManager.ASSERT(row != null, "row is null");
    }

    UserDataValue aggregatorColumn = (UserDataValue) row.getColumn(aggregatorColumnId + 1);

    ExecAggregator ua = (ExecAggregator) aggregatorColumn.getObject();
    if (ua == null)
    {
      ua = getAggregatorInstance();
      aggregatorColumn.setValue(ua);
    }
  }
View Full Code Here

    }
  }

  public void setParameterAsObject(int position, Object value) throws StandardException {

    UserDataValue dvd = (UserDataValue) getParameterForSet(position);

    GenericParameter gp = parms[position];
    if (value != null) {

      {

        boolean throwError;
        ClassNotFoundException t = null;
        try {
          throwError = !ci.instanceOf(gp.declaredClassName, value);
        } catch (ClassNotFoundException cnfe) {
          t = cnfe;
          throwError = true;
        }

        if (throwError) {
          throw StandardException.newException(SQLState.LANG_DATA_TYPE_SET_MISMATCH, t,
            ClassInspector.readableClassName(value.getClass()), gp.declaredClassName);
        }
      }

    }

    dvd.setValue(value);
  }
View Full Code Here

      ((Storable)returnRow[firstAggregatorColumn]).isNull())
    {
      for (int i = 0; i < aggsToInitialize.length; i++)
      {
        GenericAggregator aggregator = aggsToInitialize[i];
        UserDataValue wrapper = ((UserDataValue)returnRow[aggregator.aggregatorColumnId]);
        if (SanityManager.DEBUG)
        {
          if (!wrapper.isNull())
          {
            SanityManager.THROWASSERT("during aggregate "+
            "initialization, all wrappers expected to be empty; "+
            "however, the wrapper for the following aggregate " +
            "was not empty:" +aggregator+".  The value stored is "+
            wrapper.getObject());
          }
        }
        wrapper.setValue(aggregator.getAggregatorInstance());
        aggregator.accumulate(returnRow, returnRow);
      }
    }

    return returnRow;
View Full Code Here

    if (SanityManager.DEBUG)
    {
      SanityManager.ASSERT(row != null, "row is null");
    }

    UserDataValue aggregatorColumn = (UserDataValue) row.getColumn(aggregatorColumnId + 1);

    ExecAggregator ua = (ExecAggregator) aggregatorColumn.getObject();
    if (ua == null)
    {
      ua = getAggregatorInstance();
      aggregatorColumn.setValue(ua);
    }
  }
View Full Code Here

    }
  }

  public void setParameterAsObject(int position, Object value) throws StandardException {

    UserDataValue dvd = (UserDataValue) getParameterForSet(position);

    GenericParameter gp = parms[position];
    if (value != null) {

      {

        boolean throwError;
        ClassNotFoundException t = null;
        try {
          throwError = !ci.instanceOf(gp.declaredClassName, value);
        } catch (ClassNotFoundException cnfe) {
          t = cnfe;
          throwError = true;
        }

        if (throwError) {
          throw StandardException.newException(SQLState.LANG_DATA_TYPE_SET_MISMATCH, t,
            ClassInspector.readableClassName(value.getClass()), gp.declaredClassName);
        }
      }

    }

    dvd.setValue(value);
  }
View Full Code Here

      returnRow[firstAggregatorColumn].isNull())
    {
      for (int i = 0; i < aggsToInitialize.length; i++)
      {
        GenericAggregator aggregator = aggsToInitialize[i];
        UserDataValue wrapper = ((UserDataValue)returnRow[aggregator.aggregatorColumnId]);
        if (SanityManager.DEBUG)
        {
          if (!wrapper.isNull())
          {
            SanityManager.THROWASSERT("during aggregate "+
            "initialization, all wrappers expected to be empty; "+
            "however, the wrapper for the following aggregate " +
            "was not empty:" +aggregator+".  The value stored is "+
            wrapper.getObject());
          }
        }
        wrapper.setValue(aggregator.getAggregatorInstance());
        aggregator.accumulate(returnRow, returnRow);
      }
    }

    return returnRow;
View Full Code Here

    if (SanityManager.DEBUG)
    {
      SanityManager.ASSERT(row != null, "row is null");
    }

    UserDataValue aggregatorColumn = (UserDataValue) row.getColumn(aggregatorColumnId + 1);

    ExecAggregator ua = (ExecAggregator) aggregatorColumn.getObject();
    if (ua == null)
    {
      ua = getAggregatorInstance();
      aggregatorColumn.setValue(ua);
    }
  }
View Full Code Here

    }
  }

  public void setParameterAsObject(int position, Object value) throws StandardException {

    UserDataValue dvd = (UserDataValue) getParameterForSet(position);

    GenericParameter gp = parms[position];
    if (value != null) {

      {

        boolean throwError;
        ClassNotFoundException t = null;
        try {
          throwError = !ci.instanceOf(gp.declaredClassName, value);
        } catch (ClassNotFoundException cnfe) {
          t = cnfe;
          throwError = true;
        }

        if (throwError) {
          throw StandardException.newException(SQLState.LANG_DATA_TYPE_SET_MISMATCH, t,
            ClassInspector.readableClassName(value.getClass()), gp.declaredClassName);
        }
      }

    }

    dvd.setValue(value);
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.types.UserDataValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.