public class ExtendedModelMap extends ModelMap implements Model
Model
インターフェースを実装する ModelMap
のサブクラス。Model
インターフェース自体のような Java 5 固有。 これは、通常は Model
インターフェースの宣言を介して、Spring MVC によってハンドラーメソッドに公開される実装クラスです。ユーザーコード内でビルドする必要はありません。プレーンな ModelMap
または文字列キーを備えた通常の Map
SE でさえ、ユーザーモデルを返すのに十分です。
AbstractMap.SimpleEntrySE<KSE, VSE>, AbstractMap.SimpleImmutableEntrySE<KSE, VSE>
コンストラクターと説明 |
---|
ExtendedModelMap() |
修飾子と型 | メソッドと説明 |
---|---|
ExtendedModelMap | addAllAttributes(CollectionSE<?> attributeValues) 各要素の属性名の生成を使用して、提供された Collection のすべての属性をこの Map にコピーします。 |
ExtendedModelMap | addAllAttributes(MapSE<StringSE,?> attributes) 指定された Map のすべての属性をこの Map にコピーします。 |
ExtendedModelMap | addAttribute(ObjectSE attributeValue) generated name を使用して、この Map に提供された属性を追加します。 |
ExtendedModelMap | addAttribute(StringSE attributeName, ObjectSE attributeValue) 指定された名前に指定された属性を追加します。 |
MapSE<StringSE, ObjectSE> | asMap() モデル属性の現在のセットをマップとして返します。 |
ExtendedModelMap | mergeAttributes(MapSE<StringSE,?> attributes) 指定された Map のすべての属性をこの Map にコピーします。同じ名前の既存のオブジェクトが優先されます(つまり |
containsAttribute
clearSE, containsValueSE, entrySetSE, forEachSE, getSE, getOrDefaultSE, keySetSE, removeEldestEntrySE, replaceAllSE, valuesSE
cloneSE, computeSE, computeIfAbsentSE, computeIfPresentSE, containsKeySE, isEmptySE, mergeSE, putSE, putAllSE, putIfAbsentSE, removeSE, removeSE, replaceSE, replaceSE, sizeSE
equalsSE, hashCodeSE, toStringSE
finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
containsAttribute
computeSE, computeIfAbsentSE, computeIfPresentSE, containsKeySE, equalsSE, hashCodeSE, isEmptySE, mergeSE, putSE, putAllSE, putIfAbsentSE, removeSE, removeSE, replaceSE, replaceSE, sizeSE
public ExtendedModelMap addAttribute(StringSE attributeName, @Nullable ObjectSE attributeValue)
ModelMap
Model
の addAttribute
ModelMap
の addAttribute
attributeName
- モデル属性の名前 (非 null
)attributeValue
- モデル属性値 (null
にすることができます)public ExtendedModelMap addAttribute(ObjectSE attributeValue)
ModelMap
generated name
を使用して、この Map
に提供された属性を追加します。 メモ: 真の規則名を正しく判別できないため、このメソッドを使用する場合、空の Collections
SE はモデルに追加されません。ビューコードは、JSTL タグによってすでに行われているように、空のコレクションではなく null
をチェックする必要があります。
Model
の addAttribute
ModelMap
の addAttribute
attributeValue
- モデル属性値 (非 null
)public ExtendedModelMap addAllAttributes(@Nullable CollectionSE<?> attributeValues)
ModelMap
Collection
のすべての属性をこの Map
にコピーします。Model
の addAllAttributes
ModelMap
の addAllAttributes
ModelMap.addAttribute(Object)
public ExtendedModelMap addAllAttributes(@Nullable MapSE<StringSE,?> attributes)
ModelMap
Map
のすべての属性をこの Map
にコピーします。Model
の addAllAttributes
ModelMap
の addAllAttributes
ModelMap.addAttribute(String, Object)
public ExtendedModelMap mergeAttributes(@Nullable MapSE<StringSE,?> attributes)
ModelMap
Map
のすべての属性をこの Map
にコピーします。同じ名前の既存のオブジェクトが優先されます(つまり、置き換えられません)。Model
の mergeAttributes
ModelMap
の mergeAttributes