EspressReport 6.6

quadbase.reportdesigner.lang
Class StringObject

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

public class StringObject
extends java.lang.Object
implements IObject, IFunctionConstants

This class is used to implement formulas for columns contain string data


Field Summary
 
Fields inherited from interface quadbase.util.IFunctionConstants
ABS, ACOS, ADD, ADDTIME, AM_PM, AND, ASIN, ATAN, ATAN2, AVERAGE, B_COL, BOOL, BOOL_FUNC, BOOL_NAME, CALENDAR_CONST, CEIL, COL, COS, COUNT, CURRDATE, CURRDATETIME, CURRTIME, D_COL, DATE, DATE_FUNC, DATE_NAME, DATETIME, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DAYDIFF, DAYOFWEEK, DECL, DIVIDE, E, EQUALS, ERA, EXP, FACTORIAL, FALSE, FLOOR, GETAMPM, GETERA, GETMONTH, GREATER, GREATEREQUAL, HOUR, HOUR_OF_DAY, ID, IEEEREMAINDER, IFELSE_B, IFELSE_D, IFELSE_N, IFELSE_S, INDEXOF, INSERT, LASTINDEXOF, LESS, LESSEQUAL, LOG, MAX, MAXLENGTH, MEDIAN, MILLISECOND, MIN, MINUTE, MOD, MONTH, MULTIPLY, N_COL, NAND, NEW_DATE_NAME, NEW_NUM_NAME, NEW_STR_NAME, NOR, NOT, NUM, NUM_FUNC, NUM_NAME, OR, OTHER_FUNC_NAME, PAGE, PARAM, PI, POW, PRINTDATE, PRINTDATETIME, PRINTTIME, RANDOM, REPLACE, RINT, ROLLTIME, S_COL, SECOND, SIN, SQRT, STDDEV, STR, STR_FUNC, STR_NAME, STRCAT, STRLEN, SUBSTRING, SUBTRACT, SUMSQUARE, TAN, TD_FUNC_NAME, THIS, TODATE, TODEGREES, TOLOWERCASE, TONUMERIC, TORADIANS, TOSTRING, TOTALPAGES, TOTALSECTIONS, TOUPPERCASE, TRUE, VARIANCE, WEEK_OF_MONTH, WEEK_OF_YEAR, WITHIN, XNOR, XOR, YEAR
 
Constructor Summary
protected StringObject()
          Create a new StringObject object
  StringObject(java.lang.String str)
          Create a new StringObject object using specified string
 
Method Summary
static StringObject getColumnValue(int colInfoIndex)
          Returns the Column value at specified column
static StringObject getColumnValue(int colInfoIndex, short aggregation)
          Returns the Column value at specified column after doing the specified aggregation.
static StringObject getColumnValue(NumericObject colInfoIndex)
          Returns the Column value at specified column
static StringObject getColumnValue(NumericObject colInfoIndex, short aggregation)
          Returns the Column value at specified column after doing the specified aggregation.
 java.lang.String getFormula()
          Returns the formula
static StringObject getPage()
          Returns the current page number
 int getSQLType()
          Returns the SQL type
static StringObject getTotalPages()
          Returns the total number of pages
static StringObject getTotalSections()
          Returns the total number of sections
static NumericObject indexOf(StringObject str, StringObject searchChars)
          Returns the index where the specified pattern of characters first occurs
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
static StringObject insert(StringObject str, NumericObject offset, StringObject newChars)
          Inserts the specified new characters at the specified index
static NumericObject lastIndexOf(StringObject str, StringObject searchChars)
          Returns the last index where the specified pattern of characters occurs
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
static StringObject replace(StringObject str, NumericObject start, NumericObject end, StringObject newChars)
          Replaces characters from start index to end index with specified new characters
static StringObject replace(StringObject str, StringObject oldChars, StringObject newChars)
          Replaces speficied old characters with specified new characters in the StringObject object
protected  StringObject setFormula(java.lang.String formula)
          Sets the specified formula
static StringObject setMaxLength(StringObject str, NumericObject maxLen)
          Sets the max length of the StringObject
static StringObject strcat(StringObject[] str)
          Returns the concatenation of the elements of the StringObject array
static StringObject strcat(StringObject a, StringObject b)
          Returns concatenation of the two specified StringObjects
static NumericObject strlen(StringObject a)
          Returns the length of the string
static StringObject substring(StringObject str, NumericObject beginIndex)
          Returns the string from the specified index onwards
static StringObject substring(StringObject str, NumericObject beginIndex, NumericObject endIndex)
          Returns the string from the specified beginning index to the specified ending index
static StringObject toLowerCase(StringObject a)
          Converts the StringObject to lowercase
static NumericObject toNumeric(StringObject str)
          Converts the StringObject to numeric
static StringObject toUpperCase(StringObject a)
          Converts the StringObject to uppercase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringObject

public StringObject(java.lang.String str)
Create a new StringObject object using specified string


StringObject

protected StringObject()
Create a new StringObject object

Method Detail

getFormula

public java.lang.String getFormula()
Returns the formula

Specified by:
getFormula in interface IObject

setFormula

protected StringObject setFormula(java.lang.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


EspressReport 6.6