インターフェース PropertyPath

すべてのスーパーインターフェース:
IterableSE<PropertyPath>, Streamable<PropertyPath>, SupplierSE<StreamSE<PropertyPath>>

public interface PropertyPath extends Streamable<PropertyPath>
ドメインクラス内の PropertyPath の抽象化。
作成者:
Oliver Gierke, Christoph Strobl, Mark Paluch, Mariusz M ą czkowski, Johannes Englmeier
  • メソッドの詳細

    • getOwningType

      TypeInformation<?> getOwningType()
      PropertyPath の所有型を返します。
      戻り値:
      owningType が null になることはありません。
    • getSegment

      StringSE getSegment()
      PropertyPath の最初の部分を返します。例:
      PropertyPath.from("a.b.c", Some.class).getSegment();
      
      結果は a になります。
      戻り値:
      名前が null になることはありません。
    • getLeafProperty

      default PropertyPath getLeafProperty()
      PropertyPath のリーフプロパティを返します。
      戻り値:
      null になることはありません。
    • getLeafType

      default ClassSE<?> getLeafType()
      現在の PropertyPath のリーフプロパティの型を返します。
      戻り値:
      null になることはありません。
    • getType

      default ClassSE<?> getType()
      プロパティの実際の型を返します。単純なプロパティの単純な解決型、任意の IterableSE のコンポーネント型、または MapSE の値型を返します。
      戻り値:
      プロパティの実際の型。
    • getTypeInformation

      TypeInformation<?> getTypeInformation()
      プロパティの型情報を返します。
      戻り値:
      プロパティの実際の型。
    • next

      @Nullable PropertyPath next()
      現在の要素の最初の要素を削除した結果の PropertyPath パスを返します。例:
      PropertyPath.from("a.b.c", Some.class).next().toDotPath();
      
      結果は出力になります: b.c
      戻り値:
      次のネストされた PropertyPath。ネストされた PropertyPath が使用できない場合は null。
      関連事項:
    • hasNext

      default boolean hasNext()
      ネストされた PropertyPath があるかどうかを返します。これが true を返す場合、next() が null 以外の値を返すことが期待できます。
      戻り値:
    • toDotPath

      default StringSE toDotPath()
      PropertyPath をドット表記で返します。
      戻り値:
      ドット表記の PropertyPath
    • isCollection

      default boolean isCollection()
      PropertyPath が実際にコレクションであるかどうかを返します。
      戻り値:
      PropertyPath が実際にコレクションであるかどうかを true にします。
    • nested

      default PropertyPath nested(StringSE path)
      現在のプロパティにネストされたパスの PropertyPath を返します。
      パラメーター:
      path - null または空であってはなりません。
      戻り値:
      null になることはありません。
    • iterator

      同じリーフ型で長さが減少するすべての部分プロパティパスを反復処理する Iterator of PropertyPathSE を返します。例:
      PropertyPath propertyPath = PropertyPath.from("a.b.c", Some.class);
      propertyPath.forEach(p -> p.toDotPath());
      
      ドットパスの結果は次のようになります。
      a.b.c
      b.c
      c
      
      次で指定:
      インターフェース IterableSE<PropertyPath>iterator 
    • from

      static PropertyPath from(StringSE source, ClassSE<?> type)
      指定されたソース StringSE および TypeInformation から PropertyPath チェーンを抽出します。
      デフォルトでは (?:[%s]?([%s]*?[^%s]+)) を使用し、quotedSE リテラルには (?:[%s]?([%s]*?[^%s]+)) を使用します。

      パスの各部分は、".""_"、キャメルケースで区切ることができます。プロパティへの一致が曖昧な場合は、長いプロパティ名が優先されます。userAddressCity の場合、user.address.city よりも userAddress.city の解釈が優先されます。

      パラメーター:
      source - プロパティのパスを示す文字列。null であってはなりません。
      type - プロパティパスの所有型は null であってはなりません。
      戻り値:
      新しい PropertyPath は null ではないことが保証されます。
    • from

      static PropertyPath from(StringSE source, TypeInformation<?> type)
      指定されたソース StringSE および TypeInformation から PropertyPath チェーンを抽出します。
      デフォルトでは (?:[%s]?([%s]*?[^%s]+)) を使用し、quotedSE リテラルには (?:[%s]?([%s]*?[^%s]+)) を使用します。

      パスの各部分は、".""_"、キャメルケースで区切ることができます。プロパティへの一致が曖昧な場合は、長いプロパティ名が優先されます。userAddressCity の場合、user.address.city よりも userAddress.city の解釈が優先されます。

      パラメーター:
      source - プロパティのパスを示す文字列。null であってはなりません。
      type - プロパティパスの所有型は null であってはなりません。
      戻り値:
      新しい PropertyPath は null ではないことが保証されます。