|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.5.0) E10653-06 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.jbo.common.NamedObjectImpl
oracle.jbo.rules.AbstractValidator
oracle.jbo.rules.JboAbstractValidator
oracle.jbo.rules.JboMethodValidator
public class JboMethodValidator
A validator that tests values by passing them to a validation method.
The validation method must be public, take a single Object parameter and return Boolean.
| Field Summary |
|---|
| Fields inherited from class oracle.jbo.rules.JboAbstractValidator |
|---|
mValidatingAttr |
| Fields inherited from class oracle.jbo.rules.AbstractValidator |
|---|
mbInverse, mDescription, mErrorMessageClass, mMsgExpr, mMsgId, mMsgIds, mResourceBundleId, mTriggeringAttributeNames, mTriggeringAttributes, mValidatingAttrName |
| Fields inherited from class oracle.jbo.common.NamedObjectImpl |
|---|
mFullName, mObjName, mParent, mProperties, RES_ID_SUFFIX |
| Fields inherited from interface oracle.jbo.mom.xml.DefPersistable |
|---|
XML_STATEMENT |
| Constructor Summary | |
|---|---|
JboMethodValidator()Creates a validator without assigning its validation method. |
|
JboMethodValidator(java.lang.String methodName, java.lang.Class entityClz, java.lang.Class clz)Creates a validator given the name of the validation method. |
|
| Method Summary | |
|---|---|
java.lang.String |
getDefXMLElementTag() |
java.lang.String |
getErrorMsgId() |
java.lang.reflect.Method |
getMethod()Gets the method invoked by this validator. |
java.lang.String |
getMethodName()Gets the name of the method invoked by this validator. |
void |
initValidatorProperties(java.util.HashMap props) |
void |
loadXMLContents(DefElement elem) |
protected void |
prepareException(ValidationException valEx, JboValidatorContext evObj, int severity) |
void |
raiseException(java.lang.Exception e, JboValidatorContext evObj, java.lang.String msgId, int severity) |
void |
setMethodName(java.lang.String mthName)Sets the name of the method invoked by this validator. |
void |
setObjectMethod(java.lang.Class entityClz, java.lang.Class attrClaz)This implementation finds the given method in the given object and stores the Method reference for invocation by validateValue. |
void |
setTransactionLevel(boolean bTransactionLevel) |
java.lang.String |
toString()Internal: For debugging purposes only. |
void |
validateMany(java.util.ArrayList valCtxs) |
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 |
writeContents(DefWriter jos)Objects should write their persistence output in this method |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.jbo.rules.JboValidatorInterface |
|---|
getDescription, setDescription, validate |
| Methods inherited from interface oracle.jbo.rules.JboValidatorHints |
|---|
getTriggeringAttributeNames, isTransactionLevel |
| Methods inherited from interface oracle.jbo.mom.xml.DefPersistable |
|---|
isDirty, isNew, setDirty, setNew |
| Methods inherited from interface oracle.jbo.mom.xml.PersistentDefinition |
|---|
writeChildren |
| Constructor Detail |
|---|
public JboMethodValidator()
public JboMethodValidator(java.lang.String methodName,
java.lang.Class entityClz,
java.lang.Class clz)
methodName - the name of a Java method. The method must be public, take a single Object parameter and return Boolean.| Method Detail |
|---|
public void setObjectMethod(java.lang.Class entityClz,
java.lang.Class attrClaz)
protected void prepareException(ValidationException valEx,
JboValidatorContext evObj,
int severity)
prepareException in class AbstractValidatorpublic java.lang.String getErrorMsgId()
getErrorMsgId in class JboAbstractValidatorpublic void validateMany(java.util.ArrayList valCtxs)
validateMany in interface JboTransValidatorInterfacevalidateMany in class JboAbstractValidator
public boolean validateValueWithContext(JboValidatorContext evObj,
java.lang.Object value)
JboAbstractValidatorvalidateValueWithContext in class JboAbstractValidator
public void raiseException(java.lang.Exception e,
JboValidatorContext evObj,
java.lang.String msgId,
int severity)
raiseException in class JboAbstractValidatorpublic 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 void setMethodName(java.lang.String mthName)
mthName - the name of a Java method. The method must be public, take a single Object parameter and return Boolean.public java.lang.String getMethodName()
public java.lang.reflect.Method getMethod()
method object, a description of a Java method.public void setTransactionLevel(boolean bTransactionLevel)
setTransactionLevel in class AbstractValidatorpublic java.lang.String toString()
toString in class java.lang.Objectpublic void initValidatorProperties(java.util.HashMap props)
initValidatorProperties in interface JboValidatorHintsinitValidatorProperties in class AbstractValidatorpublic java.lang.String getDefXMLElementTag()
getDefXMLElementTag in interface PersistentDefinitiongetDefXMLElementTag in class JboAbstractValidatorpublic void loadXMLContents(DefElement elem)
loadXMLContents in class JboAbstractValidatorpublic void writeContents(DefWriter jos)
PersistentDefinitionwriteContents in interface PersistentDefinitionwriteContents in class JboAbstractValidatorjos - the Output storage for persistence
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.5.0) E10653-06 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||