public class ExpressionHelper extends java.lang.Object implements ReportConstants
ReportConstants.EmailFileTypes, ReportConstants.EmailType, ReportConstants.ReportTypes, ReportConstants.ScheduleType
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
MX_DATE_TYPES |
static java.lang.String[] |
MX_NUMERIC_TYPES |
APPHIERARCHY, ATTR_BOUNDARY_CHARS_PATTERN, ATTRIBUTE_BOUNDARY_CHARS, ATTRIBUTENAME, BIRTCTRLTYPE_TEXTBOX, BIRTDATATYPE_DATETIME, BIRTDATATYPE_STRING, DATA_TYPE_DATE_BIRT, DATA_TYPE_DATETIME_BIRT, DATA_TYPE_DECIMAL_BIRT, DATA_TYPE_FLOAT_BIRT, DATA_TYPE_INTEGER_BIRT, DATA_TYPE_STRING_BIRT, DATA_TYPE_TIME_BIRT, DEFAULTVALUE, DISPLAYWHERE, DPKEY_PREFIX, DQ_PROPNAME, EXPORT_ACTION, EXPORT_ACTION_ALL_REPORTS, EXPORT_ACTION_LIBRARY, EXPORT_ACTION_REPORT, EXPORT_APPNAME, EXPORT_FILENAME, FILTER, GROUP, HIDDEN, IMPORT_CRONTASK, IMPORT_INSTANCE, IMPORT_PARAM_ADMINONLY, INVALID_CHARS, INVALID_CHARS_PATTERN, JDBC_DATE, JDBC_DATETIME, JOIN_RELATION, LABELOVERRIDE, LINK_RELATION, LOOKUP_DATELOOKUP, LOOKUP_YORNLOOKUPLIST, LOOKUPNAME, MULTILOOKUP, OVERLOADED, PARAMDELIMITER, PARAMETERNAME, RELATION_NOT_USED, REPORT_APP_LOGGER, REPORT_CONTEXT_USER_STOPLIMIT, REPORTS_DISABLED, REQUIRED, RPT_STATUS_CANCELLED, RPT_STATUS_FAILED, RPT_STATUS_OK, RPT_STATUS_RECLIMIT, SEQUENCE, SORT, SUPPORTED_EXP_TYPES, THREAD_AVAILABLE, ZERO_CONCURRENT_RUN
Constructor and Description |
---|
ExpressionHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Integer |
getExpressionDataType(java.lang.String expression,
java.lang.String objectName)
Validates the passed expression by executing a JDBC query against the passed object,
Returns the resulting data type obtained from the ResultSetMetaData.
|
static boolean |
isCompatibleDataType(java.lang.String mxDataType,
int jdbcDataType)
Evaluates whether the specified Maximo data type is compatible with the
specified type provided by the JDBC driver.
|
static boolean |
isCompatiblePrecision(java.lang.String mxDataType,
int jdbcDataType)
Determines if the mxDataType that is selected is less precise than the JDBC type.
|
static boolean |
isJDBCDate(int type)
Determines whether the passed SQL data type from ResultSetMetaData
is a date type.
|
static boolean |
isJDBCNumeric(int type)
Determines whether the passed SQL data type from ResultSetMetaData
is numeric.
|
static boolean |
isJDBCPrecise(int type)
Determines whether the JDBC type is a type with a large precision.
|
static boolean |
isMxDate(java.lang.String type)
Determines whether the passed Maximo data type
is a date type.
|
static boolean |
isMxNumeric(java.lang.String type)
Determines whether the passed Maximo data type
is numeric.
|
public static final java.lang.String[] MX_NUMERIC_TYPES
public static final java.lang.String[] MX_DATE_TYPES
public static boolean isCompatibleDataType(java.lang.String mxDataType, int jdbcDataType)
String
- mxDataType the Maximo data type selected for the expressionint
- jdbcDataType the data type returned by the JDBC ResultSetMetaData for the calculated columnpublic static boolean isCompatiblePrecision(java.lang.String mxDataType, int jdbcDataType)
mxDataType
- jdbcDataType
- public static java.lang.Integer getExpressionDataType(java.lang.String expression, java.lang.String objectName) throws java.lang.Exception
expression
- the test expressionobjectName
- the object to test the expression string againstMXException
java.rmi.RemoteException
java.lang.Exception
public static boolean isJDBCNumeric(int type)
type
- the SQL data typepublic static boolean isMxNumeric(java.lang.String type)
type
- the Maximo data typepublic static boolean isJDBCDate(int type)
type
- the SQL data typepublic static boolean isMxDate(java.lang.String type)
type
- the Maximo data typepublic static boolean isJDBCPrecise(int type)
type
-