public abstract class AbstractPropertyBindingResult extends AbstractBindingResult
PropertyAccessor
メカニズムで動作する BindingResult
実装の抽象基本クラス。対応する PropertyAccessor メソッドへの委譲によるフィールドアクセスを事前に実装します。getPropertyAccessor()
, PropertyAccessor
, ConfigurablePropertyAccessor
, 直列化された形式 MODEL_KEY_PREFIX
NESTED_PATH_SEPARATOR
修飾子 | コンストラクターと説明 |
---|---|
protected | AbstractPropertyBindingResult(StringSE objectName) 新しい AbstractPropertyBindingResult インスタンスを作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
protected StringSE | canonicalFieldName(StringSE field) 正規のプロパティ名を返します。 |
PropertyEditorSE | findEditor(StringSE field, ClassSE<?> valueType) この実装は、必要に応じて、フォーマッタ用の PropertyEditor アダプターを公開します。 |
protected ObjectSE | formatFieldValue(StringSE field, ObjectSE value) 登録された PropertyEditors に基づいてフィールド値をフォーマットします。 |
protected ObjectSE | getActualFieldValue(StringSE field) PropertyAccessor からフィールド値をフェッチします。 |
protected PropertyEditorSE | getCustomEditor(StringSE fixedField) 特定のフィールドのカスタム PropertyEditor を取得します(ある場合)。 |
ClassSE<?> | getFieldType(StringSE field) プロパティ型からフィールド型を決定します。 |
abstract ConfigurablePropertyAccessor | getPropertyAccessor() アクセスの具体的な戦略に従って、使用する PropertyAccessor を提供します。 |
PropertyEditorRegistry | getPropertyEditorRegistry() 基になる PropertyAccessor を返します。 |
void | initConversion(ConversionService conversionService) |
addAllErrors, addError, equals, getAllErrors, getErrorCount, getFieldError, getFieldError, getFieldErrors, getFieldErrors, getFieldValue, getGlobalError, getGlobalErrors, getMessageCodesResolver, getModel, getObjectName, getRawFieldValue, getSuppressedFields, getTarget, hasErrors, hashCode, recordFieldValue, recordSuppressedField, reject, rejectValue, resolveMessageCodes, resolveMessageCodes, setMessageCodesResolver
doSetNestedPath, fixedField, getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, isMatchingFieldError, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath, toString
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
getFieldErrorCount, getFieldErrorCount, getGlobalErrorCount, getNestedPath, hasFieldErrors, hasFieldErrors, hasGlobalErrors, popNestedPath, pushNestedPath, reject, reject, rejectValue, rejectValue, setNestedPath
protected AbstractPropertyBindingResult(StringSE objectName)
objectName
- ターゲットオブジェクトの名前 DefaultMessageCodesResolver
public void initConversion(ConversionService conversionService)
public PropertyEditorRegistry getPropertyEditorRegistry()
BindingResult
の getPropertyEditorRegistry
AbstractBindingResult
の getPropertyEditorRegistry
null
getPropertyAccessor()
protected StringSE canonicalFieldName(StringSE field)
AbstractErrors
の canonicalFieldName
field
- 元のフィールド名 PropertyAccessorUtils.canonicalPropertyName(java.lang.String)
@Nullable public ClassSE<?> getFieldType(@Nullable StringSE field)
Errors
の getFieldType
AbstractBindingResult
の getFieldType
field
- フィールド名 null
getPropertyAccessor()
@Nullable protected ObjectSE getActualFieldValue(StringSE field)
AbstractBindingResult
の getActualFieldValue
field
- チェックするフィールド getPropertyAccessor()
protected ObjectSE formatFieldValue(StringSE field, @Nullable ObjectSE value)
AbstractBindingResult
の formatFieldValue
field
- チェックするフィールド value
- フィールドの値 (バインディングエラー以外の拒否された値、または実際のフィールド値)getCustomEditor(java.lang.String)
@Nullable protected PropertyEditorSE getCustomEditor(StringSE fixedField)
fixedField
- 完全修飾フィールド名 null
@Nullable public PropertyEditorSE findEditor(@Nullable StringSE field, @Nullable ClassSE<?> valueType)
BindingResult
の findEditor
AbstractBindingResult
の findEditor
field
- プロパティのパス(名前またはネストされたパス)、または特定の型のすべてのプロパティのエディターを探している場合は null
valueType
- プロパティの型 (プロパティが指定されている場合は null
にすることができますが、一貫性チェックのためにいずれにしても指定する必要があります)null
public abstract ConfigurablePropertyAccessor getPropertyAccessor()
BindingResult によって使用される PropertyAccessor は、デフォルトで常に "extractOldValueForEditor" フラグを "true" に設定する必要があることに注意してください。これは通常、データバインディングターゲットとして機能するモデルオブジェクトの副作用なしで可能であるためです。