Package quadbase.reportdesigner.lang
Class StringObject
java.lang.Object
quadbase.reportdesigner.lang.StringObject
- All Implemented Interfaces:
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
ConstructorsModifierConstructorDescriptionprotectedCreate a new StringObject objectStringObject(String str) Create a new StringObject object using specified string -
Method Summary
Modifier and TypeMethodDescriptionstatic StringObjectgetColumnValue(int colInfoIndex) Returns the Column value at specified columnstatic StringObjectgetColumnValue(int colInfoIndex, short aggregation) Returns the Column value at specified column after doing the specified aggregation.static StringObjectgetColumnValue(NumericObject colInfoIndex) Returns the Column value at specified columnstatic StringObjectgetColumnValue(NumericObject colInfoIndex, short aggregation) Returns the Column value at specified column after doing the specified aggregation.Returns the formulastatic StringObjectgetPage()Returns the current page numberintReturns the SQL typestatic StringObjectReturns the total number of pagesstatic StringObjectReturns the total number of sectionsstatic NumericObjectindexOf(StringObject str, StringObject searchChars) Returns the index where the specified pattern of characters first occursstatic NumericObjectindexOf(StringObject str, StringObject searchChars, NumericObject fromIndex) Returns the index where the specified pattern of characters first occurs starting from the specified indexstatic StringObjectinsert(StringObject str, NumericObject offset, StringObject newChars) Inserts the specified new characters at the specified indexstatic NumericObjectlastIndexOf(StringObject str, StringObject searchChars) Returns the last index where the specified pattern of characters occursstatic NumericObjectlastIndexOf(StringObject str, StringObject searchChars, NumericObject fromIndex) Returns the last index where the specified pattern of characters occurs starting from the specified indexstatic StringObjectreplace(StringObject str, NumericObject start, NumericObject end, StringObject newChars) Replaces characters from start index to end index with specified new charactersstatic StringObjectreplace(StringObject str, StringObject oldChars, StringObject newChars) Replaces speficied old characters with specified new characters in the StringObject objectprotected StringObjectsetFormula(String formula) Sets the specified formulastatic StringObjectsetMaxLength(StringObject str, NumericObject maxLen) Sets the max length of the StringObjectstatic StringObjectstrcat(StringObject[] str) Returns the concatenation of the elements of the StringObject arraystatic StringObjectstrcat(StringObject a, StringObject b) Returns concatenation of the two specified StringObjectsstatic NumericObjectReturns the length of the stringstatic StringObjectsubstring(StringObject str, NumericObject beginIndex) Returns the string from the specified index onwardsstatic StringObjectsubstring(StringObject str, NumericObject beginIndex, NumericObject endIndex) Returns the string from the specified beginning index to the specified ending indexstatic StringObjectConverts the StringObject to lowercasestatic NumericObjecttoNumeric(StringObject str) Converts the StringObject to numericstatic StringObjectConverts the StringObject to uppercase
-
Constructor Details
-
StringObject
Create a new StringObject object using specified string -
StringObject
protected StringObject()Create a new StringObject object
-
-
Method Details
-
getFormula
Returns the formula- Specified by:
getFormulain interfaceIObject
-
setFormula
Sets the specified formula -
getSQLType
public int getSQLType()Returns the SQL type- Specified by:
getSQLTypein interfaceIObject
-
getColumnValue
Returns the Column value at specified column -
getColumnValue
Returns the Column value at specified column -
getColumnValue
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
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
Converts the StringObject to uppercase -
toLowerCase
Converts the StringObject to lowercase -
setMaxLength
Sets the max length of the StringObject -
substring
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
Returns concatenation of the two specified StringObjects -
strcat
Returns the concatenation of the elements of the StringObject array -
replace
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
Inserts the specified new characters at the specified index -
getPage
Returns the current page number -
getTotalPages
Returns the total number of pages -
getTotalSections
Returns the total number of sections -
strlen
Returns the length of the string -
lastIndexOf
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
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
Converts the StringObject to numeric
-