クラス ValueTypeRegistry
- java.lang.Object
-
- com.github.mygreen.sqlmapper.core.type.ValueTypeRegistry
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 ValueTypeRegistry()
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 voidafterPropertiesSet()ValueType<?>findValueType(@NonNull PropertyMeta propertyMeta)エンティティのプロパティメタ情報に対するValueTypeを取得します。ValueType<?>findValueType(@NonNull StoredPropertyMeta propertyMeta)ストアドのプロパティ情報に対するValueTypeを取得します。ValueType<?>findValueType(@NonNull Class<?> classType)登録済みのクラスタイプ対するValueTypeを取得します。org.springframework.context.ApplicationContextgetApplicationContext()protected ValueType<?>getEnumType(PropertyMeta propertyMeta)列挙型用のValueTypeを取得する。org.springframework.jdbc.support.lob.LobHandlergetLobHandler()protected ValueType<?>getLobType(PropertyMeta propertyMeta)ラージオブジェクト用のValueTypeを取得する。com.github.mygreen.messageformatter.MessageFormattergetMessageFormatter()protected ValueType<?>getUtilDateType(PropertyMeta propertyMeta)時制の型が不明なDateの ValueType} を取得する。protected ValueType<?>getValueType(PropertyMeta propertyMeta, Convert convertAnno)booleanisRegisteredType(@NonNull Class<?> classType)登録済みのクラスタイプかどうか判定します。<T> voidregister(@NonNull Class<T> type, @NonNull ValueType<T> valueType)ValueTypeを登録します。protected voidregisterWithDefaultValueTypes()標準のValueTypeを登録する。voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)voidsetMessageFormatter(com.github.mygreen.messageformatter.MessageFormatter messageFormatter)
-
-
-
メソッドの詳細
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception初期化処理として、標準の
ValueTypeを登録する(registerWithDefaultValueTypes())。- 定義:
afterPropertiesSetインタフェース内org.springframework.beans.factory.InitializingBean- 例外:
Exception
-
registerWithDefaultValueTypes
protected void registerWithDefaultValueTypes()
標準のValueTypeを登録する。
-
isRegisteredType
public boolean isRegisteredType(@NonNull @NonNull Class<?> classType)登録済みのクラスタイプかどうか判定します。- パラメータ:
classType- 判定対象のクラスタイプ。- 戻り値:
- 登録済みのクラスタイプのとき true を返します。
-
findValueType
public ValueType<?> findValueType(@NonNull @NonNull Class<?> classType)
登録済みのクラスタイプ対するValueTypeを取得します。- パラメータ:
classType- クラスタイプ。- 戻り値:
ValueTypeを返します。ただし、登録済みでない場合は、null を返します。
-
findValueType
public ValueType<?> findValueType(@NonNull @NonNull StoredPropertyMeta propertyMeta)
ストアドのプロパティ情報に対するValueTypeを取得します。- パラメータ:
propertyMeta-- 戻り値:
- 対応する
ValueTypeの実装を返します。 - 例外:
ValueTypeNotFoundException- 対応するValueTypeが見つからない場合。
-
findValueType
public ValueType<?> findValueType(@NonNull @NonNull PropertyMeta propertyMeta)
エンティティのプロパティメタ情報に対するValueTypeを取得します。- パラメータ:
propertyMeta- プロパティメタ情報- 戻り値:
- 対応する
ValueTypeの実装を返します。 - 例外:
ValueTypeNotFoundException- 対応するValueTypeが見つからない場合。
-
getValueType
protected ValueType<?> getValueType(PropertyMeta propertyMeta, Convert convertAnno)
- パラメータ:
propertyMeta- 対象となるプロパティメタ情報convertAnno- 変換規則を指定するアノテーション- 戻り値:
ValueTypeのインスタンス。
-
getLobType
protected ValueType<?> getLobType(PropertyMeta propertyMeta)
ラージオブジェクト用のValueTypeを取得する。- パラメータ:
propertyMeta- 対象となるプロパティメタ情報- 戻り値:
ValueTypeのインスタンス。
-
getEnumType
protected ValueType<?> getEnumType(PropertyMeta propertyMeta)
列挙型用のValueTypeを取得する。- パラメータ:
propertyMeta- 対象となるプロパティメタ情報- 戻り値:
ValueTypeのインスタンス。
-
getUtilDateType
protected ValueType<?> getUtilDateType(PropertyMeta propertyMeta)
時制の型が不明なDateの ValueType} を取得する。- パラメータ:
propertyMeta- 対象となるプロパティメタ情報- 戻り値:
ValueTypeのインスタンス。
-
register
public <T> void register(@NonNull @NonNull Class<T> type, @NonNull @NonNull ValueType<T> valueType)ValueTypeを登録します。- 型パラメータ:
T- 関連付ける型- パラメータ:
type- 関連付けるクラスタイプvalueType-ValueTypeの実装
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
getMessageFormatter
public com.github.mygreen.messageformatter.MessageFormatter getMessageFormatter()
-
setMessageFormatter
public void setMessageFormatter(com.github.mygreen.messageformatter.MessageFormatter messageFormatter)
-
getLobHandler
public org.springframework.jdbc.support.lob.LobHandler getLobHandler()
-
setLobHandler
public void setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
-
-