Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.0.0)

E10653-01

oracle.jbo
Class ValidationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by oracle.jbo.JboWarning
                  extended by oracle.jbo.JboException
                      extended by oracle.jbo.ValidationException
All Implemented Interfaces:
java.io.Serializable, JboMessage, MetaObjectBase, Properties
Direct Known Subclasses:
AttrValException, KeyNotPopulatedException, RowValException, TxnValException

public class ValidationException
extends JboException

Indicates a validation failure. This class may be extended to provide localizable exceptions to arbitrary bundle classes.

Since:
JDeveloper 3.0
See Also:
Serialized Form

Field Summary
protected  java.lang.String mRowDefFullName
           
 
Fields inherited from class oracle.jbo.JboException
mHasPeerException
 
Fields inherited from class oracle.jbo.JboWarning
mHelper, SEVERITY_ERROR, SEVERITY_RECOVERABLE_ERROR, SEVERITY_VETOABLE_WARNING, SEVERITY_WARNING
 
Fields inherited from interface oracle.jbo.common.MetaObjectBase
TYP_APP_MODULE, TYP_ATTRIBUTE, TYP_ATTRIBUTE_LIST_WITH_DEF, TYP_COMPONENT_OBJECT, TYP_DATA_CONTROL, TYP_DEF_ANY, TYP_DEF_APP_MODULE, TYP_DEF_ASSOC_END, TYP_DEF_ATTRIBUTE, TYP_DEF_COMPONENT_OBJECT, TYP_DEF_DOMAIN, TYP_DEF_ENTITY_ASSOC, TYP_DEF_ENTITY_OBJECT, TYP_DEF_KEY, TYP_DEF_LIST_BINDING, TYP_DEF_METHOD, TYP_DEF_PACKAGE, TYP_DEF_VIEW_ACCESSOR, TYP_DEF_VIEW_LINK, TYP_DEF_VIEW_LINK_END, TYP_DEF_VIEW_OBJECT, TYP_DOMAIN, TYP_ENTITY_ASSOC, TYP_ENTITY_OBJECT, TYP_ENTITY_ROW, TYP_ENTITY_ROW_SET, TYP_ENTITY_ROW_SET_ITERATOR, TYP_ENTITY_USAGE, TYP_PACKAGE, TYP_PERS_DEF_APP_MODULE, TYP_PERS_DEF_ATTRIBUTE, TYP_PERS_DEF_COMPONENT_OBJECT, TYP_PERS_DEF_DOMAIN, TYP_PERS_DEF_ENTITY_ASSOC, TYP_PERS_DEF_ENTITY_OBJECT, TYP_PERS_DEF_OFFSET, TYP_PERS_DEF_PACKAGE, TYP_PERS_DEF_VARIABLE, TYP_PERS_DEF_VIEW_LINK, TYP_PERS_DEF_VIEW_OBJECT, TYP_SORT_CRITERIA, TYP_TRANSACTION, TYP_VALIDATOR_TYPE, TYP_VARIABLE, TYP_VARIABLE_WHERE_CLAUSE, TYP_VIEW_CRITERIA, TYP_VIEW_LINK, TYP_VIEW_OBJECT, TYP_VIEW_ROW, TYP_VIEW_ROW_SET, TYP_VIEW_ROW_SET_ITERATOR
 
Constructor Summary
ValidationException(java.lang.Class resBundleClass, java.lang.String errorCode, java.lang.Object[] params)
          Creates a localizable exception.
ValidationException(ResourceBundleDef resBundleDef, java.lang.String errorCode, java.lang.Object[] params)
          Creates a localizable exception.
ValidationException(java.lang.String message)
          Create a non-formattable exception.
ValidationException(java.lang.String msg, java.lang.String errorCode, java.lang.Object[] params)
          Creates a formattable but non-localizable exception.
 
Method Summary
 ValidationException getAttributeException(java.lang.String rowDefName, java.lang.String attrName)
           
 java.lang.String getRowDefFullName()
          Returns the full name of the definition object of the Row that this exception was raised in.
 boolean hasAttributeException(java.lang.String attrName)
           
static void raise(java.lang.Class resBundleClass, java.lang.String errorCode, java.lang.Object[] params, java.util.ArrayList details)
          Creates a localizable exception.
static void raise(java.lang.Class resBundleClass, java.lang.String errorCode, java.lang.Object[] params, java.util.ArrayList details, boolean peer, boolean voEx)
          Creates a localizable exception.
static void raise(java.lang.Class resBundleClass, java.lang.String errorCode, java.lang.Object[] params, java.util.Vector details)
          Creates a localizable exception.
static void raiseWithNamedParameters(java.lang.Class resBundleClass, java.lang.String errorCode, java.util.Map params, java.util.ArrayList details, boolean peer, boolean voEx)
          Creates a localizable exception.
 void setErrorParameters(java.lang.Object[] params)
          Override so that when custom messages are created for validation, the caller can set evaluated parmeters for the message.
 void setErrorParametersMap(java.util.Map params)
          Resets the error parameters as a name-value pair.
