public class JboExpressionValidator extends JboAbstractValidator implements JboExprValidator
ValidatorConstants.MessageFlavormValidatingAttrmbInverse, mDescription, mErrorMessageClass, mMsgId, mMsgIds, mResourceBundleId, mTriggeringAttributeNames, mTriggeringAttributes, mValidatingAttrNamemFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX, RESID_SUFFIXATTR, ATTR_STR, BETWEEN, EO, EO_STR, EQUALTO, EXPR, EXPR_STR, GREATERTHAN, GREATERTHANEQUALTO, JBO, JBO_STR, LESSTHAN, LESSTHANEQUALTO, LITERAL, LITERAL_STR, MANDATORY_STR, mCompOperTypeVals, mRhsTypeVals, mSeverityVals, NOTEQUALTO, PNAME_CompareLength, PNAME_CompareType, PNAME_CompareValue, PNAME_DataType, PNAME_Description, PNAME_ErrorMessageExpressions, PNAME_ErrorMessageId, PNAME_ErrorMessageIds, PNAME_Exposed, PNAME_ExprValueSupplier, PNAME_ForPersonalization, PNAME_Inverse, PNAME_MessageFlavor, PNAME_Name, PNAME_OnAttribute, PNAME_OnAttributes, PNAME_OnCondition, PNAME_OperandType, PNAME_Severity, PNAME_Subtype, PNAME_TransactionLevel, PNAME_TransientExpression, PNAME_Trigger, PNAME_ValidationBeanClass, PNAME_ValName, PNAME_xmlns, PRECISION_SCALE_STR, SEVERITY_ERROR, SEVERITY_RECOVERABLE_ERROR_INDEX, SEVERITY_VETOABLE_WARNING, SEVERITY_WARNING, SQL, SQL_STR, TRIGGER_SUBTYPE_PREFIX, VALIDATION_XMLNS, VALIDATOR_MSG_ID_PREFIX, VO, VO_STR, VO_USAGE, VO_USAGE_STRXML_STATEMENT| Constructor and Description | 
|---|
JboExpressionValidator()  | 
JboExpressionValidator(boolean inverse,
                      java.lang.String expr)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
applyDiffChildren(DifferDetails dif,
                 DiffResolver resolver)
Applies changes to children defs. 
 | 
java.lang.Object | 
clone()  | 
DifferDetails | 
diffChildren(DiffMergeable docDef,
            DiffMergeable orgDef,
            DifferDetails difDetails)
Performs diff of children defs. 
 | 
ExprCodeSource | 
getCodeSource()  | 
java.lang.String | 
getDefXMLElementTag()  | 
java.lang.String | 
getExpression()  | 
java.lang.String | 
getExpressionClassName()  | 
ExpressionDef | 
getExpressionDef()  | 
boolean | 
getExpressionHasReturn()  | 
ExprEval.Privilege | 
getExpressionPrivilege()  | 
ExprEval.TrustMode | 
getExpressionTrustMode()
For Internal Framework Use Only. 
 | 
java.lang.String | 
getOwnerName()
For internal framework use only 
 | 
void | 
initValidatorProperties(java.util.HashMap props)  | 
void | 
loadXMLContents(DefElement elem)  | 
void | 
resolve(ValidationManager owner,
       StructureDef structDef,
       PersistableDefObject defObj)  | 
void | 
setExpression(java.lang.String expr)
Deprecated. 
 
use  
setExpressionDef(oracle.jbo.common.ExpressionDef) instead. | 
void | 
setExpressionDef(ExpressionDef exprDef)  | 
void | 
setExpressionHasReturn(boolean ret)  | 
void | 
setExpressionPrivilege(ExprEval.Privilege pr)  | 
void | 
setExpressionTrustMode(ExprEval.TrustMode trusted)
For Internal Framework Use Only. 
 | 
void | 
setTriggerType(TriggerType type)
Deprecated.   
 | 
void | 
setTriggerTypeString(java.lang.String type)  | 
void | 
setTypeCheckedMode(ExprEval.TypeCheckedMode typeCheckedMode)  | 
void | 
validate(JboValidatorContext evObj)
Tests the validity of the object/value as described in the validator context. 
 | 
