public final class ComparisonRuleUtil extends java.lang.Object implements MboConstants
ALLROWS, CHANGEDBY_USER, COUNT_ADDITIONS, COUNT_AFTERSAVE, COUNT_DATABASE, COUNT_DELETED, COUNT_EXISTING, DBCONFIG, DELAYVALIDATION, DELAYVALIDATIONONLY, DISCARDABLE, GOTCOMPLETEWHERE, HIDDEN, NO_RELATEDMBOS_OF_OWNERSCHILDREN_FETCH, NOACCESSCHECK, NOACTION, NOADD, NOCOMMIT, NODELETE, NONE, NOOVERWRITE, NOSAVE, NOSETVALUE, NOUPDATE, NOVALIDATION, NOVALIDATION_AND_NOACTION, NOVALIDATION_AND_NOACTION_ALLOWCROSSOVER, READONLY, REBUILD, REQUIRED, SAMEVALUEVALIDATION, SETBYPARENT, USER
Modifier and Type | Method and Description |
---|---|
static boolean |
calculateUnitOfMeasureReadOnlyState(Mbo mboAttrClause)
Calculates the "Unit of Measure" attribute's "read-only" state as it has to be in the present situation.
|
static java.lang.String |
convertArrayToSQLString(java.lang.String[] stringArray)
Convert a String array to a String to be used in a SQL statement
|
static boolean |
isOperatorRequireValue(java.lang.String strOpr)
if Operator is NOTEMPTY or NOTNULL return false
|
static java.lang.String |
prepareObjectsClauseString(MboSetRemote mbos)
Prepare clause for object evaluation
The following characters are use:
A - for Object ASSER or ASSETSPEC
I - for Object ITEM or ITEMSPEC
+ - for Logical Operator AND
- - for Logical Operator OR
|
static java.lang.String |
replace(java.lang.String s,
java.lang.String oldSubstring,
java.lang.String newSubstring)
Replaces one substring with another.
|
static void |
throwNestedException(MboRemote mbor,
MXApplicationException mxae)
Static method to throw nested expression for Comparison Rule (include the tab name in the exception)
|
static void |
throwNestedException(MboSetRemote mbos,
MXException mxe)
Static method to throw nested expression for Comparison Rule (include the tab name in the exception)
|
static boolean |
updateUnitOfMeasureEnabledState(Mbo mboAttrClause)
Updates the "enabled" state of the "Unit Of Measure" attribute.
|
static boolean |
validClauseWithItem(java.lang.String s)
Validate the clause expression
Do not allow:A+I, I+A
Allow M (meaning A-I,I-A) only if it is the last expression
A - ASSET
I - ITEM
M - MIX ASSET or ITEM (A-I or I-A)
N - NOT Valid
Note: This validation should come only after the main validation that make sure there are
valid objects, operator and parenthesis
|
public static void throwNestedException(MboRemote mbor, MXApplicationException mxae) throws MXException, java.rmi.RemoteException
mbor
- mxae
- MXException
java.rmi.RemoteException
public static void throwNestedException(MboSetRemote mbos, MXException mxe) throws MXException, java.rmi.RemoteException
mbos
- mxe
- MXException
java.rmi.RemoteException
public static boolean isOperatorRequireValue(java.lang.String strOpr)
strOpr
- public static final java.lang.String replace(java.lang.String s, java.lang.String oldSubstring, java.lang.String newSubstring)
public static java.lang.String convertArrayToSQLString(java.lang.String[] stringArray)
public static boolean validClauseWithItem(java.lang.String s)
s
- - clause expressionpublic static java.lang.String prepareObjectsClauseString(MboSetRemote mbos) throws MXException, java.rmi.RemoteException
mbos
- MXException
java.rmi.RemoteException
public static boolean updateUnitOfMeasureEnabledState(Mbo mboAttrClause) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public static boolean calculateUnitOfMeasureReadOnlyState(Mbo mboAttrClause) throws java.rmi.RemoteException, MXException
mboAttrClause
- An "Attribute Equality" MBO.java.rmi.RemoteException
MXException