Class JdbcIdentifierBuilder

java.lang.Object
org.springframework.data.jdbc.core.convert.JdbcIdentifierBuilder

public class JdbcIdentifierBuilder extends Object
Builder for Identifier. Mainly for internal use within the framework
Since:
1.1
Author:
Jens Schauder
  • Method Details

    • empty

      public static JdbcIdentifierBuilder empty()
    • forBackReferences

      public static JdbcIdentifierBuilder forBackReferences(JdbcConverter converter, AggregatePath path, Function<AggregatePath, Object> valueProvider)
      Creates ParentKeys with backreference for the given path and value of the parents id.
    • forBackReference

      public static Identifier forBackReference(JdbcConverter converter, AggregatePath path, Identifier defaultIdentifier, Function<AggregatePath, Object> valueProvider)
      Parameters:
      converter - used for determining the column types to be used for different properties. Must not be null.
      path - the path for which needs to back reference an id. Must not be null.
      defaultIdentifier - Identifier to be used as a default when no backreference can be constructed. Must not be null.
      valueProvider - provides values for the Identifier based on an AggregatePath. Must not be null.
      Returns:
      Guaranteed not to be null.
    • withQualifier

      public JdbcIdentifierBuilder withQualifier(AggregatePath path, Object value)
      Adds a qualifier to the identifier to build. A qualifier is a map key or a list index.
      Parameters:
      path - path to the map that gets qualified by value. Must not be null.
      value - map key or list index qualifying the map identified by path. Must not be null.
      Returns:
      this builder. Guaranteed to be not null.
    • build

      public Identifier build()