クラス SqlTemplateValueTypeRegistry

    • コンストラクタの詳細

      • SqlTemplateValueTypeRegistry

        public SqlTemplateValueTypeRegistry()
    • メソッドの詳細

      • findValueType

        @Nullable
        public SqlTemplateValueType<?> findValueType​(@Nullable
                                                     Class<?> requiredType,
                                                     @Nullable
                                                     String propertyPath)
        プロパティパスに対応した値の変換処理を取得します。
        パラメータ:
        requiredType - プロパティのクラスタイプ。
        propertyPath - プロパティのパス。
        戻り値:
        対応する変換処理の実装を返します。見つからない場合は null を返します。
      • register

        public <T> void register​(@NonNull
                                 @NonNull String propertyPath,
                                 @NonNull
                                 @NonNull Class<T> type,
                                 @NonNull
                                 @NonNull SqlTemplateValueType<T> valueType)
        プロパティのパスを指定してSqlTemplateValueType を登録します。

        SQLテンプレート中の変数(プロパティパス/式)を元に関連付ける再に使用します。

        型パラメータ:
        T - 関連付ける型
        パラメータ:
        propertyPath - プロパティパス/式
        type - 関連付けるクラスタイプ
        valueType - SqlTemplateValueTypeの実装
      • addStrippedPropertyPaths

        protected void addStrippedPropertyPaths​(List<String> strippedPaths,
                                                String nestedPath,
                                                String propertyPath)
        パスからリストのインデックス([1])やマップのキー([key])を除去したものを構成する。

        SpringFrameworkの「PropertyEditorRegistrySupport#addStrippedPropertyPaths(...)」の処理

        パラメータ:
        strippedPaths - 除去したパス
        nestedPath - 現在のネストしたパス
        propertyPath - 処理対象のパス