Class JdbcIdentifierBuilder
java.lang.Object
org.springframework.data.jdbc.core.convert.JdbcIdentifierBuilder
Builder for
Identifier. Mainly for internal use within the framework- Since:
- 1.1
- Author:
- Jens Schauder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()static JdbcIdentifierBuilderempty()static IdentifierforBackReference(JdbcConverter converter, AggregatePath path, Identifier defaultIdentifier, Function<AggregatePath, Object> valueProvider) static JdbcIdentifierBuilderforBackReferences(JdbcConverter converter, AggregatePath path, Function<AggregatePath, Object> valueProvider) Creates ParentKeys with backreference for the given path and value of the parents id.withQualifier(AggregatePath path, Object value) Adds a qualifier to the identifier to build.
-
Method Details
-
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 theIdentifierbased on anAggregatePath. Must not be null.- Returns:
- Guaranteed not to be null.
-
withQualifier
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 byvalue. Must not be null.value- map key or list index qualifying the map identified bypath. Must not be null.- Returns:
- this builder. Guaranteed to be not null.
-
build
-