File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/main/java/org/springframework/data/mapping/model Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 35
35
import org .springframework .data .domain .Persistable ;
36
36
import org .springframework .data .mapping .*;
37
37
import org .springframework .data .spel .EvaluationContextProvider ;
38
+ import org .springframework .data .spel .ExpressionDependencies ;
38
39
import org .springframework .data .support .IsNewStrategy ;
39
40
import org .springframework .data .support .PersistableIsNewStrategy ;
40
41
import org .springframework .data .util .Lazy ;
@@ -537,10 +538,29 @@ public P next() {
537
538
};
538
539
}
539
540
541
+ /**
542
+ * Obtain a {@link EvaluationContext} for a {@code rootObject}.
543
+ *
544
+ * @param rootObject must not be {@literal null}.
545
+ * @return the evaluation context including all potential extensions.
546
+ * @since 2.1
547
+ */
540
548
protected EvaluationContext getEvaluationContext (Object rootObject ) {
541
549
return evaluationContextProvider .getEvaluationContext (rootObject );
542
550
}
543
551
552
+ /**
553
+ * Obtain a {@link EvaluationContext} for a {@code rootObject} given {@link ExpressionDependencies}.
554
+ *
555
+ * @param rootObject must not be {@literal null}.
556
+ * @param dependencies must not be {@literal null}.
557
+ * @return the evaluation context with extensions loaded that satisfy {@link ExpressionDependencies}.
558
+ * @since 2.4.2
559
+ */
560
+ protected EvaluationContext getEvaluationContext (Object rootObject , ExpressionDependencies dependencies ) {
561
+ return evaluationContextProvider .getEvaluationContext (rootObject , dependencies );
562
+ }
563
+
544
564
/**
545
565
* Returns the default {@link IsNewStrategy} to be used. Will be a {@link PersistentEntityIsNewStrategy} by default.
546
566
* Note, that this strategy only gets used if the entity doesn't implement {@link Persistable} as this indicates the
You can’t perform that action at this time.
0 commit comments