Class StringObject

java.lang.Object
quadbase.reportdesigner.lang.StringObject
All Implemented Interfaces:
IObject, IFunctionConstants

public class StringObject extends Object implements IObject, IFunctionConstants
This class is used to implement formulas for columns contain string data
  • Constructor Details

    • StringObject

      public StringObject(String str)
      Create a new StringObject object using specified string
    • StringObject

      protected StringObject()
      Create a new StringObject object
  • Method Details

    • getFormula

      public String getFormula()
      Returns the formula
      Specified by:
      getFormula in interface IObject
    • setFormula

      protected StringObject setFormula(String formula)
      Sets the specified formula
    • getSQLType

      public int getSQLType()
      Returns the SQL type
      Specified by:
      getSQLType in interface IObject
    • getColumnValue

      public static StringObject getColumnValue(int colInfoIndex)
      Returns the Column value at specified column
    • getColumnValue

      public static StringObject getColumnValue(NumericObject colInfoIndex)
      Returns the Column value at specified column
    • getColumnValue

      public static StringObject getColumnValue(int colInfoIndex, short aggregation)
      Returns the Column value at specified column after doing the specified aggregation. The different values for aggregation are available under quadbase.reportdesigner.util.IAggregateConstants
    • getColumnValue

      public static StringObject getColumnValue(NumericObject colInfoIndex, short aggregation)
      Returns the Column value at specified column after doing the specified aggregation. The different values for aggregation are available under quadbase.reportdesigner.util.IAggregateConstants
    • toUpperCase

      public static StringObject toUpperCase(StringObject a)
      Converts the StringObject to uppercase
    • toLowerCase

      public static StringObject toLowerCase(StringObject a)
      Converts the StringObject to lowercase
    • setMaxLength

      public static StringObject setMaxLength(StringObject str, NumericObject maxLen)
      Sets the max length of the StringObject
    • substring

      public static StringObject substring(StringObject str, NumericObject beginIndex)
      Returns the string from the specified index onwards
    • substring

      public static StringObject substring(StringObject str, NumericObject beginIndex, NumericObject endIndex)
      Returns the string from the specified beginning index to the specified ending index
    • strcat

      public static StringObject strcat(StringObject a, StringObject b)
      Returns concatenation of the two specified StringObjects
    • strcat

      public static StringObject strcat(StringObject[] str)
      Returns the concatenation of the elements of the StringObject array
    • replace

      public static StringObject replace(StringObject str, StringObject oldChars, StringObject newChars)
      Replaces speficied old characters with specified new characters in the StringObject object
    • replace

      public static StringObject replace(StringObject str, NumericObject start, NumericObject end, StringObject newChars)
      Replaces characters from start index to end index with specified new characters
    • insert

      public static StringObject insert(StringObject str, NumericObject offset, StringObject newChars)
      Inserts the specified new characters at the specified index
    • getPage

      public static StringObject getPage()
      Returns the current page number
    • getTotalPages

      public static StringObject getTotalPages()
      Returns the total number of pages
    • getTotalSections

      public static StringObject getTotalSections()
      Returns the total number of sections
    • strlen

      public static NumericObject strlen(StringObject a)
      Returns the length of the string
    • lastIndexOf

      public static NumericObject lastIndexOf(StringObject str, StringObject searchChars)
      Returns the last index where the specified pattern of characters occurs
    • lastIndexOf

      public static NumericObject lastIndexOf(StringObject str, StringObject searchChars, NumericObject fromIndex)
      Returns the last index where the specified pattern of characters occurs starting from the specified index
    • indexOf

      public static NumericObject indexOf(StringObject str, StringObject searchChars)
      Returns the index where the specified pattern of characters first occurs
    • indexOf

      public static NumericObject indexOf(StringObject str, StringObject searchChars, NumericObject fromIndex)
      Returns the index where the specified pattern of characters first occurs starting from the specified index
    • toNumeric

      public static NumericObject toNumeric(StringObject str)
      Converts the StringObject to numeric