Class StiFunctionsData
java.lang.Object
com.stimulsoft.report.dictionary.functions.StiFunctionsData
Copyright Stimulsoft
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectReturns the first non-null and non-DBNull value from the provided arguments.static StringcoalesceStr(Object[] args) Returns the first non-null and non-empty string from the provided arguments.static StringgetCrossTabColumnValue(Object sender) Retrieves the cross-tab column value from the provided sender object.static StringgetCrossTabRowValue(Object sender) Retrieves the cross-tab row value from the provided sender object.static intgetRealPageNumber(Object sender) static booleanisAllDataRowNullOrEmpty(Object dataSource, String dataColumn) Checks if all rows in the specified data column of the given data source or business object are null or empty.static booleanisDataEmpty(Object dataSource) Checks if the specified data source or business object is empty.static booleanisNullOrEmpty(Object value) static booleanisNullOrEmpty(Object dataSource, String dataColumn) Determines whether the specified data column in the given data source or business object is null or empty.static booleanisNullOrWhiteSpace(Object value) Determines whether the specified value is null or consists only of white-space characters.static booleanisNullOrWhiteSpace(Object dataSource, String dataColumn) Determines whether the specified data column in the given data source or business object is null or consists only of white-space characters.static booleanDetermines whether the specified value is numeric.static StringjoinColumnContent(Object dataSource, String dataColumn, String delimiter) Joins the content of a specified column from a data source or business object into a single string, separated by a specified delimiter.static StringjoinColumnContent(Object dataSource, String dataColumn, String delimiter, boolean distinct) Joins the content of a specified column from a data source or business object into a single string, separated by a specified delimiter.static StringtoQueryString(List list, String quotationMark, String dateTimeFormat) Converts a list of items to a query string format.static StringtoQueryString(List list, String quotationMark, String dateTimeFormat, boolean needEscape) Converts a list of items to a query string format.static ObjectPerforms a vertical lookup for a specified value in a data source or business object.static ObjectvLookup(Object value, Object dataObject, String dataColumnToLook, String dataColumnToReturn, boolean asString, boolean exactMatch) Performs a vertical lookup for a specified value in a data source or business object.static ObjectvLookupStr(Object value, Object dataObject, String dataColumnToLook, String dataColumnToReturn, boolean exactMatch) Performs a vertical lookup for a specified value in a data source or business object, with an option for exact match.
-
Constructor Details
-
StiFunctionsData
public StiFunctionsData()
-
-
Method Details
-
isAllDataRowNullOrEmpty
public static boolean isAllDataRowNullOrEmpty(Object dataSource, String dataColumn) throws StiException Checks if all rows in the specified data column of the given data source or business object are null or empty.- Parameters:
dataSource- The data source or business object to check.dataColumn- The name of the data column to check.- Returns:
- True if all rows in the specified data column are null or empty; otherwise, false.
- Throws:
StiException- Thrown when the data source or business object is null, or when the data column name is null.
-
isDataEmpty
Checks if the specified data source or business object is empty.- Parameters:
dataSource- The data source or business object to check.- Returns:
- True if the data source or business object is empty; otherwise, false.
- Throws:
StiException- Thrown when the data source or business object is null.
-
isNullOrEmpty
Determines whether the specified data column in the given data source or business object is null or empty.- Parameters:
dataSource- The data source or business object to check.dataColumn- The name of the data column to check.- Returns:
- True if the specified data column is null or empty; otherwise, false.
- Throws:
StiException- Thrown when the data source or business object is null, or when the data column name is null.
-
isNullOrEmpty
-
isNullOrWhiteSpace
Determines whether the specified data column in the given data source or business object is null or consists only of white-space characters.- Parameters:
dataSource- The data source or business object to check.dataColumn- The name of the data column to check.- Returns:
- True if the specified data column is null or consists only of white-space characters; otherwise, false.
- Throws:
StiException- Thrown when the data source or business object is null, or when the data column name is null.
-
isNullOrWhiteSpace
Determines whether the specified value is null or consists only of white-space characters.- Parameters:
value- The value to check.- Returns:
- True if the value is null or consists only of white-space characters; otherwise, false.
-
isNumeric
Determines whether the specified value is numeric.- Parameters:
value- The value to check.- Returns:
- True if the value is numeric; otherwise, false.
-
vLookup
public static Object vLookup(Object value, Object dataObject, String dataColumnToLook, String dataColumnToReturn) Performs a vertical lookup for a specified value in a data source or business object.- Parameters:
value- The value to search for in the specified data column.dataObject- The data source or business object to search within.dataColumnToLook- The name of the data column to search for the value.dataColumnToReturn- The name of the data column from which to return the value.- Returns:
- The value from the specified data column to return, or null if the value is not found.
-
vLookupStr
public static Object vLookupStr(Object value, Object dataObject, String dataColumnToLook, String dataColumnToReturn, boolean exactMatch) Performs a vertical lookup for a specified value in a data source or business object, with an option for exact match.- Parameters:
value- The value to search for in the specified data column.dataObject- The data source or business object to search within.dataColumnToLook- The name of the data column to search for the value.dataColumnToReturn- The name of the data column from which to return the value.exactMatch- Indicates whether to perform an exact match search.- Returns:
- The value from the specified data column to return, or null if the value is not found.
-
vLookup
public static Object vLookup(Object value, Object dataObject, String dataColumnToLook, String dataColumnToReturn, boolean asString, boolean exactMatch) Performs a vertical lookup for a specified value in a data source or business object.- Parameters:
value- The value to search for in the specified data column.dataObject- The data source or business object to search within.dataColumnToLook- The name of the data column to search for the value.dataColumnToReturn- The name of the data column from which to return the value.asString- Indicates whether to perform the lookup as a string comparison.exactMatch- Indicates whether to perform an exact match search.- Returns:
- The value from the specified data column to return, or null if the value is not found.
-
joinColumnContent
Joins the content of a specified column from a data source or business object into a single string, separated by a specified delimiter.- Parameters:
dataSource- The data source or business object containing the column.dataColumn- The name of the column whose content is to be joined.delimiter- The delimiter to use for separating the column values in the resulting string.distinct- Indicates whether to include only distinct values from the column.- Returns:
- A string containing the joined column values, separated by the specified delimiter.
-
joinColumnContent
public static String joinColumnContent(Object dataSource, String dataColumn, String delimiter, boolean distinct) Joins the content of a specified column from a data source or business object into a single string, separated by a specified delimiter.- Parameters:
dataSource- The data source or business object containing the column.dataColumn- The name of the column whose content is to be joined.delimiter- The delimiter to use for separating the column values in the resulting string.distinct- Indicates whether to include only distinct values from the column.- Returns:
- A string containing the joined column values, separated by the specified delimiter.
-
toQueryString
Converts a list of items to a query string format.- Parameters:
list- The type of items in the list.quotationMark- The quotation mark to use for string values.dateTimeFormat- The format to use for DateTime values.needEscape- Indicates whether the values need to be escaped.- Returns:
- A query string representation of the list.
-
toQueryString
public static String toQueryString(List list, String quotationMark, String dateTimeFormat, boolean needEscape) Converts a list of items to a query string format.- Parameters:
list- The type of items in the list.quotationMark- The quotation mark to use for string values.dateTimeFormat- The format to use for DateTime values.needEscape- Indicates whether the values need to be escaped.- Returns:
- A query string representation of the list.
-
coalesce
Returns the first non-null and non-DBNull value from the provided arguments.- Parameters:
args- An array of objects to check.- Returns:
- The first non-null and non-DBNull value, or null if all arguments are null or DBNull.
-
coalesceStr
Returns the first non-null and non-empty string from the provided arguments.- Parameters:
args- An array of objects to check.- Returns:
- The first non-null and non-empty string, or null if all arguments are null or empty.
-
getRealPageNumber
-
getCrossTabColumnValue
Retrieves the cross-tab column value from the provided sender object.- Parameters:
sender- The sender object, expected to be of type @StiCrossSummary- Returns:
- The cross-tab column value as a string, or null if the sender is not of the expected type.
-
getCrossTabRowValue
Retrieves the cross-tab row value from the provided sender object.- Parameters:
sender- The sender object, expected to be of type @StiCrossSummary- Returns:
- The cross-tab row value as a string, or null if the sender is not of the expected type.
-