Examples of convertToText()


Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final TypeRegistry typeRegistry = context.getTypeRegistry();

    final Type textType = parameters.getType(0);
    final Object textValue = parameters.getValue(0);

    final String text = typeRegistry.convertToText(textType, textValue);
    final int length;
    if (parameterCount == 2)
    {
      final Type lengthType = parameters.getType(1);
      final Object lengthValue = parameters.getValue(1);
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Type textType = parameters.getType(0);
    final Object textValue = parameters.getValue(0);
    final Type oldTextType = parameters.getType(1);
    final Object oldTextValue = parameters.getValue(1);

    final String text = typeRegistry.convertToText(textType, textValue);
    final String oldText = typeRegistry.convertToText(oldTextType, oldTextValue);
    if (oldText.length() == 0)
    {
      return new TypeValuePair(TextType.TYPE, text);
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Object textValue = parameters.getValue(0);
    final Type oldTextType = parameters.getType(1);
    final Object oldTextValue = parameters.getValue(1);

    final String text = typeRegistry.convertToText(textType, textValue);
    final String oldText = typeRegistry.convertToText(oldTextType, oldTextValue);
    if (oldText.length() == 0)
    {
      return new TypeValuePair(TextType.TYPE, text);
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

      return new TypeValuePair(TextType.TYPE, text);
    }

    final Type newTextType = parameters.getType(2);
    final Object newTextValue = parameters.getValue(2);
    final String newText = typeRegistry.convertToText(newTextType, newTextValue);
    if (parameterCount == 3)
    {
      int oldIndex = 0;
      int index = text.indexOf(oldText);
      if (index == -1)
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

      throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
    }

    final Type textType1 = parameters.getType(0);
    final Object textValue1 = parameters.getValue(0);
    final String rawText = typeRegistry.convertToText(textType1, textValue1);
    if(rawText == null)
    {
      return new TypeValuePair(TextType.TYPE, "");
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Type startType = parameters.getType(1);
    final Object startValue = parameters.getValue(1);
    final Type lengthType = parameters.getType(2);
    final Object lengthValue = parameters.getValue(2);

    final String newText = typeRegistry.convertToText(newTextType, newTextValue);
    final String text = typeRegistry.convertToText(textType, textValue);
    final Number start = typeRegistry.convertToNumber(startType, startValue);
    if (start.intValue() <= 0)
    {
      throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Object startValue = parameters.getValue(1);
    final Type lengthType = parameters.getType(2);
    final Object lengthValue = parameters.getValue(2);

    final String newText = typeRegistry.convertToText(newTextType, newTextValue);
    final String text = typeRegistry.convertToText(textType, textValue);
    final Number start = typeRegistry.convertToNumber(startType, startValue);
    if (start.intValue() <= 0)
    {
      throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    }
    final Type type1 = parameters.getType(0);
    final Object value1 = parameters.getValue(0);
    final TypeRegistry typeRegistry = context.getTypeRegistry();

    final String result = typeRegistry.convertToText(type1, value1);
    if (result == null)
    {
      throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_ARGUMENT_VALUE);
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Type textType = parameters.getType(0);
    final Object textValue = parameters.getValue(0);
    final Type searchTextType = parameters.getType(1);
    final Object searchTextValue = parameters.getValue(1);

    final String text = typeRegistry.convertToText(textType, textValue);
    final String searchText = typeRegistry.convertToText(searchTextType, searchTextValue);
    if (searchText.length() == 0)
    {
      return new TypeValuePair(NumberType.GENERIC_NUMBER, 0);
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formula.typing.TypeRegistry.convertToText()

    final Object textValue = parameters.getValue(0);
    final Type searchTextType = parameters.getType(1);
    final Object searchTextValue = parameters.getValue(1);

    final String text = typeRegistry.convertToText(textType, textValue);
    final String searchText = typeRegistry.convertToText(searchTextType, searchTextValue);
    if (searchText.length() == 0)
    {
      return new TypeValuePair(NumberType.GENERIC_NUMBER, 0);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.