|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.1.0) E10653-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.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 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.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 AbstractValidator
public java.lang.String getErrorMsgId()
getErrorMsgId
in class JboAbstractValidator
public void validateMany(java.util.ArrayList valCtxs)
validateMany
in interface JboTransValidatorInterface
validateMany
in class JboAbstractValidator
public boolean validateValueWithContext(JboValidatorContext evObj, java.lang.Object value)
JboAbstractValidator
validateValueWithContext
in class JboAbstractValidator
public void raiseException(java.lang.Exception e, JboValidatorContext evObj, java.lang.String msgId, int severity)
raiseException
in class JboAbstractValidator
public boolean validateValue(java.lang.Object value)
JboAbstractValidator
Subclasses must implement this method.
validateValue
in class JboAbstractValidator
value
- 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 AbstractValidator
public java.lang.String toString()
toString
in class java.lang.Object
public void initValidatorProperties(java.util.HashMap props)
initValidatorProperties
in interface JboValidatorHints
initValidatorProperties
in class AbstractValidator
public java.lang.String getDefXMLElementTag()
getDefXMLElementTag
in interface PersistentDefinition
getDefXMLElementTag
in class JboAbstractValidator
public void loadXMLContents(DefElement elem)
loadXMLContents
in class JboAbstractValidator
public void writeContents(DefWriter jos)
PersistentDefinition
writeContents
in interface PersistentDefinition
writeContents
in class JboAbstractValidator
jos
- the Output storage for persistence
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.1.0) E10653-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |