站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

FieldError (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.validation
Class FieldError

java.lang.Object
  extended by org.springframework.context.support.DefaultMessageSourceResolvable
      extended by org.springframework.validation.ObjectError
          extended by org.springframework.validation.FieldError
All Implemented Interfaces:
Serializable, MessageSourceResolvable

public class FieldError
extends ObjectError

Class that encapsulates a field error, i.e. a reason for rejecting a specific field value.

See DefaultMessageCodesResolver javadoc for details on how a message code list is built for a FieldError.

Since:
10.03.2003
Author:
Rod Johnson, Juergen Hoeller
See Also:
DefaultMessageCodesResolver, Serialized Form

Constructor Summary
FieldError(String objectName, String field, Object rejectedValue, boolean bindingFailure, String[] codes, Object[] arguments, String defaultMessage)
          Create a new FieldError instance.
 
Method Summary
 String getField()
          Return the affected field of the object.
 Object getRejectedValue()
          Return the rejected field value.
 boolean isBindingFailure()
          Return whether this error represents a binding failure (like a type mismatch); else, it is a validation failure.
 String toString()
           
 
Methods inherited from class org.springframework.validation.ObjectError
getObjectName
 
Methods inherited from class org.springframework.context.support.DefaultMessageSourceResolvable
getArguments, getCode, getCodes, getDefaultMessage, resolvableToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldError

public FieldError(String objectName,
                  String field,
                  Object rejectedValue,
                  boolean bindingFailure,
                  String[] codes,
                  Object[] arguments,
                  String defaultMessage)
Create a new FieldError instance.

Parameters:
objectName - the name of the affected object
field - the affected field of the object
rejectedValue - the rejected field value
bindingFailure - whether this error represents a binding failure (like a type mismatch); else, it is a validation failure
codes - the codes to be used to resolve this message
arguments - the array of arguments to be used to resolve this message
defaultMessage - the default message to be used to resolve this message
Method Detail

getField

public String getField()
Return the affected field of the object.


getRejectedValue

public Object getRejectedValue()
Return the rejected field value.


isBindingFailure

public boolean isBindingFailure()
Return whether this error represents a binding failure (like a type mismatch); else, it is a validation failure.


toString

public String toString()
Overrides:
toString in class ObjectError


Copyright (c) 2002-2007 The Spring Framework Project.