protected  void setRowDefFullName(java.lang.String objFullName)
           
 
Methods inherited from class oracle.jbo.JboException
addToDetails, addToExceptions, containsException, doEntityToVOMapping, getExceptions, getSource, hasPeerExceptions, needsEntityToVOMapping, printStackTrace, printStackTrace, printStackTrace, setApplicationModule, setDetails, setExceptions, setNeedsEntityToVOMapping, setSource
 
Methods inherited from class oracle.jbo.JboWarning
getBaseMessage, getDetailMessage, getDetails, getErrorCode, getErrorParameters, getErrorParametersMap, getJboExceptionHelper, getLocalizedBaseMessage, getLocalizedMessage, getMessage, getProductCode, getProperties, getProperty, getProperty, getResourceClass, getResourceName, getSeverity, getTypeNameFromId, isAppendCodes, isLocalizable, isWarning, refreshProperty, setAppendCodes, setLocaleContext, setProperty, setSeverity
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mRowDefFullName

protected java.lang.String mRowDefFullName
Constructor Detail

ValidationException

public ValidationException(java.lang.String message)
Create a non-formattable exception. This is pretty much for demo purposes, where generated Validation Rules throw this exception. Applications should use resource bundles to create validation exceptions.

Parameters:
message - the text of the message.

ValidationException

public ValidationException(java.lang.Class resBundleClass,
                           java.lang.String errorCode,
                           java.lang.Object[] params)
Creates a localizable exception.

Parameters:
resBundleClass - a resource bundle.
errorCode - an error or message code.
params - an array of parameters for the formatted message.

ValidationException

public ValidationException(ResourceBundleDef resBundleDef,
                           java.lang.String errorCode,
                           java.lang.Object[] params)
Creates a localizable exception.

Parameters:
resBundleDef - a ResourceBundleDef.
errorCode - an error or message code.
params - an array of parameters for the formatted message.

ValidationException

public ValidationException(java.lang.String msg,
                           java.lang.String errorCode,
                           java.lang.Object[] params)
Creates a formattable but non-localizable exception.

Parameters:
msg - the unformatted text of the message.
errorCode - an error code.
params - the error message's parameters.
Method Detail

raise

public static void raise(java.lang.Class resBundleClass,
                         java.lang.String errorCode,
                         java.lang.Object[] params,
                         java.util.ArrayList details)
Creates a localizable exception.

Parameters:
resBundleClass - a resource bundle.
errorCode - an error or message code.
params - an array of parameters for the formatted message.
details - a detail list of exceptions

raise

public static void raise(java.lang.Class resBundleClass,
                         java.lang.String errorCode,
                         java.lang.Object[] params,
                         java.util.Vector details)
Creates a localizable exception. No more in use.

Parameters:
resBundleClass - a resource bundle.
errorCode - an error or message code.
params - an array of parameters for the formatted message.
details - a detail list of exceptions

raise

public static void raise(java.lang.Class resBundleClass,
                         java.lang.String errorCode,
                         java.lang.Object[] params,
                         java.util.ArrayList details,
                         boolean peer,
                         boolean voEx)
Creates a localizable exception. No more in use.

Parameters:
resBundleClass - a resource bundle.
errorCode - an error or message code.
params - an array of parameters for the formatted message.
details - a detail list of exceptions
peer - indicates if this exception's peer status to be marked.
voEx - indicates if this exception is a ViewLevel Exception.

raiseWithNamedParameters

public static void raiseWithNamedParameters(java.lang.Class resBundleClass,
                                            java.lang.String errorCode,
                                            java.util.Map params,
                                            java.util.ArrayList details,
                                            boolean peer,
                                            boolean voEx)
Creates a localizable exception. No more in use.

Parameters:
resBundleClass - a resource bundle.
errorCode - an error or message code.
params - a map of named parameters for the formatted message.
details - a detail list of exceptions
peer - indicates if this exception's peer status to be marked.
voEx - indicates if this exception is a ViewLevel Exception.

getRowDefFullName

public java.lang.String getRowDefFullName()
Returns the full name of the definition object of the Row that this exception was raised in.


getAttributeException

public ValidationException getAttributeException(java.lang.String rowDefName,
                                                 java.lang.String attrName)
Parameters:
rowDefName - Entity Definition name. If null only attribute name is matched.
attrName - return if this exception or one of it's details has mapping attribute name.

hasAttributeException

public boolean hasAttributeException(java.lang.String attrName)

setErrorParameters

public void setErrorParameters(java.lang.Object[] params)
Override so that when custom messages are created for validation, the caller can set evaluated parmeters for the message.

Overrides:
setErrorParameters in class JboWarning

setErrorParametersMap

public void setErrorParametersMap(java.util.Map params)
Description copied from class: JboWarning
Resets the error parameters as a name-value pair. This method is for use by derived classes who create their own set of parameters but do not want the "thrower" to know about it.

Overrides:
setErrorParametersMap in class JboWarning

setRowDefFullName

protected void setRowDefFullName(java.lang.String objFullName)

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.0.0)

E10653-01

Copyright © 1997, 2008, Oracle. All rights reserved.