|
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.JboNonNullValidator
public class JboNonNullValidator
Implements non-null validation for mandatory attributes. This validation rule is applied by the framework to an Entity Object that has the mandatory flag set for any of its an attributes. The method isMandatory() identifies manditory attributes.
This validator is invoked by an Entity Objects's validate() method to confirm that its mandatory attributes are non-null. If any attribute is null, AttrValException is thrown. The framework does not perform this validation when an attribute value is changed, but only when its Enitity Object is validated.
Entity
,
EntityDefImpl
Field Summary | |
---|---|
protected AttributeDef[] |
mandatoryAttrs
|
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 | |
---|---|
JboNonNullValidator()
|
|
JboNonNullValidator(java.util.ArrayList vec)
Creates a validator from a list of attribute indices. |
|
JboNonNullValidator(java.util.ArrayList vec,
boolean isAll)
|
Method Summary | |
---|---|
AttributeDef[] |
getAttributeDefs()
|
java.lang.String |
getDefXMLElementTag()
|
protected void |
initialize(JboValidatorContext evObj)
|
void |
initValidatorProperties(java.util.HashMap props)
|
boolean |
isAll()
|
void |
loadXMLContents(DefElement elem)
|
void |
setAttributeNames(java.util.ArrayList attrNames)
|
void |
setIsAll(boolean b)
|
protected void |
throwAllNullError(JboValidatorContext evObj)
|
java.lang.String |
toString()
|
void |
validate(JboValidatorContext evObj)
Validates the Entity Object's mandatory attributes. |
boolean |
validateValue(java.lang.Object value)
Validates a value. |
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.JboValidatorHints |
---|
getTriggeringAttributeNames, isTransactionLevel |
Methods inherited from interface oracle.jbo.rules.JboValidatorInterface |
---|
getDescription, setDescription |
Methods inherited from interface oracle.jbo.mom.xml.PersistentDefinition |
---|
writeChildren |
Field Detail |
---|
protected transient AttributeDef[] mandatoryAttrs
Constructor Detail |
---|
public JboNonNullValidator()
public JboNonNullValidator(java.util.ArrayList vec)
vec
- a list of indices for attributes to be considered manditory.public JboNonNullValidator(java.util.ArrayList vec, boolean isAll)
Method Detail |
---|
protected void initialize(JboValidatorContext evObj)
initialize
in class JboAbstractValidator
public boolean isAll()
public void setIsAll(boolean b)
public AttributeDef[] getAttributeDefs()
public void setAttributeNames(java.util.ArrayList attrNames)
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.protected void throwAllNullError(JboValidatorContext evObj)
public void validate(JboValidatorContext evObj)
validate
in interface JboValidatorInterface
validate
in class JboAbstractValidator
evObj
- an event indicating the attributes to be validatated.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 void loadXMLContents(DefElement elem)
loadXMLContents
in class JboAbstractValidator
public java.lang.String getDefXMLElementTag()
getDefXMLElementTag
in interface PersistentDefinition
getDefXMLElementTag
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 |