public class DomainClassConverter<T extends ConversionService & ConverterRegistry> extends ObjectSE implements ConditionalGenericConverter, ApplicationContextAware
Converter
は、任意の入力を Spring Data CrudRepository
によって管理されるドメインクラスに変換します。実装では、ConversionService
を使用して、ソース型をドメインクラスの ID 型に変換し、次に CrudRepository
を使用してドメインクラスオブジェクトに変換します。GenericConverter.ConvertiblePair
コンストラクターと説明 |
---|
DomainClassConverter(T conversionService) 指定された ConversionService の新しい DomainClassConverter を作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
ObjectSE | convert(ObjectSE source, TypeDescriptor sourceType, TypeDescriptor targetType) |
SetSE<GenericConverter.ConvertiblePair> | getConvertibleTypes() |
boolean | matches(TypeDescriptor sourceType, TypeDescriptor targetType) |
void | setApplicationContext(ApplicationContext context) |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public DomainClassConverter(T conversionService)
ConversionService
の新しい DomainClassConverter
を作成します。conversionService
- null であってはなりません。@NonNull public SetSE<GenericConverter.ConvertiblePair> getConvertibleTypes()
GenericConverter
の getConvertibleTypes
@Nullable public ObjectSE convert(@Nullable ObjectSE source, TypeDescriptor sourceType, TypeDescriptor targetType)
GenericConverter
の convert
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType)
ConditionalConverter
の matches
public void setApplicationContext(ApplicationContext context)
ApplicationContextAware
の setApplicationContext
Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.