boolean | 
validateValue(java.lang.Object value)
Validates a value. 
 | 
boolean | 
validateValueWithContext(JboValidatorContext evObj,
                        java.lang.Object value)
Called internally by the framework with validation OnCondition is true or
 there is no validation OnCondition. 
 | 
void | 
writeChildren(DefWriter jos)
Writes the Object's children to the Persistent storage 
 | 
applyValidatorPersonalization, closeObject, createException, diffContents, editCodeSource, ensureCodeSource, getDefXMLNameSpace, getErrorMsgId, getErrorReportAttrDef, getFullName, getImageLoc, getMessageFlavor, getName, getOperationDefinitions, getOrigObject, getRowOperationDefinitions, getTriggeringAttributeDefs, getValidatingAttributeName, getValidatorType, getValueToValidate, getXMLElementTag, initialize, isForPersonalization, isReadOnly, lookupExprDef, raiseException, setForPersonalization, setInitialized, setMessageFlavor, setName, setNewValue, setOrigObject, setValidatingAttribute, setValidatingAttribute, validateMany, writeContents, writeObjectapplyDiffContents, applyValidatorPersonalization, beginDiffObjects, convertToJava, copyErrorMsgInfo, createAttributeException, createExprValueSupplier, createRowException, diffObjects, ensureDifferDetails, ensureVariableManager, getDefTypeName, getDescription, getErrorMessageClass, getErrorMsgExpressionDefs, getErrorMsgExpressions, getErrorMsgIds, getExprIdentifier, getExprValueSupplierType, getInverse, getMergeableFullName, getMergeableName, getMessageBundleClass, getOnCondition, getOnConditionDef, getOwner, getResourceBundleDef, getResourceBundleId, getSeverity, getTriggeringAttributeNames, getTriggerType, getValidatorSubType, getVariableManager, hasErrorMsg, hasValidationCondition, hasVariables, initErrMsgParms, initTriggeringAttributeDefs, isDirty, isMovedToAttrLevel, isNew, isTransactionLevel, isTransactionLevel, isValidatable, loadVariables, lookupMessageDef, parseSeverityStr, prepareException, raiseException, readStringArrayList, readTransientExpression, readTransientExpression, readUserObject, readUserObject, readUserObjectTrim, readUserObjectTrim, readUserStringElementsMap, setDefaultDescription, setDescription, setDirty, setErrorMessageClass, setErrorMsgExpressionDefs, setErrorMsgExpressions, setErrorMsgId, setErrorMsgIds, setExprValueSupplierType, setInverse, setNew, setOnCondition, setResourceBundleDef, setResourceBundleId, setSeverity, setTransactionLevel, setTriggeringAttributeNames, setValidatingAttributeName, setValidatorSubTypeallocatePropertyMap, getAllProperties, getParent, getProperties, getPropertiesAsStrings, getPropertiesMap, getProperty, getProperty, getPropertyExpressionDef, getPropertyExpressionsMap, getPropertyMap, getPropertyNamesSet, getRawPropertyValue, getResourcesFromBundle, getStringFromMessageBundle, isPropertyExpression, mergePropertyMap, refreshProperty, removeProperty, removeProperty, requiresNamePrefixedResId, resolveObjectProperty, resolvePropertyRaw, setFullName, setParent, setPropertiesMap, setPropertiesMap2, setProperty, setProperty, setPropertyExpression, setPropertyMapequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTriggeringAttributeNames, isTransactionLevelgetDescription, setDescriptionisDirty, isNew, setDirty, setNewpublic JboExpressionValidator()
@Concealed
public JboExpressionValidator(boolean inverse,
                                         java.lang.String expr)
