Search in sources :

Example 1 with JdbcIdentifierBuilder

use of org.springframework.data.jdbc.core.convert.JdbcIdentifierBuilder in project spring-data-jdbc by spring-projects.

the class JdbcAggregateChangeExecutionContext method getParentKeys.

private Identifier getParentKeys(DbAction.WithDependingOn<?> action, JdbcConverter converter) {
    Object id = getParentId(action);
    JdbcIdentifierBuilder identifier = // 
    JdbcIdentifierBuilder.forBackReferences(converter, new PersistentPropertyPathExtension(context, action.getPropertyPath()), id);
    for (Map.Entry<PersistentPropertyPath<RelationalPersistentProperty>, Object> qualifier : action.getQualifiers().entrySet()) {
        identifier = identifier.withQualifier(new PersistentPropertyPathExtension(context, qualifier.getKey()), qualifier.getValue());
    }
    return identifier.build();
}
Also used : JdbcIdentifierBuilder(org.springframework.data.jdbc.core.convert.JdbcIdentifierBuilder) PersistentPropertyPathExtension(org.springframework.data.relational.core.mapping.PersistentPropertyPathExtension) PersistentPropertyPath(org.springframework.data.mapping.PersistentPropertyPath) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map)

Aggregations

HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 JdbcIdentifierBuilder (org.springframework.data.jdbc.core.convert.JdbcIdentifierBuilder)1 PersistentPropertyPath (org.springframework.data.mapping.PersistentPropertyPath)1 PersistentPropertyPathExtension (org.springframework.data.relational.core.mapping.PersistentPropertyPathExtension)1