blackboard.data
Class ValidationWarning

java.lang.Object
  |
  +--blackboard.data.ValidationWarning
All Implemented Interfaces:
java.io.Serializable

public class ValidationWarning
extends java.lang.Object
implements java.io.Serializable

Class used to encapsulate data validity violations. This object is created and added to a ValidationException, which can chain multiple ValidationWarnings together to give a complete list of errors for any given data operation.

Since:
Bb 5.5
Version:
$Revision: 6 $ $Date: 7/22/02 11:17a $
See Also:
Serialized Form

Constructor Summary
ValidationWarning(java.lang.String error, java.lang.String constraint)
          Instantiates a warning with the specified error for the specified constraint.
 
Method Summary
 java.lang.String getConstraint()
          Returns the description of the constraint.
 java.lang.String getError()
          Returns the description of the error.
 java.lang.String toString()
          Returns a string representation of this warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationWarning

public ValidationWarning(java.lang.String error,
                         java.lang.String constraint)
Instantiates a warning with the specified error for the specified constraint. For example,
   vw = new ValidationWarning("Field length exceeded.", "User name must be less than 50 characters.");
 

Parameters:
error - The condition in violation of the object's integrity rules.
constraint - The integrity rule that has been violated.
Method Detail

getError

public java.lang.String getError()
Returns the description of the error.


getConstraint

public java.lang.String getConstraint()
Returns the description of the constraint.


toString

public java.lang.String toString()
Returns a string representation of this warning.

Overrides:
toString in class java.lang.Object
Returns:
String in the form warning. constraint


Copyright © 2003 Blackboard, Inc. All Rights Reserved.