public java.lang.Object clone()
clone in class JboAbstractValidatorpublic java.lang.String getExpression()
getExpression in interface JboExprValidator@Concealed public java.lang.String getExpressionClassName()
@Concealed public ExprCodeSource getCodeSource()
public void setExpression(java.lang.String expr)
setExpressionDef(oracle.jbo.common.ExpressionDef) instead.public ExpressionDef getExpressionDef()
getExpressionDef in interface JboExprValidatorpublic void setExpressionDef(ExpressionDef exprDef)
public ExprEval.Privilege getExpressionPrivilege()
public void setExpressionPrivilege(ExprEval.Privilege pr)
@Concealed public ExprEval.TrustMode getExpressionTrustMode()
@Concealed public void setExpressionTrustMode(ExprEval.TrustMode trusted)
public void setTypeCheckedMode(ExprEval.TypeCheckedMode typeCheckedMode)
public boolean getExpressionHasReturn()
public void setExpressionHasReturn(boolean ret)
public boolean validateValue(java.lang.Object value)
JboAbstractValidatorSubclasses must implement this method.
validateValue in class JboAbstractValidatorvalue - the object to be validated.true if the object is valid.public boolean validateValueWithContext(JboValidatorContext evObj, java.lang.Object value)
JboAbstractValidatorvalidateValueWithContext in class JboAbstractValidator@Concealed public void setTriggerType(TriggerType type)
@Concealed public void setTriggerTypeString(java.lang.String type)
setTriggerTypeString in class AbstractValidator@Concealed public java.lang.String getOwnerName()
public void validate(JboValidatorContext evObj)
JboValidatorInterfacevalidate in interface JboValidatorInterfacevalidate in class JboAbstractValidatorevObj - the validator contextpublic void initValidatorProperties(java.util.HashMap props)
initValidatorProperties in interface JboValidatorHintsinitValidatorProperties in class AbstractValidatorpublic void loadXMLContents(DefElement elem)
loadXMLContents in class JboAbstractValidatorpublic void resolve(ValidationManager owner, StructureDef structDef, PersistableDefObject defObj)
resolve in interface JboValidatorHintsresolve in class JboAbstractValidatorpublic java.lang.String getDefXMLElementTag()
getDefXMLElementTag in interface PersistentDefinitiongetDefXMLElementTag in class AbstractValidatorpublic void writeChildren(DefWriter jos)
PersistentDefinitionwriteChildren in interface PersistentDefinitionwriteChildren in class AbstractValidatorjos - the Output storage for persistencepublic DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
DiffMergeabledifDetails and
 return it at the end.
 For example, if this def has Child1 and Child2, its implementation should look something like:
    public DifferDetails diffChildren(DiffMergeable docDef, DiffMergeable orgDef, DifferDetails difDetails)
    {
       difDetails = diffChildrenChild1(docDef, orgDef, difDetails);
       difDetails = diffChildrenChild1(docDef, orgDef, difDetails);
       return difDetails;
    }
 
 
 where diffChildrenChild1() uses DifferChildren's
 helper method diffChildrenList to diff the child defs.
 
diffChildren in interface DiffMergeablediffChildren in class AbstractValidatordocDef - the document-level definitionorgDef - the original definition.  It could be
   null if the definition did not exist originallydifDetails - the DifferDetails that accumulate
   the details of diff from the document-level (top-level) defDifferDetails that has all the details
   of diffpublic void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
DiffMergeabledif contains the
 changes to be applied to the children.  For each child def, this method
 should first retrieve the diff details for the child, which is of type
 DifferChildren.  Then, it should call
 DifferChildren.applyDiffChanges(oracle.jbo.mom.DiffChildrenMerge, oracle.jbo.mom.DiffResolver) to perform
 the change operation.
 
 applyChanges() requires a
 DiffChildrenMerge object, which has the insert,
 update, and remove methods.  'this' def object must
 provide implmementation of these operations.
 
Here is a sample:
    public void applyDiffChildren(DifferDetails dif, DiffResolver resolver)
    {
       DifferChangeMap detailMap = dif.getDetailMap();
       if (detailMap != null)
       {
          DifferChildren difChild1 = (DifferChildren) detailMap.getValue();
          if (difVCs != null)
          {
             DiffChildrenMerge dm = new DiffChildrenMerge()
             {
                public void insertChild(Object id, Object value)
                {
                   .. perform insert op for Child1 ..
                }
                public void updateChild(Object id, Object value, Object oldValue)
                {
                   .. perform update op for Child1 ..
                }
                public void removeChild(Object id)
                {
                   .. perform remove op for Child1 ..
                }
             };
             difChild1.applyDiffChanges(dm, resolver);
          }
          // Similarly for Child2
       }
    }
  applyDiffChildren in interface DiffMergeableapplyDiffChildren in class AbstractValidator